@cdc/map 2.6.3 → 9.22.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.
Files changed (73) hide show
  1. package/dist/cdcmap.js +32 -18
  2. package/examples/bubble-us.json +363 -0
  3. package/examples/bubble-world.json +427 -0
  4. package/examples/default-county.json +64 -12
  5. package/examples/default-hex.json +477 -0
  6. package/examples/default-usa-regions.json +118 -0
  7. package/examples/default-usa.json +1 -1
  8. package/examples/default-world-data.json +1450 -0
  9. package/examples/default-world.json +5 -3
  10. package/examples/example-city-state.json +46 -1
  11. package/examples/gallery/categorical-qualitative.json +797 -0
  12. package/examples/gallery/categorical-scale-based.json +739 -0
  13. package/examples/gallery/city-state.json +479 -0
  14. package/examples/gallery/county.json +22731 -0
  15. package/examples/gallery/equal-interval.json +1027 -0
  16. package/examples/gallery/equal-number.json +1027 -0
  17. package/examples/gallery/filterable.json +909 -0
  18. package/examples/gallery/hex-filtered.json +420 -0
  19. package/examples/gallery/hex.json +413 -0
  20. package/examples/gallery/single-state.json +21402 -0
  21. package/examples/gallery/world.json +1592 -0
  22. package/examples/private/atsdr.json +439 -0
  23. package/examples/private/atsdr_new.json +436 -0
  24. package/examples/private/bubble.json +285 -0
  25. package/examples/private/city-state.json +428 -0
  26. package/examples/private/cty-issue.json +42768 -0
  27. package/examples/private/default-usa.json +460 -0
  28. package/examples/private/default-world-data.json +1444 -0
  29. package/examples/private/default.json +968 -0
  30. package/examples/private/legend-issue.json +1 -0
  31. package/examples/private/map-rounding-error.json +42759 -0
  32. package/examples/private/map.csv +60 -0
  33. package/examples/private/mdx.json +210 -0
  34. package/examples/private/monkeypox.json +376 -0
  35. package/examples/private/regions.json +52 -0
  36. package/examples/private/valid-data-map.csv +59 -0
  37. package/examples/private/wcmsrd-13881-data.json +2858 -0
  38. package/examples/private/wcmsrd-13881.json +5823 -0
  39. package/examples/private/wcmsrd-14492-data.json +292 -0
  40. package/examples/private/wcmsrd-14492.json +114 -0
  41. package/examples/private/wcmsrd-test.json +268 -0
  42. package/examples/private/world.json +1580 -0
  43. package/examples/private/worldmap.json +1490 -0
  44. package/package.json +51 -50
  45. package/src/CdcMap.js +496 -158
  46. package/src/components/BubbleList.js +244 -0
  47. package/src/components/CityList.js +41 -5
  48. package/src/components/CountyMap.js +16 -6
  49. package/src/components/DataTable.js +25 -18
  50. package/src/components/EditorPanel.js +915 -404
  51. package/src/components/Geo.js +1 -1
  52. package/src/components/Modal.js +2 -1
  53. package/src/components/NavigationMenu.js +4 -3
  54. package/src/components/Sidebar.js +14 -19
  55. package/src/components/SingleStateMap.js +11 -5
  56. package/src/components/UsaMap.js +103 -36
  57. package/src/components/UsaRegionMap.js +320 -0
  58. package/src/components/WorldMap.js +116 -34
  59. package/src/data/country-coordinates.js +250 -0
  60. package/src/data/{dfc-map.json → county-map.json} +0 -0
  61. package/src/data/initial-state.js +20 -2
  62. package/src/data/state-coordinates.js +55 -0
  63. package/src/data/supported-geos.js +96 -15
  64. package/src/data/us-regions-topo-2.json +360525 -0
  65. package/src/data/us-regions-topo.json +37894 -0
  66. package/src/hooks/useColorPalette.ts +96 -0
  67. package/src/index.html +7 -4
  68. package/src/scss/editor-panel.scss +78 -57
  69. package/src/scss/main.scss +1 -1
  70. package/src/scss/map.scss +112 -2
  71. package/src/scss/sidebar.scss +2 -1
  72. package/src/data/color-palettes.js +0 -200
  73. package/src/images/map-folded.svg +0 -1
@@ -0,0 +1,427 @@
1
+ {
2
+ "defaultData": true,
3
+ "general": {
4
+ "title": "Default World Map",
5
+ "subtext": "",
6
+ "type": "bubble",
7
+ "geoType": "world",
8
+ "headerColor": "theme-blue",
9
+ "geoBorderColor": "darkGray",
10
+ "showSidebar": true,
11
+ "showTitle": true,
12
+ "showDownloadButton": true,
13
+ "expandDataTable": true
14
+ },
15
+ "color": "redreverse",
16
+ "columns": {
17
+ "geo": {
18
+ "name": "Country",
19
+ "label": "Location",
20
+ "tooltip": false,
21
+ "dataTable": true
22
+ },
23
+ "primary": {
24
+ "name": "Cases",
25
+ "label": "Total Confirmed Cases",
26
+ "prefix": "",
27
+ "suffix": "",
28
+ "dataTable": true,
29
+ "tooltip": true
30
+ },
31
+ "navigate": {
32
+ "name": "Link",
33
+ "tooltip": false,
34
+ "dataTable": false
35
+ }
36
+ },
37
+ "legend": {
38
+ "numberOfItems": 1,
39
+ "position": "side",
40
+ "title": "Legend Title",
41
+ "description": "Legend Text",
42
+ "type": "equalnumber",
43
+ "specialClasses": [
44
+ "N/A"
45
+ ]
46
+ },
47
+ "data": [
48
+ {
49
+ "Country": "Argentina",
50
+ "Cases": "9",
51
+ "Category": "Has not historically reported monkeypox",
52
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
53
+ },
54
+ {
55
+ "Country": "Australia",
56
+ "Cases": "23",
57
+ "Category": "Has not historically reported monkeypox",
58
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
59
+ },
60
+ {
61
+ "Country": "Austria",
62
+ "Cases": "62",
63
+ "Category": "Has not historically reported monkeypox",
64
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
65
+ },
66
+ {
67
+ "Country": "Bahamas",
68
+ "Cases": "1",
69
+ "Category": "Has not historically reported monkeypox",
70
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
71
+ },
72
+ {
73
+ "Country": "Belgium",
74
+ "Cases": "168",
75
+ "Category": "Has not historically reported monkeypox",
76
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
77
+ },
78
+ {
79
+ "Country": "Benin",
80
+ "Cases": "3",
81
+ "Category": "Has not historically reported monkeypox",
82
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
83
+ },
84
+ {
85
+ "Country": "Brazil",
86
+ "Cases": "218",
87
+ "Category": "Has not historically reported monkeypox",
88
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
89
+ },
90
+ {
91
+ "Country": "Bulgaria",
92
+ "Cases": "3",
93
+ "Category": "Has not historically reported monkeypox",
94
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
95
+ },
96
+ {
97
+ "Country": "Cameroon",
98
+ "Cases": "3",
99
+ "Category": "Has historically reported monkeypox",
100
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
101
+ },
102
+ {
103
+ "Country": "Canada",
104
+ "Cases": "375",
105
+ "Category": "Has not historically reported monkeypox",
106
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
107
+ },
108
+ {
109
+ "Country": "Central African Republic",
110
+ "Cases": "8",
111
+ "Category": "Has historically reported monkeypox",
112
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
113
+ },
114
+ {
115
+ "Country": "Chile",
116
+ "Cases": "13",
117
+ "Category": "Has not historically reported monkeypox",
118
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
119
+ },
120
+ {
121
+ "Country": "Colombia",
122
+ "Cases": "6",
123
+ "Category": "Has not historically reported monkeypox",
124
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
125
+ },
126
+ {
127
+ "Country": "Croatia",
128
+ "Cases": "1",
129
+ "Category": "Has not historically reported monkeypox",
130
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
131
+ },
132
+ {
133
+ "Country": "Czechia",
134
+ "Cases": "11",
135
+ "Category": "Has not historically reported monkeypox",
136
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
137
+ },
138
+ {
139
+ "Country": "Democratic Republic of the Congo",
140
+ "Cases": "107",
141
+ "Category": "Has historically reported monkeypox",
142
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
143
+ },
144
+ {
145
+ "Country": "Denmark",
146
+ "Cases": "29",
147
+ "Category": "Has not historically reported monkeypox",
148
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
149
+ },
150
+ {
151
+ "Country": "Dominican Republic",
152
+ "Cases": "1",
153
+ "Category": "Has not historically reported monkeypox",
154
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
155
+ },
156
+ {
157
+ "Country": "Ecuador",
158
+ "Cases": "1",
159
+ "Category": "Has not historically reported monkeypox",
160
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
161
+ },
162
+ {
163
+ "Country": "Estonia",
164
+ "Cases": "2",
165
+ "Category": "Has not historically reported monkeypox",
166
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
167
+ },
168
+ {
169
+ "Country": "Finland",
170
+ "Cases": "13",
171
+ "Category": "Has not historically reported monkeypox",
172
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
173
+ },
174
+ {
175
+ "Country": "France",
176
+ "Cases": "721",
177
+ "Category": "Has not historically reported monkeypox",
178
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
179
+ },
180
+ {
181
+ "Country": "Georgia",
182
+ "Cases": "1",
183
+ "Category": "Has not historically reported monkeypox",
184
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
185
+ },
186
+ {
187
+ "Country": "Germany",
188
+ "Cases": "1556",
189
+ "Category": "Has not historically reported monkeypox",
190
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
191
+ },
192
+ {
193
+ "Country": "Ghana",
194
+ "Cases": "19",
195
+ "Category": "Has historically reported monkeypox",
196
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
197
+ },
198
+ {
199
+ "Country": "Gibraltar",
200
+ "Cases": "1",
201
+ "Category": "Has not historically reported monkeypox",
202
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
203
+ },
204
+ {
205
+ "Country": "Greece",
206
+ "Cases": "11",
207
+ "Category": "Has not historically reported monkeypox",
208
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
209
+ },
210
+ {
211
+ "Country": "Hungary",
212
+ "Cases": "24",
213
+ "Category": "Has not historically reported monkeypox",
214
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
215
+ },
216
+ {
217
+ "Country": "Iceland",
218
+ "Cases": "6",
219
+ "Category": "Has not historically reported monkeypox",
220
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
221
+ },
222
+ {
223
+ "Country": "Ireland",
224
+ "Cases": "44",
225
+ "Category": "Has not historically reported monkeypox",
226
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
227
+ },
228
+ {
229
+ "Country": "Israel",
230
+ "Cases": "66",
231
+ "Category": "Has not historically reported monkeypox",
232
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
233
+ },
234
+ {
235
+ "Country": "Italy",
236
+ "Cases": "255",
237
+ "Category": "Has not historically reported monkeypox",
238
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
239
+ },
240
+ {
241
+ "Country": "Jamaica",
242
+ "Cases": "1",
243
+ "Category": "Has not historically reported monkeypox",
244
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
245
+ },
246
+ {
247
+ "Country": "Latvia",
248
+ "Cases": "2",
249
+ "Category": "Has not historically reported monkeypox",
250
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
251
+ },
252
+ {
253
+ "Country": "Lebanon",
254
+ "Cases": "1",
255
+ "Category": "Has not historically reported monkeypox",
256
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
257
+ },
258
+ {
259
+ "Country": "Luxembourg",
260
+ "Cases": "6",
261
+ "Category": "Has not historically reported monkeypox",
262
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
263
+ },
264
+ {
265
+ "Country": "Malta",
266
+ "Cases": "8",
267
+ "Category": "Has not historically reported monkeypox",
268
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
269
+ },
270
+ {
271
+ "Country": "Mexico",
272
+ "Cases": "35",
273
+ "Category": "Has not historically reported monkeypox",
274
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
275
+ },
276
+ {
277
+ "Country": "Morocco",
278
+ "Cases": "1",
279
+ "Category": "Has not historically reported monkeypox",
280
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
281
+ },
282
+ {
283
+ "Country": "Netherlands",
284
+ "Cases": "503",
285
+ "Category": "Has not historically reported monkeypox",
286
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
287
+ },
288
+ {
289
+ "Country": "Nigeria",
290
+ "Cases": "84",
291
+ "Category": "Has historically reported monkeypox",
292
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
293
+ },
294
+ {
295
+ "Country": "Norway",
296
+ "Cases": "19",
297
+ "Category": "Has not historically reported monkeypox",
298
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
299
+ },
300
+ {
301
+ "Country": "Panama",
302
+ "Cases": "1",
303
+ "Category": "Has not historically reported monkeypox",
304
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
305
+ },
306
+ {
307
+ "Country": "Peru",
308
+ "Cases": "18",
309
+ "Category": "Has not historically reported monkeypox",
310
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
311
+ },
312
+ {
313
+ "Country": "Poland",
314
+ "Cases": "19",
315
+ "Category": "Has not historically reported monkeypox",
316
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
317
+ },
318
+ {
319
+ "Country": "Portugal",
320
+ "Cases": "473",
321
+ "Category": "Has not historically reported monkeypox",
322
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
323
+ },
324
+ {
325
+ "Country": "Republic of the Congo",
326
+ "Cases": "2",
327
+ "Category": "Has historically reported monkeypox",
328
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
329
+ },
330
+ {
331
+ "Country": "Romania",
332
+ "Cases": "14",
333
+ "Category": "Has not historically reported monkeypox",
334
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
335
+ },
336
+ {
337
+ "Country": "Serbia",
338
+ "Cases": "1",
339
+ "Category": "Has not historically reported monkeypox",
340
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
341
+ },
342
+ {
343
+ "Country": "Singapore",
344
+ "Cases": "2",
345
+ "Category": "Has not historically reported monkeypox",
346
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
347
+ },
348
+ {
349
+ "Country": "Slovakia",
350
+ "Cases": "1",
351
+ "Category": "Has not historically reported monkeypox",
352
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
353
+ },
354
+ {
355
+ "Country": "Slovenia",
356
+ "Cases": "18",
357
+ "Category": "Has not historically reported monkeypox",
358
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
359
+ },
360
+ {
361
+ "Country": "South Africa",
362
+ "Cases": "3",
363
+ "Category": "Has not historically reported monkeypox",
364
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
365
+ },
366
+ {
367
+ "Country": "South Korea",
368
+ "Cases": "1",
369
+ "Category": "Has not historically reported monkeypox",
370
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
371
+ },
372
+ {
373
+ "Country": "Spain",
374
+ "Cases": "2034",
375
+ "Category": "Has not historically reported monkeypox",
376
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
377
+ },
378
+ {
379
+ "Country": "Sweden",
380
+ "Cases": "43",
381
+ "Category": "Has not historically reported monkeypox",
382
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
383
+ },
384
+ {
385
+ "Country": "Switzerland",
386
+ "Cases": "163",
387
+ "Category": "Has not historically reported monkeypox",
388
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
389
+ },
390
+ {
391
+ "Country": "Taiwan",
392
+ "Cases": "1",
393
+ "Category": "Has not historically reported monkeypox",
394
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
395
+ },
396
+ {
397
+ "Country": "Turkey",
398
+ "Cases": "1",
399
+ "Category": "Has not historically reported monkeypox",
400
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
401
+ },
402
+ {
403
+ "Country": "United Arab Emirates",
404
+ "Cases": "13",
405
+ "Category": "Has not historically reported monkeypox",
406
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
407
+ },
408
+ {
409
+ "Country": "United Kingdom",
410
+ "Cases": "1552",
411
+ "Category": "Has not historically reported monkeypox",
412
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
413
+ },
414
+ {
415
+ "Country": "United States",
416
+ "Cases": "0",
417
+ "Category": "Has not historically reported monkeypox",
418
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
419
+ },
420
+ {
421
+ "Country": "Venezuela",
422
+ "Cases": "1",
423
+ "Category": "Has not historically reported monkeypox",
424
+ "AsOf": "11 Jul 2022 5:00 PM EDT"
425
+ }
426
+ ]
427
+ }
@@ -1,5 +1,4 @@
1
1
  {
2
- "type": "map",
3
2
  "general": {
4
3
  "title": "Default County Map",
5
4
  "subtext": "",
@@ -11,8 +10,26 @@
11
10
  "showTitle": true,
12
11
  "geoBorderColor": "darkGray",
13
12
  "showDownloadButton": true,
14
- "expandDataTable": false
13
+ "expandDataTable": false,
14
+ "showDownloadMediaButton": false,
15
+ "displayAsHex": false,
16
+ "displayStateLabels": false,
17
+ "language": "en",
18
+ "hasRegions": false,
19
+ "fullBorder": false,
20
+ "palette": {
21
+ "isReversed": false
22
+ },
23
+ "allowMapZoom": true,
24
+ "hideGeoColumnInTooltip": false,
25
+ "hidePrimaryColumnInTooltip": false,
26
+ "statePicked": {
27
+ "fipsCode": "01",
28
+ "stateName": "Alabama"
29
+ },
30
+ "equalNumberOptIn": true
15
31
  },
32
+ "type": "map",
16
33
  "color": "pinkpurple",
17
34
  "columns": {
18
35
  "geo": {
@@ -41,65 +58,100 @@
41
58
  "title": "Legend Title",
42
59
  "description": "Legend Text",
43
60
  "type": "equalnumber",
44
- "specialClasses": ["N/A"]
61
+ "specialClasses": [
62
+ {
63
+ "key": "Insured Rate",
64
+ "value": "18",
65
+ "label": "18"
66
+ }
67
+ ],
68
+ "descriptions": {},
69
+ "unified": false,
70
+ "singleColumn": false,
71
+ "dynamicDescription": false
45
72
  },
46
73
  "filters": [],
74
+ "dataTable": {
75
+ "title": "Data Table",
76
+ "forceDisplay": true
77
+ },
78
+ "tooltips": {
79
+ "appearanceType": "hover",
80
+ "linkLabel": "Learn More",
81
+ "capitalizeLabels": true
82
+ },
83
+ "runtime": {
84
+ "editorErrorMessage": []
85
+ },
86
+ "visual": {
87
+ "minBubbleSize": 1,
88
+ "maxBubbleSize": 20,
89
+ "extraBubbleBorder": false,
90
+ "cityStyle": "circle"
91
+ },
92
+ "mapPosition": {
93
+ "coordinates": [
94
+ 0,
95
+ 30
96
+ ],
97
+ "zoom": 1
98
+ },
47
99
  "data": [
48
100
  {
49
- "Insured Rate": "8",
101
+ "Insured Rate": 8,
50
102
  "Coverage Status": "Insured",
51
103
  "FIPS Codes": "06071",
52
104
  "Year (Good filter option)": "2010",
53
105
  "link": ""
54
106
  },
55
107
  {
56
- "Insured Rate": "25",
108
+ "Insured Rate": 0,
57
109
  "Coverage Status": "Insured",
58
110
  "FIPS Codes": "55005",
59
111
  "Year (Good filter option)": "2010",
60
112
  "link": "https://cdc.gov"
61
113
  },
62
114
  {
63
- "Insured Rate": "25",
115
+ "Insured Rate": 25,
64
116
  "Coverage Status": "Insured",
65
117
  "FIPS Codes": "12103",
66
118
  "Year (Good filter option)": "2010",
67
119
  "link": ""
68
120
  },
69
121
  {
70
- "Insured Rate": "25",
122
+ "Insured Rate": 25,
71
123
  "Coverage Status": "Insured",
72
124
  "FIPS Codes": "32005",
73
125
  "Year (Good filter option)": "2010",
74
126
  "link": ""
75
127
  },
76
128
  {
77
- "Insured Rate": "18",
129
+ "Insured Rate": 18,
78
130
  "Coverage Status": "Insured",
79
131
  "FIPS Codes": "06075",
80
132
  "Year (Good filter option)": "2010",
81
133
  "link": ""
82
134
  },
83
135
  {
84
- "Insured Rate": "3",
136
+ "Insured Rate": 3,
85
137
  "Coverage Status": "Insured",
86
138
  "FIPS Codes": "06027",
87
139
  "Year (Good filter option)": "2010",
88
140
  "link": ""
89
141
  },
90
142
  {
91
- "Insured Rate": "25",
143
+ "Insured Rate": 25,
92
144
  "Coverage Status": "Insured",
93
145
  "FIPS Codes": "06029",
94
146
  "Year (Good filter option)": "2010",
95
147
  "link": ""
96
148
  },
97
149
  {
98
- "Insured Rate": "60",
150
+ "Insured Rate": 60,
99
151
  "Coverage Status": "Insured",
100
152
  "FIPS Codes": "06065",
101
153
  "Year (Good filter option)": "2010",
102
154
  "link": ""
103
155
  }
104
156
  ]
105
- }
157
+ }