@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,477 @@
1
+ {
2
+ "general": {
3
+ "title": "Example Data Map with Cities",
4
+ "subtext": "*: Lorem ipsum; NA: Lorem ipsum.",
5
+ "type": "data",
6
+ "geoType": "us",
7
+ "headerColor": "theme-cyan",
8
+ "showSidebar": true,
9
+ "showTitle": true,
10
+ "showDownloadButton": true,
11
+ "expandDataTable": true,
12
+ "backgroundColor": "#f5f5f5",
13
+ "geoBorderColor": "darkGray",
14
+ "territoriesLabel": "Territories",
15
+ "language": "en",
16
+ "hasRegions": false,
17
+ "displayAsHex": true
18
+ },
19
+ "filters": [{ "label": "", "values": [], "columnName": "Condition" }],
20
+ "columns": {
21
+ "geo": {
22
+ "dataTable": true,
23
+ "label": "",
24
+ "name": "STATE",
25
+ "tooltip": false
26
+ },
27
+ "primary": {
28
+ "dataTable": true,
29
+ "label": "Rate",
30
+ "name": "Rate",
31
+ "prefix": "",
32
+ "suffix": "",
33
+ "tooltip": false
34
+ },
35
+ "navigate": {
36
+ "dataTable": false,
37
+ "name": "",
38
+ "tooltip": false
39
+ },
40
+ "additionalColumn1": {
41
+ "label": "Location",
42
+ "dataTable": true,
43
+ "tooltips": false,
44
+ "prefix": "",
45
+ "suffix": "",
46
+ "name": "Location",
47
+ "tooltip": true
48
+ },
49
+ "geosInRegion": {
50
+ "name": ""
51
+ }
52
+ },
53
+ "legend": {
54
+ "numberOfItems": 3,
55
+ "position": "side",
56
+ "title": "Legend Title",
57
+ "description": "Legend Text",
58
+ "type": "equalnumber",
59
+ "specialClasses": [
60
+ "*",
61
+ "NA"
62
+ ],
63
+ "unified": false,
64
+ "singleColumn": false,
65
+ "dynamicDescription": false
66
+ },
67
+ "data": [
68
+ {
69
+ "STATE": "AL",
70
+ "Rate": 10,
71
+ "Location": "Home",
72
+ "URL": "https://www.cdc.gov/"
73
+ },
74
+ {
75
+ "STATE": "AK",
76
+ "Rate": 12,
77
+ "Location": "Vehicle",
78
+ "URL": "https://www.cdc.gov/"
79
+ },
80
+ {
81
+ "STATE": "AS",
82
+ "Rate": 14,
83
+ "Location": "Work",
84
+ "URL": "https://www.cdc.gov/"
85
+ },
86
+ {
87
+ "STATE": "AZ",
88
+ "Rate": 9,
89
+ "Location": "School",
90
+ "URL": "https://www.cdc.gov/"
91
+ },
92
+ {
93
+ "STATE": "AR",
94
+ "Rate": 17,
95
+ "Location": "School",
96
+ "URL": "https://www.cdc.gov/"
97
+ },
98
+ {
99
+ "STATE": "CA",
100
+ "Rate": "*",
101
+ "Location": "Work",
102
+ "URL": "https://www.cdc.gov/"
103
+ },
104
+ {
105
+ "STATE": "CO",
106
+ "Rate": 22,
107
+ "Location": "Vehicle",
108
+ "URL": "https://www.cdc.gov/"
109
+ },
110
+ {
111
+ "STATE": "CT",
112
+ "Rate": 10,
113
+ "Location": "Home",
114
+ "URL": "https://www.cdc.gov/"
115
+ },
116
+ {
117
+ "STATE": "DE",
118
+ "Rate": 12,
119
+ "Location": "Home",
120
+ "URL": "https://www.cdc.gov/"
121
+ },
122
+ {
123
+ "STATE": "District of Columbia",
124
+ "Rate": 14,
125
+ "Location": "Home",
126
+ "URL": "https://www.cdc.gov/"
127
+ },
128
+ {
129
+ "STATE": "FL",
130
+ "Rate": 9,
131
+ "Location": "Vehicle",
132
+ "URL": "https://www.cdc.gov/"
133
+ },
134
+ {
135
+ "STATE": "GA",
136
+ "Rate": 17,
137
+ "Location": "Work",
138
+ "URL": "https://www.cdc.gov/"
139
+ },
140
+ {
141
+ "STATE": "GU",
142
+ "Rate": 20,
143
+ "Location": "School",
144
+ "URL": "https://www.cdc.gov/"
145
+ },
146
+ {
147
+ "STATE": "HI",
148
+ "Rate": 22,
149
+ "Location": "School",
150
+ "URL": "https://www.cdc.gov/"
151
+ },
152
+ {
153
+ "STATE": "ID",
154
+ "Rate": "*",
155
+ "Location": "Work",
156
+ "URL": "https://www.cdc.gov/"
157
+ },
158
+ {
159
+ "STATE": "IL",
160
+ "Rate": 12,
161
+ "Location": "Vehicle",
162
+ "URL": "https://www.cdc.gov/"
163
+ },
164
+ {
165
+ "STATE": "IN",
166
+ "Rate": 14,
167
+ "Location": "Home",
168
+ "URL": "https://www.cdc.gov/"
169
+ },
170
+ {
171
+ "STATE": "IA",
172
+ "Rate": 9,
173
+ "Location": "Home",
174
+ "URL": "https://www.cdc.gov/"
175
+ },
176
+ {
177
+ "STATE": "KS",
178
+ "Rate": "NA",
179
+ "Location": "Home",
180
+ "URL": "https://www.cdc.gov/"
181
+ },
182
+ {
183
+ "STATE": "KY",
184
+ "Rate": 20,
185
+ "Location": "Vehicle",
186
+ "URL": "https://www.cdc.gov/"
187
+ },
188
+ {
189
+ "STATE": "LA",
190
+ "Rate": 22,
191
+ "Location": "Work",
192
+ "URL": "https://www.cdc.gov/"
193
+ },
194
+ {
195
+ "STATE": "ME",
196
+ "Rate": 10,
197
+ "Location": "School",
198
+ "URL": "https://www.cdc.gov/"
199
+ },
200
+ {
201
+ "STATE": "MH",
202
+ "Rate": 12,
203
+ "Location": "School",
204
+ "URL": "https://www.cdc.gov/"
205
+ },
206
+ {
207
+ "STATE": "MD",
208
+ "Rate": "*",
209
+ "Location": "Work",
210
+ "URL": "https://www.cdc.gov/"
211
+ },
212
+ {
213
+ "STATE": "MA",
214
+ "Rate": 9,
215
+ "Location": "Vehicle",
216
+ "URL": "https://www.cdc.gov/"
217
+ },
218
+ {
219
+ "STATE": "MI",
220
+ "Rate": 17,
221
+ "Location": "Home",
222
+ "URL": "https://www.cdc.gov/"
223
+ },
224
+ {
225
+ "STATE": "FM",
226
+ "Rate": 20,
227
+ "Location": "Home",
228
+ "URL": "https://www.cdc.gov/"
229
+ },
230
+ {
231
+ "STATE": "MN",
232
+ "Rate": 22,
233
+ "Location": "Home",
234
+ "URL": "https://www.cdc.gov/"
235
+ },
236
+ {
237
+ "STATE": "MS",
238
+ "Rate": 10,
239
+ "Location": "Vehicle",
240
+ "URL": "https://www.cdc.gov/"
241
+ },
242
+ {
243
+ "STATE": "MO",
244
+ "Rate": 11,
245
+ "Location": "Work",
246
+ "URL": "https://www.cdc.gov/"
247
+ },
248
+ {
249
+ "STATE": "MT",
250
+ "Rate": 14,
251
+ "Location": "School",
252
+ "URL": "https://www.cdc.gov/"
253
+ },
254
+ {
255
+ "STATE": "NE",
256
+ "Rate": 9,
257
+ "Location": "School",
258
+ "URL": "https://www.cdc.gov/"
259
+ },
260
+ {
261
+ "STATE": "NV",
262
+ "Rate": 17,
263
+ "Location": "Work",
264
+ "URL": "https://www.cdc.gov/"
265
+ },
266
+ {
267
+ "STATE": "NH",
268
+ "Rate": 20,
269
+ "Location": "Vehicle",
270
+ "URL": "https://www.cdc.gov/"
271
+ },
272
+ {
273
+ "STATE": "NJ",
274
+ "Rate": 28,
275
+ "Location": "Home",
276
+ "URL": "https://www.cdc.gov/"
277
+ },
278
+ {
279
+ "STATE": "NM",
280
+ "Rate": 10,
281
+ "Location": "Home",
282
+ "URL": "https://www.cdc.gov/"
283
+ },
284
+ {
285
+ "STATE": "NY",
286
+ "Rate": 12,
287
+ "Location": "Home",
288
+ "URL": "https://www.cdc.gov/"
289
+ },
290
+ {
291
+ "STATE": "NC",
292
+ "Rate": 14,
293
+ "Location": "Vehicle",
294
+ "URL": "https://www.cdc.gov/"
295
+ },
296
+ {
297
+ "STATE": "ND",
298
+ "Rate": 9,
299
+ "Location": "Work",
300
+ "URL": "https://www.cdc.gov/"
301
+ },
302
+ {
303
+ "STATE": "MP",
304
+ "Rate": 17,
305
+ "Location": "School",
306
+ "URL": "https://www.cdc.gov/"
307
+ },
308
+ {
309
+ "STATE": "OH",
310
+ "Rate": "NA",
311
+ "Location": "School",
312
+ "URL": "https://www.cdc.gov/"
313
+ },
314
+ {
315
+ "STATE": "OK",
316
+ "Rate": 22,
317
+ "Location": "Work",
318
+ "URL": "https://www.cdc.gov/"
319
+ },
320
+ {
321
+ "STATE": "OR",
322
+ "Rate": 10,
323
+ "Location": "Vehicle",
324
+ "URL": "https://www.cdc.gov/"
325
+ },
326
+ {
327
+ "STATE": "PW",
328
+ "Rate": 12,
329
+ "Location": "Home",
330
+ "URL": "https://www.cdc.gov/"
331
+ },
332
+ {
333
+ "STATE": "PA",
334
+ "Rate": 14,
335
+ "Location": "Home",
336
+ "URL": "https://www.cdc.gov/"
337
+ },
338
+ {
339
+ "STATE": "PR",
340
+ "Rate": 6,
341
+ "Location": "Home",
342
+ "URL": "https://www.cdc.gov/"
343
+ },
344
+ {
345
+ "STATE": "RI",
346
+ "Rate": 17,
347
+ "Location": "Vehicle",
348
+ "URL": "https://www.cdc.gov/"
349
+ },
350
+ {
351
+ "STATE": "SC",
352
+ "Rate": 20,
353
+ "Location": "Work",
354
+ "URL": "https://www.cdc.gov/"
355
+ },
356
+ {
357
+ "STATE": "SD",
358
+ "Rate": 22,
359
+ "Location": "School",
360
+ "URL": "https://www.cdc.gov/"
361
+ },
362
+ {
363
+ "STATE": "TN",
364
+ "Rate": 10,
365
+ "Location": "School",
366
+ "URL": "https://www.cdc.gov/"
367
+ },
368
+ {
369
+ "STATE": "TX",
370
+ "Rate": 12,
371
+ "Location": "Work",
372
+ "URL": "https://www.cdc.gov/"
373
+ },
374
+ {
375
+ "STATE": "VT",
376
+ "Rate": 9,
377
+ "Location": "Home",
378
+ "URL": "https://www.cdc.gov/"
379
+ },
380
+ {
381
+ "STATE": "VI",
382
+ "Rate": 17,
383
+ "Location": "Vehicle",
384
+ "URL": "https://www.cdc.gov/"
385
+ },
386
+ {
387
+ "STATE": "VA",
388
+ "Rate": 20,
389
+ "Location": "Work",
390
+ "URL": "https://www.cdc.gov/"
391
+ },
392
+ {
393
+ "STATE": "WA",
394
+ "Rate": 22,
395
+ "Location": "School",
396
+ "URL": "https://www.cdc.gov/"
397
+ },
398
+ {
399
+ "STATE": "WV",
400
+ "Rate": 10,
401
+ "Location": "School",
402
+ "URL": "https://www.cdc.gov/"
403
+ },
404
+ {
405
+ "STATE": "WI",
406
+ "Rate": 12,
407
+ "Location": "Work",
408
+ "URL": "https://www.cdc.gov/"
409
+ },
410
+ {
411
+ "STATE": "WY",
412
+ "Rate": 14,
413
+ "Location": "Home",
414
+ "URL": "https://www.cdc.gov/"
415
+ },
416
+ {
417
+ "STATE": "Los Angeles",
418
+ "Rate": 14,
419
+ "Location": "Vehicle",
420
+ "URL": "https://www.cdc.gov/"
421
+ },
422
+ {
423
+ "STATE": "Atlanta",
424
+ "Rate": 12,
425
+ "Location": "Work",
426
+ "URL": "https://www.cdc.gov/"
427
+ },
428
+ {
429
+ "STATE": "Boston",
430
+ "Rate": 20,
431
+ "Location": "School",
432
+ "URL": "https://www.cdc.gov/"
433
+ },
434
+ {
435
+ "STATE": "New York City",
436
+ "Rate": 22,
437
+ "Location": "School",
438
+ "URL": "https://www.cdc.gov/"
439
+ },
440
+ {
441
+ "STATE": "Dallas",
442
+ "Rate": 18,
443
+ "Location": "Work",
444
+ "URL": "https://www.cdc.gov/"
445
+ },
446
+ {
447
+ "STATE": "Seattle",
448
+ "Rate": 17,
449
+ "Location": "Home",
450
+ "URL": "https://www.cdc.gov/"
451
+ },
452
+ {
453
+ "STATE": "New Orleans",
454
+ "Rate": 14,
455
+ "Location": "Vehicle",
456
+ "URL": "https://www.cdc.gov/"
457
+ }
458
+ ],
459
+ "sharing": {
460
+ "enabled": false,
461
+ "dataHost": "wcms-wp.cdc.gov",
462
+ "configUrl": "/wcms/4.0/cdc-wp/data-presentation/examples/city-data-map-example.json"
463
+ },
464
+ "dataTable": {
465
+ "title": "Data Table"
466
+ },
467
+ "tooltips": {
468
+ "appearanceType": "hover",
469
+ "linkLabel": "Learn More",
470
+ "capitalizeLabels": true
471
+ },
472
+ "color": "yelloworangered",
473
+ "usingWidgetLoader": true,
474
+ "type": "map"
475
+ }
476
+
477
+
@@ -0,0 +1,118 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "Current Week Positivity": "20",
5
+ "State": "REGION 1",
6
+ "Change": "0.2"
7
+ },
8
+ {
9
+ "Current Week Positivity": "27",
10
+ "State": "region 2",
11
+ "Change": "-0.5"
12
+ },
13
+ {
14
+ "Current Week Positivity": "26",
15
+ "State": "region 3",
16
+ "Change": "-.08"
17
+ },
18
+ {
19
+ "Current Week Positivity": "30",
20
+ "State": "region 4",
21
+ "Change": "0.8"
22
+ },
23
+ {
24
+ "Current Week Positivity": "14",
25
+ "State": "region 5",
26
+ "Change": "0.5"
27
+ },
28
+ {
29
+ "Current Week Positivity": "25",
30
+ "State": "region 6",
31
+ "Change": "0.05"
32
+ },
33
+ {
34
+ "Current Week Positivity": "0",
35
+ "State": "region 7",
36
+ "Change": "0"
37
+ },
38
+ {
39
+ "Current Week Positivity": "14",
40
+ "State": "region 8",
41
+ "Change": "-1.2"
42
+ },
43
+ {
44
+ "Current Week Positivity": "28",
45
+ "State": "region 9",
46
+ "Change": "1.5"
47
+ },
48
+ {
49
+ "Current Week Positivity": "12",
50
+ "State": "region 10",
51
+ "Change": "0.5"
52
+ }
53
+ ],
54
+
55
+ "dataFileSourceType": "file",
56
+ "dataDescription": {
57
+ "horizontal": true
58
+ },
59
+ "newViz": true,
60
+ "type": "map",
61
+ "general": {
62
+ "geoType": "us-region",
63
+ "geoBorderColor": "darkGray",
64
+ "headerColor": "theme-blue",
65
+ "showTitle": true,
66
+ "showSidebar": true,
67
+ "showDownloadButton": true,
68
+ "showDownloadMediaButton": false,
69
+ "displayAsHex": false,
70
+ "displayStateLabels": false,
71
+ "territoriesLabel": "Territories",
72
+ "language": "en",
73
+ "hasRegions": false,
74
+ "expandDataTable": true,
75
+ "fullBorder": false,
76
+ "type": "data",
77
+ "title": "Default US Map"
78
+ },
79
+
80
+ "geoType": "us-region",
81
+ "geoBorderColor": "darkGray",
82
+ "headerColor": "theme-blue",
83
+ "showTitle": true,
84
+ "showSidebar": true,
85
+ "showDownloadButton": true,
86
+ "showDownloadMediaButton": false,
87
+ "displayAsHex": false,
88
+ "displayStateLabels": false,
89
+ "territoriesLabel": "Territories",
90
+ "language": "en",
91
+ "hasRegions": false,
92
+ "expandDataTable": true,
93
+ "fullBorder": false,
94
+ "color": "pinkpurple",
95
+ "columns": {
96
+ "geo": { "name": "State", "label": "Location", "tooltip": false, "dataTable": true },
97
+ "primary": { "dataTable": true, "tooltip": true, "prefix": "", "suffix": "", "name": "Current Week Positivity", "label": "" },
98
+ "navigate": { "name": "Current Week Positivity" }
99
+ },
100
+ "legend": {
101
+ "descriptions": {},
102
+ "specialClasses": [],
103
+ "unified": false,
104
+ "singleColumn": false,
105
+ "dynamicDescription": false,
106
+ "type": "category",
107
+ "numberOfItems": 10,
108
+ "position": "side",
109
+ "title": "Legend"
110
+ },
111
+ "filters": [],
112
+ "dataTable": { "title": "Data Table", "forceDisplay": true },
113
+ "tooltips": {
114
+ "appearanceType": "hover",
115
+ "linkLabel": "Learn More",
116
+ "capitalizeLabels": true
117
+ }
118
+ }
@@ -958,7 +958,7 @@
958
958
  "position": "side",
959
959
  "title": "Legend"
960
960
  },
961
- "filters": [{ "label": "", "values": [], "columnName": "Condition" }, { "label": "", "values": [], "columnName": "State" } ],
961
+ "filters": [],
962
962
  "dataTable": { "title": "Data Table", "forceDisplay": true },
963
963
  "tooltips": {
964
964
  "appearanceType": "hover",