@genspectrum/dashboard-components 0.19.8 → 0.19.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +31 -13
- package/dist/assets/mutationOverTimeWorker-BzmkceEA.js.map +1 -0
- package/dist/components.d.ts +35 -35
- package/dist/components.js +4 -6
- package/dist/components.js.map +1 -1
- package/dist/util.d.ts +35 -35
- package/package.json +1 -1
- package/src/web-components/input/introduction.mdx +57 -2
- package/src/web-components/tutorials/CreateYourFirstOwnDashboard.mdx +85 -0
- package/src/web-components/tutorials/UseTheComponentsWithPlainJavaScript.mdx +140 -0
- package/src/web-components/tutorials/UseTheComponentsWithReact.mdx +166 -0
- package/src/web-components/visualization/gs-mutations.tsx +2 -2
- package/src/web-components/visualization/introduction.mdx +51 -0
- package/standalone-bundle/assets/mutationOverTimeWorker-jUeItsGM.js.map +1 -0
- package/standalone-bundle/dashboard-components.js +7070 -7101
- package/standalone-bundle/dashboard-components.js.map +1 -1
- package/dist/assets/mutationOverTimeWorker-CBXsEsiT.js.map +0 -1
- package/src/web-components/visualization/data_visualization_statistical_analysis.mdx +0 -26
- package/standalone-bundle/assets/mutationOverTimeWorker-CN4SJC7C.js.map +0 -1
- /package/src/web-components/{MutationAnnotations.mdx → mutationAnnotations.mdx} +0 -0
- /package/src/web-components/{ResizeContainer.mdx → sizeOfComponents.mdx} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Meta } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
<Meta title='Visualization/Introduction' />
|
|
4
|
+
|
|
5
|
+
# Introduction
|
|
6
|
+
|
|
7
|
+
The components in this section visualize data from LAPIS.
|
|
8
|
+
They take a LAPIS filter as input, fetch data from LAPIS and visualize the results in charts and tables.
|
|
9
|
+
|
|
10
|
+
Refer to the Swagger UI / OpenAPI documentation of your LAPIS instance for the details of what valid LAPIS filters are.
|
|
11
|
+
The LAPIS filter should only contain actual "query filters"
|
|
12
|
+
(i.e. the LAPIS filter should not include request parameters such as `fields`, `limit`, `orderBy`).
|
|
13
|
+
The components perform minor modifications to the LAPIS filter before sending it to LAPIS,
|
|
14
|
+
such as adding stratification by adding which `fields` the query should return
|
|
15
|
+
or decomposing the filters into multiple filters for smaller time intervals.
|
|
16
|
+
Otherwise, the LAPIS filter is passed to LAPIS unchanged.
|
|
17
|
+
|
|
18
|
+
## Preventing Layout Shifts
|
|
19
|
+
|
|
20
|
+
While the data is loaded, components don't know how much space they will take up.
|
|
21
|
+
If you didn't set a fixed height, the component will initially be very small as long as it displays a loading spinner.
|
|
22
|
+
Once the data is loaded, users will see a layout shift because the component will grow to its final size.
|
|
23
|
+
|
|
24
|
+
All visualization components fire a `gs-component-finished-loading` event when the data is loaded
|
|
25
|
+
and the component is ready to be displayed.
|
|
26
|
+
After a component fired the event, you can expect that there are no more layout shifts.
|
|
27
|
+
|
|
28
|
+
To prevent layout shifts, you could initially hide the component and only display it after the event was fired.
|
|
29
|
+
|
|
30
|
+
## Data Visualization and Statistical Analysis
|
|
31
|
+
|
|
32
|
+
### Scales
|
|
33
|
+
|
|
34
|
+
On most plots, users can select the y-axis scaling through a dropdown.
|
|
35
|
+
They can choose between linear, logarithmic and logistic scaling.
|
|
36
|
+
By default, the y-axis is set to a linear scale.
|
|
37
|
+
|
|
38
|
+
In general, for each scale the displayed height of a value is calculated by applying the corresponding scale function.
|
|
39
|
+
|
|
40
|
+
- Linear: `value`
|
|
41
|
+
- Logarithmic: `ln(value)`
|
|
42
|
+
- Logistic: `ln(value / (1 - value))`
|
|
43
|
+
|
|
44
|
+
### Confidence Intervals
|
|
45
|
+
|
|
46
|
+
On bar and line plots, users can choose to display confidence intervals.
|
|
47
|
+
For line plots, this is done by shading the area between the upper and lower bounds.
|
|
48
|
+
For bar plots, this is done by adding error bars to the top of each bar.
|
|
49
|
+
|
|
50
|
+
Currently, only one method is available for calculating the confidence intervals:
|
|
51
|
+
the [wilson score interval](https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval#Wilson_score_interval) with a confidence level of 95%.
|