@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.
Files changed (249) hide show
  1. package/.claude/agents/qa-test-developer.md +126 -0
  2. package/CLAUDE.local.md +67 -0
  3. package/LICENSE +201 -0
  4. package/_stories/Gallery.Charts.stories.tsx +35 -42
  5. package/_stories/Gallery.DataBite.stories.tsx +15 -8
  6. package/_stories/Gallery.Maps.stories.tsx +37 -28
  7. package/_stories/Gallery.WaffleChart.stories.tsx +1 -1
  8. package/_stories/PageART.stories.tsx +5 -4
  9. package/_stories/PageBRFSS.stories.tsx +21 -16
  10. package/_stories/PageCancerRegistries.stories.tsx +15 -15
  11. package/_stories/PageEasternEquineEncephalitis.stories.tsx +33 -19
  12. package/_stories/PageExcessiveAlcoholUse.stories.tsx +148 -143
  13. package/_stories/PageMaternalMortality.stories.tsx +5 -4
  14. package/_stories/PageOralHealth.stories.tsx +15 -10
  15. package/_stories/PageRespiratory.stories.tsx +4 -4
  16. package/_stories/PageSmokingTobacco.stories.tsx +15 -10
  17. package/_stories/PageStateDiabetesProfiles.stories.tsx +15 -10
  18. package/_stories/PageWastewater.stories.tsx +44 -30
  19. package/_stories/VegaImport.stories.tsx +401 -0
  20. package/_stories/vega-fixtures/bars-with-line.json +444 -0
  21. package/_stories/vega-fixtures/bars.json +58 -0
  22. package/_stories/vega-fixtures/combo-bar-rolling-mean.json +88 -0
  23. package/_stories/vega-fixtures/combo.json +68 -0
  24. package/_stories/vega-fixtures/grouped-horizontal-bars.json +83 -0
  25. package/_stories/vega-fixtures/grouped-horizontal-bars2.json +231 -0
  26. package/_stories/vega-fixtures/horizontal-bar.json +427 -0
  27. package/_stories/vega-fixtures/horizontal-bars-with-bad-colors.json +197 -0
  28. package/_stories/vega-fixtures/horizontal-bars2.json +58 -0
  29. package/_stories/vega-fixtures/lines.json +227 -0
  30. package/_stories/vega-fixtures/measles-bars.json +348 -0
  31. package/_stories/vega-fixtures/measles-map.json +11101 -0
  32. package/_stories/vega-fixtures/measles-stacked-bars.json +2147 -0
  33. package/_stories/vega-fixtures/multi-dataset.json +255 -0
  34. package/_stories/vega-fixtures/no-data.json +14 -0
  35. package/_stories/vega-fixtures/pie-chart.json +94 -0
  36. package/_stories/vega-fixtures/repeat-spec.json +47 -0
  37. package/_stories/vega-fixtures/stacked-area.json +222 -0
  38. package/_stories/vega-fixtures/stacked-bar-with-rect.json +3412 -0
  39. package/_stories/vega-fixtures/stacked-bars-with-line.json +364 -0
  40. package/_stories/vega-fixtures/stacked-bars.json +212 -0
  41. package/_stories/vega-fixtures/stacked-horizontal-bars.json +140 -0
  42. package/_stories/vega-fixtures/warning-combo.json +59 -0
  43. package/_stories/vega-fixtures/warning-scatter-and-line.json +1182 -0
  44. package/assets/callout-flag.svg +7 -0
  45. package/assets/icon-chart-area.svg +1 -0
  46. package/assets/icon-chart-radar.svg +23 -0
  47. package/assets/logo2.svg +31 -0
  48. package/components/AdvancedEditor/EmbedEditor.tsx +270 -38
  49. package/components/Alert/components/Alert.styles.css +2 -2
  50. package/components/ComboBox/combobox.styles.css +48 -48
  51. package/components/CustomColorsEditor/CustomColorsEditor.css +53 -53
  52. package/components/CustomColorsEditor/CustomColorsEditor.tsx +3 -10
  53. package/components/DataTable/DataTable.tsx +46 -18
  54. package/components/DataTable/DataTableStandAlone.tsx +1 -0
  55. package/components/DataTable/components/ChartHeader.tsx +21 -12
  56. package/components/DataTable/components/MapHeader.tsx +34 -28
  57. package/components/DataTable/components/SortIcon/sort-icon.css +5 -5
  58. package/components/DataTable/data-table.css +50 -52
  59. package/components/DataTable/helpers/applyCustomOrder.ts +17 -0
  60. package/components/DataTable/helpers/getChartCellValue.ts +10 -7
  61. package/components/DataTable/helpers/getMapDataTableColumnKeys.ts +22 -0
  62. package/components/DataTable/helpers/getSeriesName.ts +6 -0
  63. package/components/DataTable/helpers/mapCellMatrix.tsx +33 -23
  64. package/components/DataTable/helpers/tests/mapCellMatrix.test.ts +33 -0
  65. package/components/DownloadButton.tsx +14 -6
  66. package/components/EditorPanel/ColumnsEditor.tsx +38 -31
  67. package/components/EditorPanel/CustomSortOrder.tsx +94 -0
  68. package/components/EditorPanel/DataTableEditor.tsx +139 -23
  69. package/components/EditorPanel/EditorPanel.styles.css +71 -71
  70. package/components/EditorPanel/EditorPanel.tsx +3 -8
  71. package/components/EditorPanel/EditorPanelDispatch.tsx +4 -4
  72. package/components/EditorPanel/FootnotesEditor.tsx +2 -2
  73. package/components/EditorPanel/VizFilterEditor/NestedDropdownEditor.tsx +21 -12
  74. package/components/EditorPanel/VizFilterEditor/VizFilterEditor.tsx +16 -10
  75. package/components/EditorPanel/VizFilterEditor/components/FilterOrder.tsx +33 -29
  76. package/components/EditorPanel/components/MarkupVariablesEditor.tsx +160 -106
  77. package/components/EditorPanel/components/PanelMarkup.tsx +5 -1
  78. package/{styles/v2/components → components/EditorPanel}/editor.scss +76 -22
  79. package/components/EditorPanel/sections/StyleTreatmentSection.tsx +99 -0
  80. package/components/EditorPanel/sections/VisualSection.tsx +11 -0
  81. package/components/EditorWrapper/editor-wrapper.style.css +1 -1
  82. package/components/Filters/Filters.tsx +3 -5
  83. package/components/Filters/components/Tabs.tsx +19 -7
  84. package/{styles → components/Filters}/filters.scss +3 -3
  85. package/components/Footnotes/FootnotesStandAlone.tsx +4 -2
  86. package/components/HeaderThemeSelector/HeaderThemeSelector.css +61 -5
  87. package/components/Layout/components/Responsive.tsx +14 -6
  88. package/components/Layout/components/Sidebar/components/Sidebar.tsx +1 -1
  89. package/components/Layout/components/Sidebar/components/sidebar.styles.scss +14 -20
  90. package/components/Layout/components/Visualization/index.tsx +50 -38
  91. package/components/Layout/components/Visualization/visualizations.scss +232 -15
  92. package/components/Layout/components/VisualizationContainer.test.tsx +67 -0
  93. package/components/Layout/components/VisualizationContainer.tsx +37 -0
  94. package/components/Layout/components/VisualizationContent.test.tsx +182 -0
  95. package/components/Layout/components/VisualizationContent.tsx +75 -0
  96. package/components/Layout/index.tsx +5 -5
  97. package/components/Layout/styles/editor-utils.scss +3 -3
  98. package/components/Layout/styles/editor.scss +4 -4
  99. package/components/Legend/Legend.Gradient.tsx +7 -1
  100. package/components/Loader/loader.styles.css +2 -2
  101. package/components/Loading.jsx +1 -1
  102. package/components/MediaControls.tsx +10 -3
  103. package/components/MultiSelect/multiselect.styles.css +19 -19
  104. package/components/NestedDropdown/nesteddropdown.styles.css +15 -15
  105. package/components/PaletteSelector/PaletteSelector.css +15 -15
  106. package/components/RichTooltip/richTooltip.css +6 -6
  107. package/components/Table/table.styles.css +2 -2
  108. package/components/Waiting.tsx +1 -1
  109. package/components/_stories/CustomColorsEditor.stories.tsx +37 -0
  110. package/components/_stories/DataTable.stories.tsx +1 -0
  111. package/components/_stories/Filters.stories.tsx +1 -1
  112. package/components/_stories/styles.scss +0 -1
  113. package/components/elements/Button.jsx +1 -1
  114. package/components/elements/Card.jsx +1 -1
  115. package/{styles/v2/components → components/elements}/button.scss +9 -8
  116. package/components/inputs/InputCheckbox.jsx +1 -1
  117. package/components/inputs/InputSelect.tsx +1 -1
  118. package/components/inputs/InputText.jsx +1 -1
  119. package/components/inputs/InputToggle.tsx +1 -1
  120. package/{styles/v2/components/input → components/inputs}/_input-check-radio.scss +2 -2
  121. package/{styles/v2/components/input → components/inputs}/_input-group.scss +3 -3
  122. package/{styles/v2/components/input → components/inputs}/_input-slider.scss +2 -2
  123. package/{styles/v2/components/input → components/inputs}/_input.scss +5 -5
  124. package/{styles/v2/components/input → components/inputs}/index.scss +2 -2
  125. package/{styles → components}/loading.scss +1 -1
  126. package/components/managers/DataDesigner.tsx +1 -1
  127. package/{styles/v2/components → components/managers}/data-designer.scss +6 -7
  128. package/components/ui/Accordion.jsx +1 -1
  129. package/components/ui/Icon.tsx +1 -1
  130. package/components/ui/LoadSpin.jsx +1 -1
  131. package/components/ui/Modal.jsx +1 -1
  132. package/components/ui/Overlay.jsx +1 -1
  133. package/components/ui/Title/index.test.tsx +34 -0
  134. package/components/ui/Title/index.tsx +24 -7
  135. package/components/ui/Title/title.styles.css +119 -25
  136. package/components/ui/Tooltip.tsx +1 -1
  137. package/components/ui/_stories/Title.stories.tsx +1 -1
  138. package/{styles/v2/components → components/ui}/accordion.scss +3 -3
  139. package/components/ui/accordion.styles.css +11 -11
  140. package/{styles/v2/components → components/ui}/modal.scss +2 -2
  141. package/{styles/v2/components → components/ui}/overlay.scss +6 -6
  142. package/{styles/v2/components → components}/ui/tooltip.scss +1 -1
  143. package/{styles → components}/waiting.scss +9 -3
  144. package/data/colorPalettes.ts +18 -5
  145. package/data/mapColorPalettes.ts +10 -0
  146. package/devTemplate/dev.js +285 -0
  147. package/devTemplate/index.html +30 -0
  148. package/devTemplate/preview.html +1503 -0
  149. package/devTemplate/sidebar.css +151 -0
  150. package/dist/cove-main.css +2530 -3901
  151. package/dist/cove-main.css.map +1 -1
  152. package/generateViteConfig.js +111 -2
  153. package/helpers/DataTransform.ts +1 -5
  154. package/helpers/backfillDefaults.ts +35 -0
  155. package/helpers/constants.ts +12 -0
  156. package/helpers/cove/date.ts +64 -3
  157. package/helpers/cove/number.ts +29 -15
  158. package/helpers/cove/string.ts +29 -0
  159. package/helpers/coveUpdateWorker.ts +14 -8
  160. package/helpers/displayDataAsText.ts +1 -1
  161. package/helpers/embed/embedCodeGenerator.ts +80 -0
  162. package/helpers/embed/embedHelper.js +169 -0
  163. package/helpers/embed/filterUtils.ts +121 -0
  164. package/helpers/embed/index.ts +17 -0
  165. package/helpers/embed/urlValidation.ts +119 -0
  166. package/helpers/extractDataAndMetadata.ts +20 -0
  167. package/helpers/fetchRemoteData.ts +14 -8
  168. package/helpers/filterVizData.ts +6 -1
  169. package/helpers/getFileExtension.ts +0 -6
  170. package/helpers/labelHash.ts +9 -0
  171. package/helpers/markupProcessor.ts +56 -38
  172. package/helpers/metrics/types.ts +3 -0
  173. package/helpers/palettes/colorDistributions.ts +1 -1
  174. package/helpers/palettes/utils.ts +12 -12
  175. package/helpers/parseCsvWithQuotes.ts +15 -14
  176. package/helpers/prepareScreenshot.ts +33 -10
  177. package/helpers/testing.ts +44 -0
  178. package/helpers/tests/DataTransform.test.ts +125 -0
  179. package/helpers/tests/abbreviateNumber.test.ts +59 -0
  180. package/helpers/tests/backfillDefaults.test.ts +253 -0
  181. package/helpers/tests/date.test.ts +110 -0
  182. package/helpers/tests/extractDataAndMetadata.test.ts +93 -0
  183. package/helpers/tests/markupProcessor.test.ts +315 -124
  184. package/helpers/tests/number.test.ts +42 -0
  185. package/helpers/tests/prepareScreenshot.test.ts +28 -28
  186. package/helpers/tests/testStandaloneBuild.ts +36 -26
  187. package/helpers/tests/useDataVizClasses.test.ts +66 -0
  188. package/helpers/tests/visualizationWrapperUsage.test.ts +57 -0
  189. package/helpers/useDataVizClasses.ts +13 -7
  190. package/helpers/vegaConfig.ts +1 -1
  191. package/helpers/vegaConfigImport.ts +160 -0
  192. package/helpers/ver/4.24.4.ts +24 -0
  193. package/helpers/ver/4.26.1.ts +1 -1
  194. package/helpers/ver/4.26.2.ts +84 -0
  195. package/helpers/ver/4.26.3.ts +44 -0
  196. package/helpers/ver/4.26.4.ts +31 -0
  197. package/helpers/ver/tests/4.26.1.test.ts +105 -0
  198. package/helpers/ver/tests/4.26.2.test.ts +298 -0
  199. package/helpers/ver/tests/4.26.3.test.ts +168 -0
  200. package/helpers/ver/tests/4.26.4.test.ts +88 -0
  201. package/helpers/ver/tests/coveUpdateWorker.test.ts +57 -0
  202. package/helpers/viewports.ts +2 -0
  203. package/package.json +27 -32
  204. package/styles/_global.scss +7 -7
  205. package/styles/_reset.scss +2 -2
  206. package/styles/{v2/base → base}/_file-selector.scss +4 -4
  207. package/styles/{v2/base → base}/_general.scss +2 -4
  208. package/styles/{v2/base → base}/index.scss +1 -1
  209. package/styles/base.scss +107 -165
  210. package/styles/cove-main.scss +3 -6
  211. package/styles/layout/_component.scss +110 -0
  212. package/styles/{v2/layout → layout}/_data-table.scss +7 -7
  213. package/styles/layout/_wrapper-padding.scss +27 -0
  214. package/styles/{v2/main.scss → main.scss} +3 -1
  215. package/styles/{v2/themes → themes}/_color-definitions.scss +46 -41
  216. package/styles/{_accessibility.scss → utils/_accessibility.scss} +1 -1
  217. package/styles/{v2/utils → utils}/_grid.scss +8 -3
  218. package/styles/{_global-variables.scss → utils/_properties.scss} +133 -112
  219. package/styles/{v2/utils → utils}/index.scss +2 -1
  220. package/types/Annotation.ts +10 -11
  221. package/types/Axis.ts +2 -0
  222. package/types/ComponentStyles.ts +1 -0
  223. package/types/ConfigureData.ts +1 -0
  224. package/types/General.ts +2 -0
  225. package/types/MarkupInclude.ts +1 -0
  226. package/types/MarkupVariable.ts +2 -1
  227. package/types/Palette.ts +22 -0
  228. package/types/Table.ts +9 -0
  229. package/types/Visualization.ts +7 -0
  230. package/_stories/StoryRenderingTests.stories.tsx +0 -164
  231. package/helpers/embedCodeGenerator.ts +0 -109
  232. package/styles/_common-components.css +0 -73
  233. package/styles/_variables.scss +0 -63
  234. package/styles/v2/layout/_component.scss +0 -21
  235. package/styles/v2/utils/_variables.scss +0 -9
  236. package/{styles/v2/components/card.scss → components/elements/card.css} +2 -2
  237. /package/{styles/v2/components → components/ui}/icon.scss +0 -0
  238. /package/{styles/v2/components → components/ui}/loadspin.scss +0 -0
  239. /package/styles/{v2/base → base}/_heading.scss +0 -0
  240. /package/styles/{v2/base → base}/_reset.scss +0 -0
  241. /package/styles/{v2/layout → layout}/_alert.scss +0 -0
  242. /package/styles/{v2/layout → layout}/_progression.scss +0 -0
  243. /package/styles/{v2/layout → layout}/_tooltip.scss +0 -0
  244. /package/styles/{v2/layout → layout}/index.scss +0 -0
  245. /package/styles/{v2/themes → themes}/index.scss +0 -0
  246. /package/styles/{v2/utils → utils}/_align.scss +0 -0
  247. /package/styles/{v2/utils → utils}/_animations.scss +0 -0
  248. /package/styles/{v2/utils → utils}/_breakpoints.scss +0 -0
  249. /package/styles/{v2/utils → utils}/_mixins.scss +0 -0
@@ -0,0 +1,364 @@
1
+ {
2
+ "data": {
3
+ "name": "data"
4
+ },
5
+ "params": [
6
+ {
7
+ "name": "dateExtent",
8
+ "expr": "extent(pluck(data('data_0'), 'date'))"
9
+ },
10
+ {
11
+ "name": "dateMax",
12
+ "expr": "dateExtent[1]"
13
+ }
14
+ ],
15
+ "layer": [
16
+ {
17
+ "mark": "bar",
18
+ "encoding": {
19
+ "x": {
20
+ "field": "date",
21
+ "type": "temporal",
22
+ "timeUnit": "yearmonth",
23
+ "title": "Month of Report",
24
+ "axis": {
25
+ "format": "%b %Y",
26
+ "grid": false
27
+ }
28
+ },
29
+ "y": {
30
+ "aggregate": "sum",
31
+ "field": "measlesTotal",
32
+ "title": "Number of Cases"
33
+ },
34
+ "color": {
35
+ "field": "whoRegion",
36
+ "title": "WHO Region",
37
+ "scale": {
38
+ "domain": [
39
+ "AFRO",
40
+ "AMRO",
41
+ "EMRO",
42
+ "EURO",
43
+ "SEARO",
44
+ "WPRO"
45
+ ],
46
+ "range": [
47
+ "#2D72D2",
48
+ "#DB2C6F",
49
+ "#8EB125",
50
+ "#9D3F9D",
51
+ "#00A396",
52
+ "#D1980B"
53
+ ]
54
+ },
55
+ "legend": {
56
+ "orient": "top"
57
+ }
58
+ },
59
+ "tooltip": [
60
+ {
61
+ "field": "whoRegion",
62
+ "title": "WHO Region"
63
+ },
64
+ {
65
+ "field": "date",
66
+ "type": "temporal",
67
+ "title": "Month",
68
+ "format": "%b %Y"
69
+ },
70
+ {
71
+ "field": "sum_measlesTotal",
72
+ "title": "Number of Cases",
73
+ "type": "quantitative",
74
+ "format": ","
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ {
80
+ "transform": [
81
+ {
82
+ "filter": "datum.date < dateMax"
83
+ },
84
+ {
85
+ "calculate": "timeOffset('day', datum.date, 14)",
86
+ "as": "date_shifted"
87
+ },
88
+ {
89
+ "aggregate": [
90
+ {
91
+ "op": "sum",
92
+ "field": "measlesTotal",
93
+ "as": "cases"
94
+ }
95
+ ],
96
+ "groupby": [
97
+ "date",
98
+ "date_shifted"
99
+ ]
100
+ },
101
+ {
102
+ "window": [
103
+ {
104
+ "op": "mean",
105
+ "field": "cases",
106
+ "as": "cases_smooth"
107
+ }
108
+ ],
109
+ "frame": [
110
+ -1,
111
+ 1
112
+ ],
113
+ "sort": [
114
+ {
115
+ "field": "date_shifted",
116
+ "order": "ascending"
117
+ }
118
+ ]
119
+ }
120
+ ],
121
+ "mark": {
122
+ "type": "line",
123
+ "color": "black",
124
+ "strokeWidth": 2,
125
+ "strokeDash": [
126
+ 3,
127
+ 3
128
+ ]
129
+ },
130
+ "encoding": {
131
+ "x": {
132
+ "field": "date_shifted",
133
+ "type": "temporal"
134
+ },
135
+ "y": {
136
+ "aggregate": "sum",
137
+ "field": "cases_smooth"
138
+ },
139
+ "strokeWidth": {
140
+ "datum": "3-month average (all cases)",
141
+ "title": " ",
142
+ "legend": {
143
+ "labelLimit": 250,
144
+ "orient": "top"
145
+ }
146
+ },
147
+ "tooltip": [
148
+ {
149
+ "field": "cases_smooth",
150
+ "title": "Moving Average",
151
+ "format": ".1f"
152
+ }
153
+ ]
154
+ }
155
+ }
156
+ ],
157
+ "height": "container",
158
+ "width": "container",
159
+ "datasets": {
160
+ "data": [
161
+ {
162
+ "date": "2025-03-01T05:00:00.000Z",
163
+ "whoRegionDesc": "Africa",
164
+ "measlesTotal": 0,
165
+ "whoRegion": "AFRO"
166
+ },
167
+ {
168
+ "date": "2025-01-01T05:00:00.000Z",
169
+ "whoRegionDesc": "Europe",
170
+ "measlesTotal": 2,
171
+ "whoRegion": "EURO"
172
+ },
173
+ {
174
+ "date": "2024-11-01T04:00:00.000Z",
175
+ "whoRegionDesc": "Western Pacific",
176
+ "measlesTotal": 183,
177
+ "whoRegion": "WPRO"
178
+ },
179
+ {
180
+ "date": "2024-03-01T05:00:00.000Z",
181
+ "whoRegionDesc": "Western Pacific",
182
+ "measlesTotal": 0,
183
+ "whoRegion": "WPRO"
184
+ },
185
+ {
186
+ "date": "2024-06-01T04:00:00.000Z",
187
+ "whoRegionDesc": "Europe",
188
+ "measlesTotal": 57,
189
+ "whoRegion": "EURO"
190
+ },
191
+ {
192
+ "date": "2024-12-01T05:00:00.000Z",
193
+ "whoRegionDesc": "Americas",
194
+ "measlesTotal": 0,
195
+ "whoRegion": "AMRO"
196
+ },
197
+ {
198
+ "date": "2024-06-01T04:00:00.000Z",
199
+ "whoRegionDesc": "Eastern Mediterranean",
200
+ "measlesTotal": 1793,
201
+ "whoRegion": "EMRO"
202
+ },
203
+ {
204
+ "date": "2024-12-01T05:00:00.000Z",
205
+ "whoRegionDesc": "Africa",
206
+ "measlesTotal": 3,
207
+ "whoRegion": "AFRO"
208
+ },
209
+ {
210
+ "date": "2025-02-01T05:00:00.000Z",
211
+ "whoRegionDesc": "Southeast Asia",
212
+ "measlesTotal": 1597,
213
+ "whoRegion": "SEARO"
214
+ },
215
+ {
216
+ "date": "2024-04-01T04:00:00.000Z",
217
+ "whoRegionDesc": "Africa",
218
+ "measlesTotal": 104,
219
+ "whoRegion": "AFRO"
220
+ },
221
+ {
222
+ "date": "2024-02-01T05:00:00.000Z",
223
+ "whoRegionDesc": "Africa",
224
+ "measlesTotal": 141,
225
+ "whoRegion": "AFRO"
226
+ },
227
+ {
228
+ "date": "2025-02-01T05:00:00.000Z",
229
+ "whoRegionDesc": "Europe",
230
+ "measlesTotal": 1,
231
+ "whoRegion": "EURO"
232
+ },
233
+ {
234
+ "date": "2024-09-01T04:00:00.000Z",
235
+ "whoRegionDesc": "Africa",
236
+ "measlesTotal": 1,
237
+ "whoRegion": "AFRO"
238
+ },
239
+ {
240
+ "date": "2025-04-01T04:00:00.000Z",
241
+ "whoRegionDesc": "Europe",
242
+ "measlesTotal": 0,
243
+ "whoRegion": "EURO"
244
+ },
245
+ {
246
+ "date": "2024-07-01T04:00:00.000Z",
247
+ "whoRegionDesc": "Southeast Asia",
248
+ "measlesTotal": 731,
249
+ "whoRegion": "SEARO"
250
+ },
251
+ {
252
+ "date": "2025-02-01T05:00:00.000Z",
253
+ "whoRegionDesc": "Western Pacific",
254
+ "measlesTotal": 0,
255
+ "whoRegion": "WPRO"
256
+ },
257
+ {
258
+ "date": "2025-04-01T04:00:00.000Z",
259
+ "whoRegionDesc": "Africa",
260
+ "measlesTotal": 0,
261
+ "whoRegion": "AFRO"
262
+ },
263
+ {
264
+ "date": "2024-09-01T04:00:00.000Z",
265
+ "whoRegionDesc": "Africa",
266
+ "measlesTotal": 2,
267
+ "whoRegion": "AFRO"
268
+ },
269
+ {
270
+ "date": "2024-08-01T04:00:00.000Z",
271
+ "whoRegionDesc": "Europe",
272
+ "measlesTotal": 1,
273
+ "whoRegion": "EURO"
274
+ },
275
+ {
276
+ "date": "2025-01-01T05:00:00.000Z",
277
+ "whoRegionDesc": "Europe",
278
+ "measlesTotal": 20,
279
+ "whoRegion": "EURO"
280
+ }
281
+ ]
282
+ },
283
+ "config": {
284
+ "background": "#FFFFFF",
285
+ "bar": {
286
+ "fill": "#2D72D2"
287
+ },
288
+ "arc": {
289
+ "fill": "#2D72D2"
290
+ },
291
+ "area": {
292
+ "fill": "#2D72D2"
293
+ },
294
+ "rect": {
295
+ "fill": "#2D72D2"
296
+ },
297
+ "circle": {
298
+ "fill": "#2D72D2"
299
+ },
300
+ "point": {
301
+ "stroke": "#2D72D2"
302
+ },
303
+ "line": {
304
+ "stroke": "#2D72D2"
305
+ },
306
+ "font": "Source-Sans-Pro",
307
+ "padding": 20,
308
+ "mark": {
309
+ "opacity": 0.75,
310
+ "tooltip": true
311
+ },
312
+ "title": {
313
+ "color": "#111418",
314
+ "fontSize": 14,
315
+ "fontWeight": 600,
316
+ "anchor": "start",
317
+ "subtitleColor": "#5F6B7C",
318
+ "subtitleFontSize": 12,
319
+ "subtitlePadding": 7
320
+ },
321
+ "axis": {
322
+ "labelFontSize": 12,
323
+ "titleFontSize": 14,
324
+ "titleFontWeight": 400,
325
+ "titlePadding": 10,
326
+ "titleColor": "#111418",
327
+ "labelColor": "#738091",
328
+ "gridColor": "#DCE0E5",
329
+ "gridOpacity": 1,
330
+ "domainColor": "#5F6B7C",
331
+ "tickColor": "#5F6B7C"
332
+ },
333
+ "legend": {
334
+ "titleColor": "#111418",
335
+ "labelColor": "#111418",
336
+ "titleFontSize": 12,
337
+ "labelFontSize": 12,
338
+ "titleFontWeight": 600
339
+ },
340
+ "view": {
341
+ "stroke": "transparent"
342
+ },
343
+ "text": {
344
+ "color": "#111418",
345
+ "fontSize": 12,
346
+ "fontWeight": 400
347
+ },
348
+ "range": {
349
+ "category": [
350
+ "#2D72D2",
351
+ "#DB2C6F",
352
+ "#8EB125",
353
+ "#9D3F9D",
354
+ "#00A396",
355
+ "#D1980B",
356
+ "#D33D17",
357
+ "#7961DB",
358
+ "#29A634",
359
+ "#946638",
360
+ "#147EB3"
361
+ ]
362
+ }
363
+ }
364
+ }
@@ -0,0 +1,212 @@
1
+ {
2
+ "$schema": "https://vega.github.io/schema/vega/v5.json",
3
+ "description": "A basic stacked bar chart example.",
4
+ "width": 500,
5
+ "height": 200,
6
+ "padding": 5,
7
+ "data": [
8
+ {
9
+ "name": "table",
10
+ "values": [
11
+ {
12
+ "x": 0,
13
+ "y": 28,
14
+ "c": 0
15
+ },
16
+ {
17
+ "x": 0,
18
+ "y": 55,
19
+ "c": 1
20
+ },
21
+ {
22
+ "x": 1,
23
+ "y": 43,
24
+ "c": 0
25
+ },
26
+ {
27
+ "x": 1,
28
+ "y": 91,
29
+ "c": 1
30
+ },
31
+ {
32
+ "x": 2,
33
+ "y": 81,
34
+ "c": 0
35
+ },
36
+ {
37
+ "x": 2,
38
+ "y": 53,
39
+ "c": 1
40
+ },
41
+ {
42
+ "x": 3,
43
+ "y": 19,
44
+ "c": 0
45
+ },
46
+ {
47
+ "x": 3,
48
+ "y": 87,
49
+ "c": 1
50
+ },
51
+ {
52
+ "x": 4,
53
+ "y": 52,
54
+ "c": 0
55
+ },
56
+ {
57
+ "x": 4,
58
+ "y": 48,
59
+ "c": 1
60
+ },
61
+ {
62
+ "x": 5,
63
+ "y": 24,
64
+ "c": 0
65
+ },
66
+ {
67
+ "x": 5,
68
+ "y": 49,
69
+ "c": 1
70
+ },
71
+ {
72
+ "x": 6,
73
+ "y": 87,
74
+ "c": 0
75
+ },
76
+ {
77
+ "x": 6,
78
+ "y": 66,
79
+ "c": 1
80
+ },
81
+ {
82
+ "x": 7,
83
+ "y": 17,
84
+ "c": 0
85
+ },
86
+ {
87
+ "x": 7,
88
+ "y": 27,
89
+ "c": 1
90
+ },
91
+ {
92
+ "x": 8,
93
+ "y": 68,
94
+ "c": 0
95
+ },
96
+ {
97
+ "x": 8,
98
+ "y": 16,
99
+ "c": 1
100
+ },
101
+ {
102
+ "x": 9,
103
+ "y": 49,
104
+ "c": 0
105
+ },
106
+ {
107
+ "x": 9,
108
+ "y": 15,
109
+ "c": 1
110
+ }
111
+ ],
112
+ "transform": [
113
+ {
114
+ "type": "stack",
115
+ "groupby": [
116
+ "x"
117
+ ],
118
+ "sort": {
119
+ "field": "c"
120
+ },
121
+ "field": "y"
122
+ }
123
+ ]
124
+ }
125
+ ],
126
+ "scales": [
127
+ {
128
+ "name": "x",
129
+ "type": "band",
130
+ "range": "width",
131
+ "domain": {
132
+ "data": "table",
133
+ "field": "x"
134
+ }
135
+ },
136
+ {
137
+ "name": "y",
138
+ "type": "linear",
139
+ "range": "height",
140
+ "nice": true,
141
+ "zero": true,
142
+ "domain": {
143
+ "data": "table",
144
+ "field": "y1"
145
+ }
146
+ },
147
+ {
148
+ "name": "color",
149
+ "type": "ordinal",
150
+ "range": "category",
151
+ "domain": {
152
+ "data": "table",
153
+ "field": "c"
154
+ }
155
+ }
156
+ ],
157
+ "axes": [
158
+ {
159
+ "orient": "bottom",
160
+ "scale": "x",
161
+ "zindex": 1
162
+ },
163
+ {
164
+ "orient": "left",
165
+ "scale": "y",
166
+ "zindex": 1
167
+ }
168
+ ],
169
+ "marks": [
170
+ {
171
+ "type": "rect",
172
+ "from": {
173
+ "data": "table"
174
+ },
175
+ "encode": {
176
+ "enter": {
177
+ "x": {
178
+ "scale": "x",
179
+ "field": "x"
180
+ },
181
+ "width": {
182
+ "scale": "x",
183
+ "band": 1,
184
+ "offset": -1
185
+ },
186
+ "y": {
187
+ "scale": "y",
188
+ "field": "y0"
189
+ },
190
+ "y2": {
191
+ "scale": "y",
192
+ "field": "y1"
193
+ },
194
+ "fill": {
195
+ "scale": "color",
196
+ "field": "c"
197
+ }
198
+ },
199
+ "update": {
200
+ "fillOpacity": {
201
+ "value": 1
202
+ }
203
+ },
204
+ "hover": {
205
+ "fillOpacity": {
206
+ "value": 0.5
207
+ }
208
+ }
209
+ }
210
+ }
211
+ ]
212
+ }
@@ -0,0 +1,140 @@
1
+ {
2
+ "$schema": "https://vega.github.io/schema/vega-lite/v6.json",
3
+ "data": {
4
+ "values": [
5
+ {
6
+ "yield": 27,
7
+ "variety": "Manchuria",
8
+ "year": 1931,
9
+ "site": "University Farm"
10
+ },
11
+ {
12
+ "yield": 48.86667,
13
+ "variety": "Manchuria",
14
+ "year": 1931,
15
+ "site": "Waseca"
16
+ },
17
+ {
18
+ "yield": 27.43334,
19
+ "variety": "Manchuria",
20
+ "year": 1931,
21
+ "site": "Morris"
22
+ },
23
+ {
24
+ "yield": 39.93333,
25
+ "variety": "Manchuria",
26
+ "year": 1931,
27
+ "site": "Crookston"
28
+ },
29
+ {
30
+ "yield": 32.96667,
31
+ "variety": "Manchuria",
32
+ "year": 1931,
33
+ "site": "Grand Rapids"
34
+ },
35
+ {
36
+ "yield": 28.96667,
37
+ "variety": "Manchuria",
38
+ "year": 1931,
39
+ "site": "Duluth"
40
+ },
41
+ {
42
+ "yield": 43.06666,
43
+ "variety": "Glabron",
44
+ "year": 1931,
45
+ "site": "University Farm"
46
+ },
47
+ {
48
+ "yield": 55.2,
49
+ "variety": "Glabron",
50
+ "year": 1931,
51
+ "site": "Waseca"
52
+ },
53
+ {
54
+ "yield": 28.76667,
55
+ "variety": "Glabron",
56
+ "year": 1931,
57
+ "site": "Morris"
58
+ },
59
+ {
60
+ "yield": 38.13333,
61
+ "variety": "Glabron",
62
+ "year": 1931,
63
+ "site": "Crookston"
64
+ },
65
+ {
66
+ "yield": 29.13333,
67
+ "variety": "Glabron",
68
+ "year": 1931,
69
+ "site": "Grand Rapids"
70
+ },
71
+ {
72
+ "yield": 29.66667,
73
+ "variety": "Glabron",
74
+ "year": 1931,
75
+ "site": "Duluth"
76
+ },
77
+ {
78
+ "yield": 35.13333,
79
+ "variety": "Svansota",
80
+ "year": 1931,
81
+ "site": "University Farm"
82
+ },
83
+ {
84
+ "yield": 47.33333,
85
+ "variety": "Svansota",
86
+ "year": 1931,
87
+ "site": "Waseca"
88
+ },
89
+ {
90
+ "yield": 25.76667,
91
+ "variety": "Svansota",
92
+ "year": 1931,
93
+ "site": "Morris"
94
+ },
95
+ {
96
+ "yield": 40.46667,
97
+ "variety": "Svansota",
98
+ "year": 1931,
99
+ "site": "Crookston"
100
+ },
101
+ {
102
+ "yield": 29.66667,
103
+ "variety": "Svansota",
104
+ "year": 1931,
105
+ "site": "Grand Rapids"
106
+ },
107
+ {
108
+ "yield": 25.7,
109
+ "variety": "Svansota",
110
+ "year": 1931,
111
+ "site": "Duluth"
112
+ },
113
+ {
114
+ "yield": 39.9,
115
+ "variety": "Velvet",
116
+ "year": 1931,
117
+ "site": "University Farm"
118
+ },
119
+ {
120
+ "yield": 50.23333,
121
+ "variety": "Velvet",
122
+ "year": 1931,
123
+ "site": "Waseca"
124
+ }
125
+ ]
126
+ },
127
+ "mark": "bar",
128
+ "encoding": {
129
+ "x": {
130
+ "aggregate": "sum",
131
+ "field": "yield"
132
+ },
133
+ "y": {
134
+ "field": "variety"
135
+ },
136
+ "color": {
137
+ "field": "site"
138
+ }
139
+ }
140
+ }