@cdc/core 4.26.1 → 4.26.3
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/.claude/agents/qa-test-developer.md +126 -0
- package/CLAUDE.local.md +67 -0
- package/LICENSE +201 -0
- package/_stories/Gallery.Charts.stories.tsx +35 -42
- package/_stories/Gallery.DataBite.stories.tsx +15 -8
- package/_stories/Gallery.Maps.stories.tsx +37 -28
- package/_stories/Gallery.WaffleChart.stories.tsx +1 -1
- package/_stories/PageART.stories.tsx +5 -4
- package/_stories/PageBRFSS.stories.tsx +21 -16
- package/_stories/PageCancerRegistries.stories.tsx +15 -15
- package/_stories/PageEasternEquineEncephalitis.stories.tsx +33 -19
- package/_stories/PageExcessiveAlcoholUse.stories.tsx +148 -143
- package/_stories/PageMaternalMortality.stories.tsx +5 -4
- package/_stories/PageOralHealth.stories.tsx +15 -10
- package/_stories/PageRespiratory.stories.tsx +4 -4
- package/_stories/PageSmokingTobacco.stories.tsx +15 -10
- package/_stories/PageStateDiabetesProfiles.stories.tsx +15 -10
- package/_stories/PageWastewater.stories.tsx +44 -30
- package/_stories/VegaImport.stories.tsx +401 -0
- package/_stories/vega-fixtures/bars-with-line.json +444 -0
- package/_stories/vega-fixtures/bars.json +58 -0
- package/_stories/vega-fixtures/combo-bar-rolling-mean.json +88 -0
- package/_stories/vega-fixtures/combo.json +68 -0
- package/_stories/vega-fixtures/grouped-horizontal-bars.json +83 -0
- package/_stories/vega-fixtures/grouped-horizontal-bars2.json +231 -0
- package/_stories/vega-fixtures/horizontal-bar.json +427 -0
- package/_stories/vega-fixtures/horizontal-bars-with-bad-colors.json +197 -0
- package/_stories/vega-fixtures/horizontal-bars2.json +58 -0
- package/_stories/vega-fixtures/lines.json +227 -0
- package/_stories/vega-fixtures/measles-bars.json +348 -0
- package/_stories/vega-fixtures/measles-map.json +11101 -0
- package/_stories/vega-fixtures/measles-stacked-bars.json +2147 -0
- package/_stories/vega-fixtures/multi-dataset.json +255 -0
- package/_stories/vega-fixtures/no-data.json +14 -0
- package/_stories/vega-fixtures/pie-chart.json +94 -0
- package/_stories/vega-fixtures/repeat-spec.json +47 -0
- package/_stories/vega-fixtures/stacked-area.json +222 -0
- package/_stories/vega-fixtures/stacked-bar-with-rect.json +3412 -0
- package/_stories/vega-fixtures/stacked-bars-with-line.json +364 -0
- package/_stories/vega-fixtures/stacked-bars.json +212 -0
- package/_stories/vega-fixtures/stacked-horizontal-bars.json +140 -0
- package/_stories/vega-fixtures/warning-combo.json +59 -0
- package/_stories/vega-fixtures/warning-scatter-and-line.json +1182 -0
- package/assets/callout-flag.svg +7 -0
- package/assets/icon-chart-area.svg +1 -0
- package/assets/icon-chart-radar.svg +23 -0
- package/assets/logo2.svg +31 -0
- package/components/AdvancedEditor/EmbedEditor.tsx +270 -38
- package/components/Alert/components/Alert.styles.css +2 -2
- package/components/ComboBox/combobox.styles.css +48 -48
- package/components/CustomColorsEditor/CustomColorsEditor.css +53 -53
- package/components/CustomColorsEditor/CustomColorsEditor.tsx +3 -10
- package/components/DataTable/DataTable.tsx +46 -18
- package/components/DataTable/DataTableStandAlone.tsx +1 -0
- package/components/DataTable/components/ChartHeader.tsx +21 -12
- package/components/DataTable/components/MapHeader.tsx +34 -28
- package/components/DataTable/components/SortIcon/sort-icon.css +5 -5
- package/components/DataTable/data-table.css +50 -52
- package/components/DataTable/helpers/applyCustomOrder.ts +17 -0
- package/components/DataTable/helpers/getChartCellValue.ts +10 -7
- package/components/DataTable/helpers/getMapDataTableColumnKeys.ts +22 -0
- package/components/DataTable/helpers/getSeriesName.ts +6 -0
- package/components/DataTable/helpers/mapCellMatrix.tsx +33 -23
- package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +33 -0
- package/components/DownloadButton.tsx +14 -6
- package/components/EditorPanel/ColumnsEditor.tsx +38 -31
- package/components/EditorPanel/CustomSortOrder.tsx +94 -0
- package/components/EditorPanel/DataTableEditor.tsx +139 -23
- package/components/EditorPanel/EditorPanel.styles.css +71 -71
- package/components/EditorPanel/EditorPanel.tsx +3 -8
- package/components/EditorPanel/EditorPanelDispatch.tsx +4 -4
- package/components/EditorPanel/FootnotesEditor.tsx +2 -2
- package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +21 -12
- package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +16 -10
- package/components/EditorPanel/VizFilterEditor/components/FilterOrder.tsx +33 -29
- package/components/EditorPanel/components/MarkupVariablesEditor.tsx +160 -106
- package/components/EditorPanel/components/PanelMarkup.tsx +5 -1
- package/{styles/v2/components → components/EditorPanel}/editor.scss +76 -22
- package/components/EditorPanel/sections/StyleTreatmentSection.tsx +99 -0
- package/components/EditorPanel/sections/VisualSection.tsx +11 -0
- package/components/EditorWrapper/editor-wrapper.style.css +1 -1
- package/components/Filters/Filters.tsx +3 -5
- package/components/Filters/components/Tabs.tsx +19 -7
- package/{styles → components/Filters}/filters.scss +3 -3
- package/components/Footnotes/FootnotesStandAlone.tsx +4 -2
- package/components/HeaderThemeSelector/HeaderThemeSelector.css +61 -5
- package/components/Layout/components/Responsive.tsx +14 -6
- package/components/Layout/components/Sidebar/components/Sidebar.tsx +1 -1
- package/components/Layout/components/Sidebar/components/sidebar.styles.scss +14 -20
- package/components/Layout/components/Visualization/index.tsx +50 -38
- package/components/Layout/components/Visualization/visualizations.scss +232 -15
- package/components/Layout/components/VisualizationContainer.test.tsx +67 -0
- package/components/Layout/components/VisualizationContainer.tsx +37 -0
- package/components/Layout/components/VisualizationContent.test.tsx +182 -0
- package/components/Layout/components/VisualizationContent.tsx +75 -0
- package/components/Layout/index.tsx +5 -5
- package/components/Layout/styles/editor-utils.scss +3 -3
- package/components/Layout/styles/editor.scss +4 -4
- package/components/Legend/Legend.Gradient.tsx +7 -1
- package/components/Loader/loader.styles.css +2 -2
- package/components/Loading.jsx +1 -1
- package/components/MediaControls.tsx +10 -3
- package/components/MultiSelect/multiselect.styles.css +19 -19
- package/components/NestedDropdown/nesteddropdown.styles.css +15 -15
- package/components/PaletteSelector/PaletteSelector.css +15 -15
- package/components/RichTooltip/richTooltip.css +6 -6
- package/components/Table/table.styles.css +2 -2
- package/components/Waiting.tsx +1 -1
- package/components/_stories/CustomColorsEditor.stories.tsx +37 -0
- package/components/_stories/DataTable.stories.tsx +1 -0
- package/components/_stories/Filters.stories.tsx +1 -1
- package/components/_stories/styles.scss +0 -1
- package/components/elements/Button.jsx +1 -1
- package/components/elements/Card.jsx +1 -1
- package/{styles/v2/components → components/elements}/button.scss +9 -8
- package/components/inputs/InputCheckbox.jsx +1 -1
- package/components/inputs/InputSelect.tsx +1 -1
- package/components/inputs/InputText.jsx +1 -1
- package/components/inputs/InputToggle.tsx +1 -1
- package/{styles/v2/components/input → components/inputs}/_input-check-radio.scss +2 -2
- package/{styles/v2/components/input → components/inputs}/_input-group.scss +3 -3
- package/{styles/v2/components/input → components/inputs}/_input-slider.scss +2 -2
- package/{styles/v2/components/input → components/inputs}/_input.scss +5 -5
- package/{styles/v2/components/input → components/inputs}/index.scss +2 -2
- package/{styles → components}/loading.scss +1 -1
- package/components/managers/DataDesigner.tsx +1 -1
- package/{styles/v2/components → components/managers}/data-designer.scss +6 -7
- package/components/ui/Accordion.jsx +1 -1
- package/components/ui/Icon.tsx +1 -1
- package/components/ui/LoadSpin.jsx +1 -1
- package/components/ui/Modal.jsx +1 -1
- package/components/ui/Overlay.jsx +1 -1
- package/components/ui/Title/index.test.tsx +34 -0
- package/components/ui/Title/index.tsx +24 -7
- package/components/ui/Title/title.styles.css +119 -25
- package/components/ui/Tooltip.tsx +1 -1
- package/components/ui/_stories/Title.stories.tsx +1 -1
- package/{styles/v2/components → components/ui}/accordion.scss +3 -3
- package/components/ui/accordion.styles.css +11 -11
- package/{styles/v2/components → components/ui}/modal.scss +2 -2
- package/{styles/v2/components → components/ui}/overlay.scss +6 -6
- package/{styles/v2/components → components}/ui/tooltip.scss +1 -1
- package/{styles → components}/waiting.scss +9 -3
- package/data/colorPalettes.ts +18 -5
- package/data/mapColorPalettes.ts +10 -0
- package/devTemplate/dev.js +285 -0
- package/devTemplate/index.html +30 -0
- package/devTemplate/preview.html +1503 -0
- package/devTemplate/sidebar.css +151 -0
- package/dist/cove-main.css +2530 -3901
- package/dist/cove-main.css.map +1 -1
- package/generateViteConfig.js +111 -2
- package/helpers/DataTransform.ts +1 -5
- package/helpers/backfillDefaults.ts +35 -0
- package/helpers/constants.ts +12 -0
- package/helpers/cove/date.ts +64 -3
- package/helpers/cove/number.ts +29 -15
- package/helpers/cove/string.ts +29 -0
- package/helpers/coveUpdateWorker.ts +14 -8
- package/helpers/displayDataAsText.ts +1 -1
- package/helpers/embed/embedCodeGenerator.ts +80 -0
- package/helpers/embed/embedHelper.js +169 -0
- package/helpers/embed/filterUtils.ts +121 -0
- package/helpers/embed/index.ts +17 -0
- package/helpers/embed/urlValidation.ts +119 -0
- package/helpers/extractDataAndMetadata.ts +20 -0
- package/helpers/fetchRemoteData.ts +14 -8
- package/helpers/filterVizData.ts +6 -1
- package/helpers/getFileExtension.ts +0 -6
- package/helpers/labelHash.ts +9 -0
- package/helpers/markupProcessor.ts +56 -38
- package/helpers/metrics/types.ts +3 -0
- package/helpers/palettes/colorDistributions.ts +1 -1
- package/helpers/palettes/utils.ts +12 -12
- package/helpers/parseCsvWithQuotes.ts +15 -14
- package/helpers/prepareScreenshot.ts +33 -10
- package/helpers/testing.ts +44 -0
- package/helpers/tests/DataTransform.test.ts +125 -0
- package/helpers/tests/abbreviateNumber.test.ts +59 -0
- package/helpers/tests/backfillDefaults.test.ts +253 -0
- package/helpers/tests/date.test.ts +110 -0
- package/helpers/tests/extractDataAndMetadata.test.ts +93 -0
- package/helpers/tests/markupProcessor.test.ts +315 -124
- package/helpers/tests/number.test.ts +42 -0
- package/helpers/tests/prepareScreenshot.test.ts +28 -28
- package/helpers/tests/testStandaloneBuild.ts +36 -26
- package/helpers/tests/useDataVizClasses.test.ts +66 -0
- package/helpers/tests/visualizationWrapperUsage.test.ts +57 -0
- package/helpers/useDataVizClasses.ts +13 -7
- package/helpers/vegaConfig.ts +1 -1
- package/helpers/vegaConfigImport.ts +160 -0
- package/helpers/ver/4.24.4.ts +24 -0
- package/helpers/ver/4.26.1.ts +1 -1
- package/helpers/ver/4.26.2.ts +84 -0
- package/helpers/ver/4.26.3.ts +44 -0
- package/helpers/ver/4.26.4.ts +31 -0
- package/helpers/ver/tests/4.26.1.test.ts +105 -0
- package/helpers/ver/tests/4.26.2.test.ts +298 -0
- package/helpers/ver/tests/4.26.3.test.ts +168 -0
- package/helpers/ver/tests/4.26.4.test.ts +88 -0
- package/helpers/ver/tests/coveUpdateWorker.test.ts +57 -0
- package/helpers/viewports.ts +2 -0
- package/package.json +27 -32
- package/styles/_global.scss +7 -7
- package/styles/_reset.scss +2 -2
- package/styles/{v2/base → base}/_file-selector.scss +4 -4
- package/styles/{v2/base → base}/_general.scss +2 -4
- package/styles/{v2/base → base}/index.scss +1 -1
- package/styles/base.scss +107 -165
- package/styles/cove-main.scss +3 -6
- package/styles/layout/_component.scss +110 -0
- package/styles/{v2/layout → layout}/_data-table.scss +7 -7
- package/styles/layout/_wrapper-padding.scss +27 -0
- package/styles/{v2/main.scss → main.scss} +3 -1
- package/styles/{v2/themes → themes}/_color-definitions.scss +46 -41
- package/styles/{_accessibility.scss → utils/_accessibility.scss} +1 -1
- package/styles/{v2/utils → utils}/_grid.scss +8 -3
- package/styles/{_global-variables.scss → utils/_properties.scss} +133 -112
- package/styles/{v2/utils → utils}/index.scss +2 -1
- package/types/Annotation.ts +10 -11
- package/types/Axis.ts +2 -0
- package/types/ComponentStyles.ts +1 -0
- package/types/ConfigureData.ts +1 -0
- package/types/General.ts +2 -0
- package/types/MarkupInclude.ts +1 -0
- package/types/MarkupVariable.ts +2 -1
- package/types/Palette.ts +22 -0
- package/types/Table.ts +9 -0
- package/types/Visualization.ts +7 -0
- package/_stories/StoryRenderingTests.stories.tsx +0 -164
- package/helpers/embedCodeGenerator.ts +0 -109
- package/styles/_common-components.css +0 -73
- package/styles/_variables.scss +0 -63
- package/styles/v2/layout/_component.scss +0 -21
- package/styles/v2/utils/_variables.scss +0 -9
- package/{styles/v2/components/card.scss → components/elements/card.css} +2 -2
- /package/{styles/v2/components → components/ui}/icon.scss +0 -0
- /package/{styles/v2/components → components/ui}/loadspin.scss +0 -0
- /package/styles/{v2/base → base}/_heading.scss +0 -0
- /package/styles/{v2/base → base}/_reset.scss +0 -0
- /package/styles/{v2/layout → layout}/_alert.scss +0 -0
- /package/styles/{v2/layout → layout}/_progression.scss +0 -0
- /package/styles/{v2/layout → layout}/_tooltip.scss +0 -0
- /package/styles/{v2/layout → layout}/index.scss +0 -0
- /package/styles/{v2/themes → themes}/index.scss +0 -0
- /package/styles/{v2/utils → utils}/_align.scss +0 -0
- /package/styles/{v2/utils → utils}/_animations.scss +0 -0
- /package/styles/{v2/utils → utils}/_breakpoints.scss +0 -0
- /package/styles/{v2/utils → utils}/_mixins.scss +0 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
|
|
3
|
+
"data": {
|
|
4
|
+
"name": "Weekly Incident Case Counts"
|
|
5
|
+
},
|
|
6
|
+
"layer": [
|
|
7
|
+
{
|
|
8
|
+
"mark": {
|
|
9
|
+
"type": "bar",
|
|
10
|
+
"color": "#3f82e0"
|
|
11
|
+
},
|
|
12
|
+
"encoding": {
|
|
13
|
+
"x": {
|
|
14
|
+
"field": "date",
|
|
15
|
+
"type": "temporal",
|
|
16
|
+
"title": "Date (CCCD)",
|
|
17
|
+
"axis": {
|
|
18
|
+
"labelExpr": "[timeFormat(datum.value, '%b'), timeFormat(datum.value, '%m') == '01' ? timeFormat(datum.value, '%Y') : '']"
|
|
19
|
+
},
|
|
20
|
+
"scale": {
|
|
21
|
+
"nice": "month"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"y": {
|
|
25
|
+
"field": "totalIncidentCases",
|
|
26
|
+
"type": "quantitative",
|
|
27
|
+
"title": "Total Number of Cases",
|
|
28
|
+
"scale": {
|
|
29
|
+
"domain": {
|
|
30
|
+
"unionWith": [
|
|
31
|
+
0,
|
|
32
|
+
1
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"color": {
|
|
38
|
+
"value": "#578edb",
|
|
39
|
+
"legend": {
|
|
40
|
+
"title": "Legend"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"mark": {
|
|
47
|
+
"type": "line",
|
|
48
|
+
"color": "black",
|
|
49
|
+
"strokeDash": [
|
|
50
|
+
4,
|
|
51
|
+
4
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"encoding": {
|
|
55
|
+
"x": {
|
|
56
|
+
"field": "date",
|
|
57
|
+
"type": "temporal",
|
|
58
|
+
"title": "Date (CCCD)",
|
|
59
|
+
"axis": {
|
|
60
|
+
"labelExpr": "[timeFormat(datum.value, '%b'), timeFormat(datum.value, '%m') == '01' ? timeFormat(datum.value, '%Y') : '']"
|
|
61
|
+
},
|
|
62
|
+
"scale": {
|
|
63
|
+
"nice": "month"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"y": {
|
|
67
|
+
"field": "incidentCasesMovingAverage3",
|
|
68
|
+
"type": "quantitative",
|
|
69
|
+
"title": "Total Number of Cases",
|
|
70
|
+
"scale": {
|
|
71
|
+
"domain": {
|
|
72
|
+
"unionWith": [
|
|
73
|
+
0,
|
|
74
|
+
1
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"color": {
|
|
80
|
+
"value": "black",
|
|
81
|
+
"legend": {
|
|
82
|
+
"title": "Legend"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"height": "container",
|
|
89
|
+
"width": "container",
|
|
90
|
+
"datasets": {
|
|
91
|
+
"Weekly Incident Case Counts": [
|
|
92
|
+
{
|
|
93
|
+
"date": "2022-05-14T04:00:00.000Z",
|
|
94
|
+
"totalIncidentCases": 1
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"date": "2022-06-04T04:00:00.000Z",
|
|
98
|
+
"incidentCasesMovingAverage3": 7,
|
|
99
|
+
"totalIncidentCases": 10
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"date": "2022-06-25T04:00:00.000Z",
|
|
103
|
+
"incidentCasesMovingAverage3": 50.333333333333336,
|
|
104
|
+
"totalIncidentCases": 79
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"date": "2022-07-16T04:00:00.000Z",
|
|
108
|
+
"incidentCasesMovingAverage3": 365.6666666666667,
|
|
109
|
+
"totalIncidentCases": 504
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"date": "2022-08-06T04:00:00.000Z",
|
|
113
|
+
"incidentCasesMovingAverage3": 580,
|
|
114
|
+
"totalIncidentCases": 560
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"date": "2022-08-27T04:00:00.000Z",
|
|
118
|
+
"incidentCasesMovingAverage3": 395,
|
|
119
|
+
"totalIncidentCases": 275
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"date": "2022-09-17T04:00:00.000Z",
|
|
123
|
+
"incidentCasesMovingAverage3": 181.66666666666666,
|
|
124
|
+
"totalIncidentCases": 138
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"date": "2022-10-08T04:00:00.000Z",
|
|
128
|
+
"incidentCasesMovingAverage3": 79.33333333333333,
|
|
129
|
+
"totalIncidentCases": 51
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"date": "2022-10-29T04:00:00.000Z",
|
|
133
|
+
"incidentCasesMovingAverage3": 38,
|
|
134
|
+
"totalIncidentCases": 24
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"date": "2022-11-19T05:00:00.000Z",
|
|
138
|
+
"incidentCasesMovingAverage3": 18.666666666666668,
|
|
139
|
+
"totalIncidentCases": 16
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"date": "2022-12-10T05:00:00.000Z",
|
|
143
|
+
"incidentCasesMovingAverage3": 7.333333333333333,
|
|
144
|
+
"totalIncidentCases": 9
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"date": "2022-12-31T05:00:00.000Z",
|
|
148
|
+
"incidentCasesMovingAverage3": 6,
|
|
149
|
+
"totalIncidentCases": 4
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"date": "2023-01-21T05:00:00.000Z",
|
|
153
|
+
"incidentCasesMovingAverage3": 4.666666666666667,
|
|
154
|
+
"totalIncidentCases": 3
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"date": "2023-02-11T05:00:00.000Z",
|
|
158
|
+
"incidentCasesMovingAverage3": 3.6666666666666665,
|
|
159
|
+
"totalIncidentCases": 0
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"date": "2023-03-04T05:00:00.000Z",
|
|
163
|
+
"incidentCasesMovingAverage3": 2,
|
|
164
|
+
"totalIncidentCases": 1
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"date": "2023-03-25T04:00:00.000Z",
|
|
168
|
+
"incidentCasesMovingAverage3": 1.3333333333333333,
|
|
169
|
+
"totalIncidentCases": 1
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"date": "2023-04-15T04:00:00.000Z",
|
|
173
|
+
"incidentCasesMovingAverage3": 2.6666666666666665,
|
|
174
|
+
"totalIncidentCases": 1
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"date": "2023-05-06T04:00:00.000Z",
|
|
178
|
+
"incidentCasesMovingAverage3": 1,
|
|
179
|
+
"totalIncidentCases": 2
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"date": "2023-05-27T04:00:00.000Z",
|
|
183
|
+
"incidentCasesMovingAverage3": 3,
|
|
184
|
+
"totalIncidentCases": 4
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"date": "2023-06-17T04:00:00.000Z",
|
|
188
|
+
"incidentCasesMovingAverage3": 5.333333333333333,
|
|
189
|
+
"totalIncidentCases": 8
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"date": "2023-07-08T04:00:00.000Z",
|
|
193
|
+
"incidentCasesMovingAverage3": 5,
|
|
194
|
+
"totalIncidentCases": 4
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"date": "2023-07-29T04:00:00.000Z",
|
|
198
|
+
"incidentCasesMovingAverage3": 7,
|
|
199
|
+
"totalIncidentCases": 6
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"date": "2023-08-19T04:00:00.000Z",
|
|
203
|
+
"incidentCasesMovingAverage3": 6.666666666666667,
|
|
204
|
+
"totalIncidentCases": 4
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"date": "2023-09-09T04:00:00.000Z",
|
|
208
|
+
"incidentCasesMovingAverage3": 3.6666666666666665,
|
|
209
|
+
"totalIncidentCases": 3
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"date": "2023-09-30T04:00:00.000Z",
|
|
213
|
+
"incidentCasesMovingAverage3": 3,
|
|
214
|
+
"totalIncidentCases": 3
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"date": "2023-10-21T04:00:00.000Z",
|
|
218
|
+
"incidentCasesMovingAverage3": 7.333333333333333,
|
|
219
|
+
"totalIncidentCases": 7
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"date": "2023-11-11T05:00:00.000Z",
|
|
223
|
+
"incidentCasesMovingAverage3": 10.333333333333334,
|
|
224
|
+
"totalIncidentCases": 8
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"date": "2023-12-02T05:00:00.000Z",
|
|
228
|
+
"incidentCasesMovingAverage3": 12.666666666666666,
|
|
229
|
+
"totalIncidentCases": 12
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"date": "2023-12-23T05:00:00.000Z",
|
|
233
|
+
"incidentCasesMovingAverage3": 11.333333333333334,
|
|
234
|
+
"totalIncidentCases": 9
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"date": "2024-01-13T05:00:00.000Z",
|
|
238
|
+
"incidentCasesMovingAverage3": 15.666666666666666,
|
|
239
|
+
"totalIncidentCases": 18
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"date": "2024-02-03T05:00:00.000Z",
|
|
243
|
+
"incidentCasesMovingAverage3": 20.333333333333332,
|
|
244
|
+
"totalIncidentCases": 22
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"date": "2024-02-24T05:00:00.000Z",
|
|
248
|
+
"incidentCasesMovingAverage3": 17.333333333333332,
|
|
249
|
+
"totalIncidentCases": 17
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"date": "2024-03-16T04:00:00.000Z",
|
|
253
|
+
"incidentCasesMovingAverage3": 22.666666666666668,
|
|
254
|
+
"totalIncidentCases": 25
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"date": "2024-04-06T04:00:00.000Z",
|
|
258
|
+
"incidentCasesMovingAverage3": 16.333333333333332,
|
|
259
|
+
"totalIncidentCases": 12
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"date": "2024-04-27T04:00:00.000Z",
|
|
263
|
+
"incidentCasesMovingAverage3": 17.666666666666668,
|
|
264
|
+
"totalIncidentCases": 20
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"date": "2024-05-18T04:00:00.000Z",
|
|
268
|
+
"incidentCasesMovingAverage3": 13.333333333333334,
|
|
269
|
+
"totalIncidentCases": 12
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"date": "2024-06-08T04:00:00.000Z",
|
|
273
|
+
"incidentCasesMovingAverage3": 14,
|
|
274
|
+
"totalIncidentCases": 11
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"date": "2024-06-29T04:00:00.000Z",
|
|
278
|
+
"incidentCasesMovingAverage3": 10,
|
|
279
|
+
"totalIncidentCases": 7
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"date": "2024-07-20T04:00:00.000Z",
|
|
283
|
+
"incidentCasesMovingAverage3": 8,
|
|
284
|
+
"totalIncidentCases": 9
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"date": "2024-08-10T04:00:00.000Z",
|
|
288
|
+
"incidentCasesMovingAverage3": 10.333333333333334,
|
|
289
|
+
"totalIncidentCases": 11
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"date": "2024-08-31T04:00:00.000Z",
|
|
293
|
+
"incidentCasesMovingAverage3": 10,
|
|
294
|
+
"totalIncidentCases": 9
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"date": "2024-09-21T04:00:00.000Z",
|
|
298
|
+
"incidentCasesMovingAverage3": 6.333333333333333,
|
|
299
|
+
"totalIncidentCases": 5
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"date": "2024-10-12T04:00:00.000Z",
|
|
303
|
+
"incidentCasesMovingAverage3": 6.666666666666667,
|
|
304
|
+
"totalIncidentCases": 1
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"date": "2024-11-02T04:00:00.000Z",
|
|
308
|
+
"incidentCasesMovingAverage3": 4,
|
|
309
|
+
"totalIncidentCases": 4
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"date": "2024-11-23T05:00:00.000Z",
|
|
313
|
+
"incidentCasesMovingAverage3": 4,
|
|
314
|
+
"totalIncidentCases": 8
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"date": "2024-12-14T05:00:00.000Z",
|
|
318
|
+
"incidentCasesMovingAverage3": 5.666666666666667,
|
|
319
|
+
"totalIncidentCases": 6
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"date": "2025-01-04T05:00:00.000Z",
|
|
323
|
+
"incidentCasesMovingAverage3": 6,
|
|
324
|
+
"totalIncidentCases": 9
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"date": "2025-01-25T05:00:00.000Z",
|
|
328
|
+
"incidentCasesMovingAverage3": 3.3333333333333335,
|
|
329
|
+
"totalIncidentCases": 5
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"date": "2025-02-15T05:00:00.000Z",
|
|
333
|
+
"incidentCasesMovingAverage3": 2.3333333333333335,
|
|
334
|
+
"totalIncidentCases": 1
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"date": "2025-03-08T05:00:00.000Z",
|
|
338
|
+
"incidentCasesMovingAverage3": 1,
|
|
339
|
+
"totalIncidentCases": 1
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"date": "2025-03-29T04:00:00.000Z",
|
|
343
|
+
"incidentCasesMovingAverage3": 0.6666666666666666,
|
|
344
|
+
"totalIncidentCases": 1
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"date": "2025-04-19T04:00:00.000Z",
|
|
348
|
+
"incidentCasesMovingAverage3": 5,
|
|
349
|
+
"totalIncidentCases": 11
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"date": "2025-05-10T04:00:00.000Z",
|
|
353
|
+
"incidentCasesMovingAverage3": 7.666666666666667,
|
|
354
|
+
"totalIncidentCases": 14
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"date": "2025-05-30T04:00:00.000Z",
|
|
358
|
+
"incidentCasesMovingAverage3": 3,
|
|
359
|
+
"totalIncidentCases": 0
|
|
360
|
+
}
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
"config": {
|
|
364
|
+
"background": "#FFFFFF",
|
|
365
|
+
"bar": {
|
|
366
|
+
"fill": "#2D72D2"
|
|
367
|
+
},
|
|
368
|
+
"arc": {
|
|
369
|
+
"fill": "#2D72D2"
|
|
370
|
+
},
|
|
371
|
+
"area": {
|
|
372
|
+
"fill": "#2D72D2"
|
|
373
|
+
},
|
|
374
|
+
"rect": {
|
|
375
|
+
"fill": "#2D72D2"
|
|
376
|
+
},
|
|
377
|
+
"circle": {
|
|
378
|
+
"fill": "#2D72D2"
|
|
379
|
+
},
|
|
380
|
+
"point": {
|
|
381
|
+
"stroke": "#2D72D2"
|
|
382
|
+
},
|
|
383
|
+
"line": {
|
|
384
|
+
"stroke": "#2D72D2"
|
|
385
|
+
},
|
|
386
|
+
"font": "Source-Sans-Pro",
|
|
387
|
+
"padding": 20,
|
|
388
|
+
"mark": {
|
|
389
|
+
"opacity": 0.75,
|
|
390
|
+
"tooltip": true
|
|
391
|
+
},
|
|
392
|
+
"title": {
|
|
393
|
+
"color": "#111418",
|
|
394
|
+
"fontSize": 14,
|
|
395
|
+
"fontWeight": 600,
|
|
396
|
+
"anchor": "start",
|
|
397
|
+
"subtitleColor": "#5F6B7C",
|
|
398
|
+
"subtitleFontSize": 12,
|
|
399
|
+
"subtitlePadding": 7
|
|
400
|
+
},
|
|
401
|
+
"axis": {
|
|
402
|
+
"labelFontSize": 12,
|
|
403
|
+
"titleFontSize": 14,
|
|
404
|
+
"titleFontWeight": 400,
|
|
405
|
+
"titlePadding": 10,
|
|
406
|
+
"titleColor": "#111418",
|
|
407
|
+
"labelColor": "#738091",
|
|
408
|
+
"gridColor": "#DCE0E5",
|
|
409
|
+
"gridOpacity": 1,
|
|
410
|
+
"domainColor": "#5F6B7C",
|
|
411
|
+
"tickColor": "#5F6B7C"
|
|
412
|
+
},
|
|
413
|
+
"legend": {
|
|
414
|
+
"titleColor": "#111418",
|
|
415
|
+
"labelColor": "#111418",
|
|
416
|
+
"titleFontSize": 12,
|
|
417
|
+
"labelFontSize": 12,
|
|
418
|
+
"titleFontWeight": 600
|
|
419
|
+
},
|
|
420
|
+
"view": {
|
|
421
|
+
"stroke": "transparent"
|
|
422
|
+
},
|
|
423
|
+
"text": {
|
|
424
|
+
"color": "#111418",
|
|
425
|
+
"fontSize": 12,
|
|
426
|
+
"fontWeight": 400
|
|
427
|
+
},
|
|
428
|
+
"range": {
|
|
429
|
+
"category": [
|
|
430
|
+
"#2D72D2",
|
|
431
|
+
"#DB2C6F",
|
|
432
|
+
"#8EB125",
|
|
433
|
+
"#9D3F9D",
|
|
434
|
+
"#00A396",
|
|
435
|
+
"#D1980B",
|
|
436
|
+
"#D33D17",
|
|
437
|
+
"#7961DB",
|
|
438
|
+
"#29A634",
|
|
439
|
+
"#946638",
|
|
440
|
+
"#147EB3"
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://vega.github.io/schema/vega-lite/v6.json",
|
|
3
|
+
"description": "A simple bar chart with embedded data.",
|
|
4
|
+
"data": {
|
|
5
|
+
"values": [
|
|
6
|
+
{
|
|
7
|
+
"a": "A",
|
|
8
|
+
"b": 28
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"a": "B",
|
|
12
|
+
"b": 55
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"a": "C",
|
|
16
|
+
"b": 43
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"a": "D",
|
|
20
|
+
"b": 91
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"a": "E",
|
|
24
|
+
"b": 81
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"a": "F",
|
|
28
|
+
"b": 53
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"a": "G",
|
|
32
|
+
"b": 19
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"a": "H",
|
|
36
|
+
"b": 87
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"a": "I",
|
|
40
|
+
"b": 52
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"mark": "bar",
|
|
45
|
+
"encoding": {
|
|
46
|
+
"x": {
|
|
47
|
+
"field": "a",
|
|
48
|
+
"type": "nominal",
|
|
49
|
+
"axis": {
|
|
50
|
+
"labelAngle": 0
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"y": {
|
|
54
|
+
"field": "b",
|
|
55
|
+
"type": "quantitative"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://vega.github.io/schema/vega-lite/v6.json",
|
|
3
|
+
"description": "A simple bar chart with embedded data.",
|
|
4
|
+
"data": {
|
|
5
|
+
"values": [
|
|
6
|
+
{
|
|
7
|
+
"a": "A",
|
|
8
|
+
"b": 28
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"a": "B",
|
|
12
|
+
"b": 55
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"a": "C",
|
|
16
|
+
"b": 43
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"a": "D",
|
|
20
|
+
"b": 91
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"a": "E",
|
|
24
|
+
"b": 81
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"a": "F",
|
|
28
|
+
"b": 53
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"a": "G",
|
|
32
|
+
"b": 19
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"a": "H",
|
|
36
|
+
"b": 87
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"a": "I",
|
|
40
|
+
"b": 52
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"transform": [
|
|
45
|
+
{
|
|
46
|
+
"window": [
|
|
47
|
+
{
|
|
48
|
+
"field": "b",
|
|
49
|
+
"op": "mean",
|
|
50
|
+
"as": "rolling_mean"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"frame": [
|
|
54
|
+
-3,
|
|
55
|
+
3
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"encoding": {
|
|
60
|
+
"x": {
|
|
61
|
+
"field": "a",
|
|
62
|
+
"type": "nominal",
|
|
63
|
+
"axis": {
|
|
64
|
+
"labelAngle": 0
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"y": {
|
|
68
|
+
"field": "b",
|
|
69
|
+
"type": "quantitative"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"layer": [
|
|
73
|
+
{
|
|
74
|
+
"mark": "bar"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"mark": "line",
|
|
78
|
+
"encoding": {
|
|
79
|
+
"y": {
|
|
80
|
+
"field": "rolling_mean"
|
|
81
|
+
},
|
|
82
|
+
"color": {
|
|
83
|
+
"value": "red"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://vega.github.io/schema/vega-lite/v6.json",
|
|
3
|
+
"description": "Plot showing average data with raw values in the background.",
|
|
4
|
+
"data": {
|
|
5
|
+
"values": [
|
|
6
|
+
{
|
|
7
|
+
"category": "A",
|
|
8
|
+
"bar_amount": 100,
|
|
9
|
+
"bar_amount2": 200,
|
|
10
|
+
"line_amount": 22
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"category": "B",
|
|
14
|
+
"bar_amount": 30,
|
|
15
|
+
"bar_amount2": 200,
|
|
16
|
+
"line_amount": 52
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"category": "C",
|
|
20
|
+
"bar_amount": 10,
|
|
21
|
+
"bar_amount2": 11,
|
|
22
|
+
"line_amount": 82
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"layer": [
|
|
27
|
+
{
|
|
28
|
+
"mark": {
|
|
29
|
+
"type": "bar"
|
|
30
|
+
},
|
|
31
|
+
"encoding": {
|
|
32
|
+
"x": {
|
|
33
|
+
"field": "category"
|
|
34
|
+
},
|
|
35
|
+
"y": {
|
|
36
|
+
"field": "bar_amount",
|
|
37
|
+
"type": "quantitative"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"mark": {
|
|
43
|
+
"type": "area"
|
|
44
|
+
},
|
|
45
|
+
"encoding": {
|
|
46
|
+
"x": {
|
|
47
|
+
"field": "category"
|
|
48
|
+
},
|
|
49
|
+
"y": {
|
|
50
|
+
"field": "bar_amount2",
|
|
51
|
+
"type": "quantitative"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"mark": "line",
|
|
57
|
+
"encoding": {
|
|
58
|
+
"x": {
|
|
59
|
+
"field": "category"
|
|
60
|
+
},
|
|
61
|
+
"y": {
|
|
62
|
+
"field": "line_amount",
|
|
63
|
+
"type": "quantitative"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|