@cdc/map 4.23.11 → 4.24.2

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 (60) hide show
  1. package/dist/cdcmap.js +52413 -46767
  2. package/examples/default-patterns.json +581 -0
  3. package/examples/default-usa.json +159 -57
  4. package/examples/test.json +0 -9614
  5. package/examples/zika.json +1194 -0
  6. package/index.html +17 -6
  7. package/package.json +3 -3
  8. package/src/CdcMap.tsx +39 -31
  9. package/src/components/CityList.jsx +34 -23
  10. package/src/components/{EditorPanel.jsx → EditorPanel/components/EditorPanel.tsx} +31 -64
  11. package/src/components/{HexShapeSettings.jsx → EditorPanel/components/HexShapeSettings.tsx} +2 -51
  12. package/src/components/EditorPanel/components/Inputs.tsx +59 -0
  13. package/src/components/EditorPanel/components/Panel.PatternSettings.tsx +140 -0
  14. package/src/components/EditorPanel/components/Panels.tsx +7 -0
  15. package/src/components/EditorPanel/index.tsx +3 -0
  16. package/src/components/Geo.jsx +4 -2
  17. package/src/components/Legend/components/Legend.tsx +183 -0
  18. package/src/components/Legend/components/LegendItem.Hex.tsx +49 -0
  19. package/src/components/Legend/components/index.scss +235 -0
  20. package/src/components/Legend/index.tsx +3 -0
  21. package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +129 -0
  22. package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +66 -0
  23. package/src/components/UsaMap/components/Territory/index.tsx +9 -0
  24. package/src/components/{CountyMap.jsx → UsaMap/components/UsaMap.County.tsx} +9 -9
  25. package/src/components/{UsaRegionMap.jsx → UsaMap/components/UsaMap.Region.tsx} +1 -3
  26. package/src/components/{SingleStateMap.jsx → UsaMap/components/UsaMap.SingleState.tsx} +8 -10
  27. package/src/components/{UsaMap.jsx → UsaMap/components/UsaMap.State.tsx} +55 -127
  28. package/src/components/UsaMap/index.tsx +13 -0
  29. package/src/components/{WorldMap.jsx → WorldMap/components/WorldMap.jsx} +20 -14
  30. package/src/components/WorldMap/data/world-topo-guiana-update.json +1 -0
  31. package/src/components/WorldMap/data/world-topo-old.json +1 -0
  32. package/src/components/WorldMap/data/world-topo-recent.json +39194 -0
  33. package/src/components/WorldMap/data/world-topo.json +1 -0
  34. package/src/components/WorldMap/index.tsx +3 -0
  35. package/src/context.ts +2 -1
  36. package/src/data/initial-state.js +5 -3
  37. package/src/data/supported-geos.js +21 -1
  38. package/src/hooks/useTooltip.ts +4 -4
  39. package/src/scss/editor-panel.scss +2 -3
  40. package/src/scss/main.scss +11 -1
  41. package/src/scss/map.scss +22 -12
  42. package/src/types/MapConfig.ts +149 -0
  43. package/src/types/MapContext.ts +45 -0
  44. package/src/types/runtimeLegend.ts +1 -0
  45. package/examples/world-geocode-data.json +0 -18
  46. package/examples/world-geocode.json +0 -108
  47. package/src/components/Sidebar.tsx +0 -142
  48. package/src/data/abbreviations.js +0 -57
  49. package/src/data/feature-test.json +0 -73
  50. package/src/data/newtest.json +0 -1
  51. package/src/data/state-abbreviations.js +0 -60
  52. package/src/data/supported-cities.csv +0 -165
  53. package/src/data/test.json +0 -1
  54. package/src/data/world-topo.json +0 -1
  55. package/src/scss/sidebar.scss +0 -230
  56. /package/src/{data → components/UsaMap/data}/cb_2019_us_county_20m.json +0 -0
  57. /package/src/{data → components/UsaMap/data}/us-hex-topo.json +0 -0
  58. /package/src/{data → components/UsaMap/data}/us-regions-topo-2.json +0 -0
  59. /package/src/{data → components/UsaMap/data}/us-regions-topo.json +0 -0
  60. /package/src/{data → components/UsaMap/data}/us-topo.json +0 -0
@@ -0,0 +1,581 @@
1
+ {
2
+ "general": {
3
+ "geoBorderColor": "darkGray",
4
+ "headerColor": "theme-blue",
5
+ "title": "",
6
+ "showTitle": true,
7
+ "showSidebar": true,
8
+ "showDownloadButton": false,
9
+ "showDownloadMediaButton": false,
10
+ "displayAsHex": false,
11
+ "displayStateLabels": false,
12
+ "territoriesLabel": "Territories",
13
+ "territoriesAlwaysShow": false,
14
+ "language": "en",
15
+ "geoType": "us",
16
+ "geoLabelOverride": "State/Territory",
17
+ "hasRegions": false,
18
+ "fullBorder": false,
19
+ "type": "map",
20
+ "convertFipsCodes": true,
21
+ "palette": {
22
+ "isReversed": true
23
+ },
24
+ "allowMapZoom": true,
25
+ "hideGeoColumnInTooltip": false,
26
+ "hidePrimaryColumnInTooltip": true,
27
+ "statePicked": {
28
+ "fipsCode": "01",
29
+ "stateName": "Alabama"
30
+ },
31
+ "equalNumberOptIn": true,
32
+ "subtext": "<div class=\"card mb-3\"><div class=\"card-body bg-gray-l2\"><p>Testing has resumed for commercial contract wastewater sites (about 350 sites) that have had a temporary delay since September 15, 2023. Once sites have six weeks of data, the wastewater viral activity levels will be displayed.</p> </div></div><div class=\"text-left ml-3 pb-3\">Data last updated <span class=\"date\">FromDB</span></div>",
33
+ "introText": "",
34
+ "footnotes": ""
35
+ },
36
+ "type": "map",
37
+ "color": "greenbluereverse",
38
+ "columns": {
39
+ "geo": {
40
+ "name": "state",
41
+ "label": "Location",
42
+ "tooltip": false,
43
+ "dataTable": true
44
+ },
45
+ "primary": {
46
+ "dataTable": false,
47
+ "tooltip": true,
48
+ "prefix": "",
49
+ "suffix": "",
50
+ "name": "activity_level",
51
+ "label": "Numeric Activity Level"
52
+ },
53
+ "navigate": {
54
+ "name": ""
55
+ },
56
+ "latitude": {
57
+ "name": ""
58
+ },
59
+ "longitude": {
60
+ "name": ""
61
+ },
62
+ "additionalColumn1": {
63
+ "label": "Viral Activity Level",
64
+ "dataTable": true,
65
+ "tooltips": false,
66
+ "prefix": "",
67
+ "suffix": "",
68
+ "name": "activity_level_label",
69
+ "tooltip": true
70
+ }
71
+ },
72
+ "legend": {
73
+ "descriptions": {},
74
+ "specialClasses": [],
75
+ "unified": false,
76
+ "singleColumn": false,
77
+ "singleRow": false,
78
+ "verticalSorted": true,
79
+ "showSpecialClassesLast": true,
80
+ "dynamicDescription": false,
81
+ "type": "category",
82
+ "numberOfItems": 8,
83
+ "position": "bottom",
84
+ "title": "Current SARS-CoV-2 Wastewater Viral Activity Level",
85
+ "categoryValuesOrder": [
86
+ "10",
87
+ "9",
88
+ "8",
89
+ "7",
90
+ "6",
91
+ "5",
92
+ "4",
93
+ "3",
94
+ "2",
95
+ "1",
96
+ "No Data"
97
+ ],
98
+ "additionalCategories": [
99
+ "No Data",
100
+ "1",
101
+ "2",
102
+ "3",
103
+ "4",
104
+ "5",
105
+ "6",
106
+ "7",
107
+ "8",
108
+ "9",
109
+ "10"
110
+ ],
111
+ "description": "Select a level to add or remove it from the visualization. "
112
+ },
113
+ "filters": [],
114
+ "table": {
115
+ "label": "Data Table",
116
+ "expanded": false,
117
+ "limitHeight": true,
118
+ "height": "500",
119
+ "caption": "",
120
+ "showDownloadUrl": true,
121
+ "showDataTableLink": true,
122
+ "showFullGeoNameInCSV": false,
123
+ "forceDisplay": true,
124
+ "download": false,
125
+ "indexLabel": "State/Territory"
126
+ },
127
+ "tooltips": {
128
+ "appearanceType": "hover",
129
+ "linkLabel": "Learn More",
130
+ "capitalizeLabels": true,
131
+ "opacity": 90
132
+ },
133
+ "runtime": {
134
+ "editorErrorMessage": []
135
+ },
136
+ "visual": {
137
+ "minBubbleSize": 1,
138
+ "maxBubbleSize": 20,
139
+ "extraBubbleBorder": false,
140
+ "cityStyle": "circle",
141
+ "geoCodeCircleSize": 2,
142
+ "showBubbleZeros": false
143
+ },
144
+ "mapPosition": {
145
+ "coordinates": [
146
+ 0,
147
+ 30
148
+ ],
149
+ "zoom": 1
150
+ },
151
+ "map": {
152
+ "layers": [],
153
+ "patterns": [
154
+ {
155
+ "dataKey": "activity_level_label",
156
+ "pattern": "circles",
157
+ "dataValue": "Moderate"
158
+ }
159
+ ]
160
+ },
161
+ "hexMap": {
162
+ "type": "",
163
+ "shapeGroups": [
164
+ {
165
+ "legendTitle": "",
166
+ "legendDescription": "",
167
+ "items": [
168
+ {
169
+ "key": "",
170
+ "shape": "Arrow up",
171
+ "column": "",
172
+ "operator": "=",
173
+ "value": ""
174
+ }
175
+ ]
176
+ }
177
+ ]
178
+ },
179
+ "filterBehavior": "Filter Change",
180
+ "customColors": [
181
+ "#0A1B40",
182
+ "#073A5D",
183
+ "#185A77",
184
+ "#367A8D",
185
+ "#5B9CA1",
186
+ "#86BDB4",
187
+ "#B4DECA",
188
+ "#E5FFE3",
189
+ "#F2FFF1",
190
+ "#FFFFFF",
191
+ "#B4B4B4"
192
+ ],
193
+ "dataFileName": "../../wcms/vizdata/NCEZID_DIDRI/NWSSStateMap.json",
194
+ "dataFileSourceType": "url",
195
+ "dataDescription": {
196
+ "horizontal": false,
197
+ "series": false
198
+ },
199
+ "validated": 4.23,
200
+ "dataUrl": "../../wcms/vizdata/NCEZID_DIDRI/NWSSStateMap.json",
201
+ "data": [
202
+ {
203
+ "state_name": "Utah",
204
+ "state": "UT",
205
+ "activity_level": "8",
206
+ "activity_level_label": "High",
207
+ "num_sites": "31"
208
+ },
209
+ {
210
+ "state_name": "Hawaii",
211
+ "state": "HI",
212
+ "activity_level": "2",
213
+ "activity_level_label": "Minimal",
214
+ "num_sites": "6"
215
+ },
216
+ {
217
+ "state_name": "Minnesota",
218
+ "state": "MN",
219
+ "activity_level": "6",
220
+ "activity_level_label": "Moderate",
221
+ "num_sites": "15"
222
+ },
223
+ {
224
+ "state_name": "Ohio",
225
+ "state": "OH",
226
+ "activity_level": "9",
227
+ "activity_level_label": "Very High",
228
+ "num_sites": "66"
229
+ },
230
+ {
231
+ "state_name": "Arkansas",
232
+ "state": "AR",
233
+ "activity_level": "10",
234
+ "activity_level_label": "Very High",
235
+ "num_sites": "1"
236
+ },
237
+ {
238
+ "state_name": "Oregon",
239
+ "state": "OR",
240
+ "activity_level": "1",
241
+ "activity_level_label": "Minimal",
242
+ "num_sites": "9"
243
+ },
244
+ {
245
+ "state_name": "Texas",
246
+ "state": "TX",
247
+ "activity_level": "7",
248
+ "activity_level_label": "High",
249
+ "num_sites": "14"
250
+ },
251
+ {
252
+ "state_name": "North Dakota",
253
+ "state": "ND",
254
+ "activity_level": "No Data",
255
+ "activity_level_label": "No Data",
256
+ "num_sites": "0"
257
+ },
258
+ {
259
+ "state_name": "Pennsylvania",
260
+ "state": "PA",
261
+ "activity_level": "6",
262
+ "activity_level_label": "Moderate",
263
+ "num_sites": "17"
264
+ },
265
+ {
266
+ "state_name": "Connecticut",
267
+ "state": "CT",
268
+ "activity_level": "No Data",
269
+ "activity_level_label": "No Data",
270
+ "num_sites": "0"
271
+ },
272
+ {
273
+ "state_name": "Vermont",
274
+ "state": "VT",
275
+ "activity_level": "10",
276
+ "activity_level_label": "Very High",
277
+ "num_sites": "3"
278
+ },
279
+ {
280
+ "state_name": "Nebraska",
281
+ "state": "NE",
282
+ "activity_level": "7",
283
+ "activity_level_label": "High",
284
+ "num_sites": "2"
285
+ },
286
+ {
287
+ "state_name": "Nevada",
288
+ "state": "NV",
289
+ "activity_level": "7",
290
+ "activity_level_label": "High",
291
+ "num_sites": "1"
292
+ },
293
+ {
294
+ "state_name": "Puerto Rico",
295
+ "state": "PR",
296
+ "activity_level": "No Data",
297
+ "activity_level_label": "No Data",
298
+ "num_sites": "0"
299
+ },
300
+ {
301
+ "state_name": "Washington",
302
+ "state": "WA",
303
+ "activity_level": "3",
304
+ "activity_level_label": "Low",
305
+ "num_sites": "14"
306
+ },
307
+ {
308
+ "state_name": "Illinois",
309
+ "state": "IL",
310
+ "activity_level": "8",
311
+ "activity_level_label": "High",
312
+ "num_sites": "70"
313
+ },
314
+ {
315
+ "state_name": "Oklahoma",
316
+ "state": "OK",
317
+ "activity_level": "No Data",
318
+ "activity_level_label": "No Data",
319
+ "num_sites": "0"
320
+ },
321
+ {
322
+ "state_name": "Virgin Islands",
323
+ "state": "VI",
324
+ "activity_level": "No Data",
325
+ "activity_level_label": "No Data",
326
+ "num_sites": "0"
327
+ },
328
+ {
329
+ "state_name": "District of Columbia",
330
+ "state": "DC",
331
+ "activity_level": "No Data",
332
+ "activity_level_label": "No Data",
333
+ "num_sites": "0"
334
+ },
335
+ {
336
+ "state_name": "Delaware",
337
+ "state": "DE",
338
+ "activity_level": "8",
339
+ "activity_level_label": "High",
340
+ "num_sites": "8"
341
+ },
342
+ {
343
+ "state_name": "Alaska",
344
+ "state": "AK",
345
+ "activity_level": "4",
346
+ "activity_level_label": "Low",
347
+ "num_sites": "1"
348
+ },
349
+ {
350
+ "state_name": "New Mexico",
351
+ "state": "NM",
352
+ "activity_level": "No Data",
353
+ "activity_level_label": "No Data",
354
+ "num_sites": "0"
355
+ },
356
+ {
357
+ "state_name": "West Virginia",
358
+ "state": "WV",
359
+ "activity_level": "8",
360
+ "activity_level_label": "High",
361
+ "num_sites": "1"
362
+ },
363
+ {
364
+ "state_name": "Missouri",
365
+ "state": "MO",
366
+ "activity_level": "7",
367
+ "activity_level_label": "High",
368
+ "num_sites": "42"
369
+ },
370
+ {
371
+ "state_name": "Rhode Island",
372
+ "state": "RI",
373
+ "activity_level": "2",
374
+ "activity_level_label": "Minimal",
375
+ "num_sites": "6"
376
+ },
377
+ {
378
+ "state_name": "Georgia",
379
+ "state": "GA",
380
+ "activity_level": "4",
381
+ "activity_level_label": "Low",
382
+ "num_sites": "8"
383
+ },
384
+ {
385
+ "state_name": "Montana",
386
+ "state": "MT",
387
+ "activity_level": "10",
388
+ "activity_level_label": "Very High",
389
+ "num_sites": "4"
390
+ },
391
+ {
392
+ "state_name": "Michigan",
393
+ "state": "MI",
394
+ "activity_level": "10",
395
+ "activity_level_label": "Very High",
396
+ "num_sites": "24"
397
+ },
398
+ {
399
+ "state_name": "Virginia",
400
+ "state": "VA",
401
+ "activity_level": "5",
402
+ "activity_level_label": "Moderate",
403
+ "num_sites": "32"
404
+ },
405
+ {
406
+ "state_name": "Guam",
407
+ "state": "GU",
408
+ "activity_level": "No Data",
409
+ "activity_level_label": "No Data",
410
+ "num_sites": "0"
411
+ },
412
+ {
413
+ "state_name": "North Carolina",
414
+ "state": "NC",
415
+ "activity_level": "8",
416
+ "activity_level_label": "High",
417
+ "num_sites": "7"
418
+ },
419
+ {
420
+ "state_name": "Wyoming",
421
+ "state": "WY",
422
+ "activity_level": "No Data",
423
+ "activity_level_label": "No Data",
424
+ "num_sites": "0"
425
+ },
426
+ {
427
+ "state_name": "Kansas",
428
+ "state": "KS",
429
+ "activity_level": "10",
430
+ "activity_level_label": "Very High",
431
+ "num_sites": "5"
432
+ },
433
+ {
434
+ "state_name": "New Jersey",
435
+ "state": "NJ",
436
+ "activity_level": "8",
437
+ "activity_level_label": "High",
438
+ "num_sites": "23"
439
+ },
440
+ {
441
+ "state_name": "Maryland",
442
+ "state": "MD",
443
+ "activity_level": "7",
444
+ "activity_level_label": "High",
445
+ "num_sites": "2"
446
+ },
447
+ {
448
+ "state_name": "Alabama",
449
+ "state": "AL",
450
+ "activity_level": "7",
451
+ "activity_level_label": "High",
452
+ "num_sites": "5"
453
+ },
454
+ {
455
+ "state_name": "Arizona",
456
+ "state": "AZ",
457
+ "activity_level": "7",
458
+ "activity_level_label": "High",
459
+ "num_sites": "8"
460
+ },
461
+ {
462
+ "state_name": "Iowa",
463
+ "state": "IA",
464
+ "activity_level": "10",
465
+ "activity_level_label": "Very High",
466
+ "num_sites": "5"
467
+ },
468
+ {
469
+ "state_name": "Massachusetts",
470
+ "state": "MA",
471
+ "activity_level": "6",
472
+ "activity_level_label": "Moderate",
473
+ "num_sites": "1"
474
+ },
475
+ {
476
+ "state_name": "Kentucky",
477
+ "state": "KY",
478
+ "activity_level": "5",
479
+ "activity_level_label": "Moderate",
480
+ "num_sites": "1"
481
+ },
482
+ {
483
+ "state_name": "Louisiana",
484
+ "state": "LA",
485
+ "activity_level": "No Data",
486
+ "activity_level_label": "No Data",
487
+ "num_sites": "0"
488
+ },
489
+ {
490
+ "state_name": "Mississippi",
491
+ "state": "MS",
492
+ "activity_level": "No Data",
493
+ "activity_level_label": "No Data",
494
+ "num_sites": "0"
495
+ },
496
+ {
497
+ "state_name": "Tennessee",
498
+ "state": "TN",
499
+ "activity_level": "6",
500
+ "activity_level_label": "Moderate",
501
+ "num_sites": "2"
502
+ },
503
+ {
504
+ "state_name": "New Hampshire",
505
+ "state": "NH",
506
+ "activity_level": "5",
507
+ "activity_level_label": "Moderate",
508
+ "num_sites": "11"
509
+ },
510
+ {
511
+ "state_name": "Florida",
512
+ "state": "FL",
513
+ "activity_level": "6",
514
+ "activity_level_label": "Moderate",
515
+ "num_sites": "16"
516
+ },
517
+ {
518
+ "state_name": "Indiana",
519
+ "state": "IN",
520
+ "activity_level": "8",
521
+ "activity_level_label": "High",
522
+ "num_sites": "20"
523
+ },
524
+ {
525
+ "state_name": "Idaho",
526
+ "state": "ID",
527
+ "activity_level": "7",
528
+ "activity_level_label": "High",
529
+ "num_sites": "9"
530
+ },
531
+ {
532
+ "state_name": "South Carolina",
533
+ "state": "SC",
534
+ "activity_level": "4",
535
+ "activity_level_label": "Low",
536
+ "num_sites": "3"
537
+ },
538
+ {
539
+ "state_name": "South Dakota",
540
+ "state": "SD",
541
+ "activity_level": "8",
542
+ "activity_level_label": "High",
543
+ "num_sites": "1"
544
+ },
545
+ {
546
+ "state_name": "California",
547
+ "state": "CA",
548
+ "activity_level": "5",
549
+ "activity_level_label": "Moderate",
550
+ "num_sites": "62"
551
+ },
552
+ {
553
+ "state_name": "New York",
554
+ "state": "NY",
555
+ "activity_level": "8",
556
+ "activity_level_label": "High",
557
+ "num_sites": "117"
558
+ },
559
+ {
560
+ "state_name": "Wisconsin",
561
+ "state": "WI",
562
+ "activity_level": "9",
563
+ "activity_level_label": "Very High",
564
+ "num_sites": "39"
565
+ },
566
+ {
567
+ "state_name": "Maine",
568
+ "state": "ME",
569
+ "activity_level": "8",
570
+ "activity_level_label": "High",
571
+ "num_sites": "14"
572
+ },
573
+ {
574
+ "state_name": "Colorado",
575
+ "state": "CO",
576
+ "activity_level": "5",
577
+ "activity_level_label": "Moderate",
578
+ "num_sites": "46"
579
+ }
580
+ ]
581
+ }