@cdc/map 4.24.11 → 4.24.12-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 (49) hide show
  1. package/dist/cdcmap.js +34008 -33475
  2. package/examples/default-geocode.json +13 -4
  3. package/examples/default-usa-regions.json +267 -117
  4. package/examples/example-city-state.json +6 -3
  5. package/examples/pattern.json +861 -0
  6. package/examples/private/DEV-9989.json +229 -0
  7. package/examples/private/ardi.json +180 -0
  8. package/examples/private/colors 2.json +416 -0
  9. package/examples/private/colors.json +416 -0
  10. package/examples/private/colors.json.zip +0 -0
  11. package/examples/private/customColors.json +45348 -0
  12. package/examples/private/default-patterns.json +867 -0
  13. package/examples/private/test.json +1632 -0
  14. package/index.html +4 -5
  15. package/package.json +3 -3
  16. package/src/CdcMap.tsx +82 -79
  17. package/src/_stories/{CdcMapLegend.stories.tsx → CdcMap.Legend.Gradient.stories.tsx} +1 -20
  18. package/src/_stories/CdcMap.Legend.stories.tsx +40 -0
  19. package/src/_stories/CdcMap.Patterns.stories.tsx +29 -0
  20. package/src/_stories/CdcMap.stories.tsx +59 -0
  21. package/src/_stories/UsaMap.NoData.stories.tsx +19 -0
  22. package/src/_stories/_mock/custom-layer-map.json +1117 -0
  23. package/src/_stories/_mock/default-patterns.json +865 -0
  24. package/src/_stories/_mock/example-city-state.json +858 -0
  25. package/src/components/CityList.tsx +5 -2
  26. package/src/components/EditorPanel/components/EditorPanel.tsx +39 -256
  27. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +1 -1
  28. package/src/components/Legend/components/Legend.tsx +22 -6
  29. package/src/components/Legend/components/index.scss +16 -23
  30. package/src/components/UsaMap/components/SingleState/SingleState.CountyOutput.tsx +40 -6
  31. package/src/components/UsaMap/components/SingleState/SingleState.StateOutput.tsx +10 -2
  32. package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +1 -1
  33. package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +14 -13
  34. package/src/components/UsaMap/components/UsaMap.County.tsx +11 -13
  35. package/src/components/UsaMap/components/UsaMap.Region.tsx +59 -16
  36. package/src/components/UsaMap/components/UsaMap.SingleState.tsx +2 -1
  37. package/src/components/UsaMap/components/UsaMap.State.tsx +58 -60
  38. package/src/components/WorldMap/WorldMap.tsx +77 -16
  39. package/src/data/initial-state.js +2 -1
  40. package/src/helpers/applyColorToLegend.ts +80 -0
  41. package/src/helpers/colors.ts +23 -0
  42. package/src/hooks/useTooltip.ts +9 -6
  43. package/src/scss/filters.scss +0 -3
  44. package/src/scss/main.scss +0 -1
  45. package/src/scss/map.scss +11 -59
  46. package/src/types/MapConfig.ts +7 -1
  47. package/src/types/MapContext.ts +1 -0
  48. package/examples/default-patterns.json +0 -579
  49. package/src/scss/datatable.scss +0 -6
@@ -1,579 +0,0 @@
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
- "dataFileSourceType": "url",
194
- "dataDescription": {
195
- "horizontal": false,
196
- "series": false
197
- },
198
- "validated": 4.23,
199
- "data": [
200
- {
201
- "state_name": "Utah",
202
- "state": "UT",
203
- "activity_level": "8",
204
- "activity_level_label": "High",
205
- "num_sites": "31"
206
- },
207
- {
208
- "state_name": "Hawaii",
209
- "state": "HI",
210
- "activity_level": "2",
211
- "activity_level_label": "Minimal",
212
- "num_sites": "6"
213
- },
214
- {
215
- "state_name": "Minnesota",
216
- "state": "MN",
217
- "activity_level": "6",
218
- "activity_level_label": "Moderate",
219
- "num_sites": "15"
220
- },
221
- {
222
- "state_name": "Ohio",
223
- "state": "OH",
224
- "activity_level": "9",
225
- "activity_level_label": "Very High",
226
- "num_sites": "66"
227
- },
228
- {
229
- "state_name": "Arkansas",
230
- "state": "AR",
231
- "activity_level": "10",
232
- "activity_level_label": "Very High",
233
- "num_sites": "1"
234
- },
235
- {
236
- "state_name": "Oregon",
237
- "state": "OR",
238
- "activity_level": "1",
239
- "activity_level_label": "Minimal",
240
- "num_sites": "9"
241
- },
242
- {
243
- "state_name": "Texas",
244
- "state": "TX",
245
- "activity_level": "7",
246
- "activity_level_label": "High",
247
- "num_sites": "14"
248
- },
249
- {
250
- "state_name": "North Dakota",
251
- "state": "ND",
252
- "activity_level": "No Data",
253
- "activity_level_label": "No Data",
254
- "num_sites": "0"
255
- },
256
- {
257
- "state_name": "Pennsylvania",
258
- "state": "PA",
259
- "activity_level": "6",
260
- "activity_level_label": "Moderate",
261
- "num_sites": "17"
262
- },
263
- {
264
- "state_name": "Connecticut",
265
- "state": "CT",
266
- "activity_level": "No Data",
267
- "activity_level_label": "No Data",
268
- "num_sites": "0"
269
- },
270
- {
271
- "state_name": "Vermont",
272
- "state": "VT",
273
- "activity_level": "10",
274
- "activity_level_label": "Very High",
275
- "num_sites": "3"
276
- },
277
- {
278
- "state_name": "Nebraska",
279
- "state": "NE",
280
- "activity_level": "7",
281
- "activity_level_label": "High",
282
- "num_sites": "2"
283
- },
284
- {
285
- "state_name": "Nevada",
286
- "state": "NV",
287
- "activity_level": "7",
288
- "activity_level_label": "High",
289
- "num_sites": "1"
290
- },
291
- {
292
- "state_name": "Puerto Rico",
293
- "state": "PR",
294
- "activity_level": "No Data",
295
- "activity_level_label": "No Data",
296
- "num_sites": "0"
297
- },
298
- {
299
- "state_name": "Washington",
300
- "state": "WA",
301
- "activity_level": "3",
302
- "activity_level_label": "Low",
303
- "num_sites": "14"
304
- },
305
- {
306
- "state_name": "Illinois",
307
- "state": "IL",
308
- "activity_level": "8",
309
- "activity_level_label": "High",
310
- "num_sites": "70"
311
- },
312
- {
313
- "state_name": "Oklahoma",
314
- "state": "OK",
315
- "activity_level": "No Data",
316
- "activity_level_label": "No Data",
317
- "num_sites": "0"
318
- },
319
- {
320
- "state_name": "Virgin Islands",
321
- "state": "VI",
322
- "activity_level": "No Data",
323
- "activity_level_label": "No Data",
324
- "num_sites": "0"
325
- },
326
- {
327
- "state_name": "District of Columbia",
328
- "state": "DC",
329
- "activity_level": "No Data",
330
- "activity_level_label": "No Data",
331
- "num_sites": "0"
332
- },
333
- {
334
- "state_name": "Delaware",
335
- "state": "DE",
336
- "activity_level": "8",
337
- "activity_level_label": "High",
338
- "num_sites": "8"
339
- },
340
- {
341
- "state_name": "Alaska",
342
- "state": "AK",
343
- "activity_level": "4",
344
- "activity_level_label": "Low",
345
- "num_sites": "1"
346
- },
347
- {
348
- "state_name": "New Mexico",
349
- "state": "NM",
350
- "activity_level": "No Data",
351
- "activity_level_label": "No Data",
352
- "num_sites": "0"
353
- },
354
- {
355
- "state_name": "West Virginia",
356
- "state": "WV",
357
- "activity_level": "8",
358
- "activity_level_label": "High",
359
- "num_sites": "1"
360
- },
361
- {
362
- "state_name": "Missouri",
363
- "state": "MO",
364
- "activity_level": "7",
365
- "activity_level_label": "High",
366
- "num_sites": "42"
367
- },
368
- {
369
- "state_name": "Rhode Island",
370
- "state": "RI",
371
- "activity_level": "2",
372
- "activity_level_label": "Minimal",
373
- "num_sites": "6"
374
- },
375
- {
376
- "state_name": "Georgia",
377
- "state": "GA",
378
- "activity_level": "4",
379
- "activity_level_label": "Low",
380
- "num_sites": "8"
381
- },
382
- {
383
- "state_name": "Montana",
384
- "state": "MT",
385
- "activity_level": "10",
386
- "activity_level_label": "Very High",
387
- "num_sites": "4"
388
- },
389
- {
390
- "state_name": "Michigan",
391
- "state": "MI",
392
- "activity_level": "10",
393
- "activity_level_label": "Very High",
394
- "num_sites": "24"
395
- },
396
- {
397
- "state_name": "Virginia",
398
- "state": "VA",
399
- "activity_level": "5",
400
- "activity_level_label": "Moderate",
401
- "num_sites": "32"
402
- },
403
- {
404
- "state_name": "Guam",
405
- "state": "GU",
406
- "activity_level": "No Data",
407
- "activity_level_label": "No Data",
408
- "num_sites": "0"
409
- },
410
- {
411
- "state_name": "North Carolina",
412
- "state": "NC",
413
- "activity_level": "8",
414
- "activity_level_label": "High",
415
- "num_sites": "7"
416
- },
417
- {
418
- "state_name": "Wyoming",
419
- "state": "WY",
420
- "activity_level": "No Data",
421
- "activity_level_label": "No Data",
422
- "num_sites": "0"
423
- },
424
- {
425
- "state_name": "Kansas",
426
- "state": "KS",
427
- "activity_level": "10",
428
- "activity_level_label": "Very High",
429
- "num_sites": "5"
430
- },
431
- {
432
- "state_name": "New Jersey",
433
- "state": "NJ",
434
- "activity_level": "8",
435
- "activity_level_label": "High",
436
- "num_sites": "23"
437
- },
438
- {
439
- "state_name": "Maryland",
440
- "state": "MD",
441
- "activity_level": "7",
442
- "activity_level_label": "High",
443
- "num_sites": "2"
444
- },
445
- {
446
- "state_name": "Alabama",
447
- "state": "AL",
448
- "activity_level": "7",
449
- "activity_level_label": "High",
450
- "num_sites": "5"
451
- },
452
- {
453
- "state_name": "Arizona",
454
- "state": "AZ",
455
- "activity_level": "7",
456
- "activity_level_label": "High",
457
- "num_sites": "8"
458
- },
459
- {
460
- "state_name": "Iowa",
461
- "state": "IA",
462
- "activity_level": "10",
463
- "activity_level_label": "Very High",
464
- "num_sites": "5"
465
- },
466
- {
467
- "state_name": "Massachusetts",
468
- "state": "MA",
469
- "activity_level": "6",
470
- "activity_level_label": "Moderate",
471
- "num_sites": "1"
472
- },
473
- {
474
- "state_name": "Kentucky",
475
- "state": "KY",
476
- "activity_level": "5",
477
- "activity_level_label": "Moderate",
478
- "num_sites": "1"
479
- },
480
- {
481
- "state_name": "Louisiana",
482
- "state": "LA",
483
- "activity_level": "No Data",
484
- "activity_level_label": "No Data",
485
- "num_sites": "0"
486
- },
487
- {
488
- "state_name": "Mississippi",
489
- "state": "MS",
490
- "activity_level": "No Data",
491
- "activity_level_label": "No Data",
492
- "num_sites": "0"
493
- },
494
- {
495
- "state_name": "Tennessee",
496
- "state": "TN",
497
- "activity_level": "6",
498
- "activity_level_label": "Moderate",
499
- "num_sites": "2"
500
- },
501
- {
502
- "state_name": "New Hampshire",
503
- "state": "NH",
504
- "activity_level": "5",
505
- "activity_level_label": "Moderate",
506
- "num_sites": "11"
507
- },
508
- {
509
- "state_name": "Florida",
510
- "state": "FL",
511
- "activity_level": "6",
512
- "activity_level_label": "Moderate",
513
- "num_sites": "16"
514
- },
515
- {
516
- "state_name": "Indiana",
517
- "state": "IN",
518
- "activity_level": "8",
519
- "activity_level_label": "High",
520
- "num_sites": "20"
521
- },
522
- {
523
- "state_name": "Idaho",
524
- "state": "ID",
525
- "activity_level": "7",
526
- "activity_level_label": "High",
527
- "num_sites": "9"
528
- },
529
- {
530
- "state_name": "South Carolina",
531
- "state": "SC",
532
- "activity_level": "4",
533
- "activity_level_label": "Low",
534
- "num_sites": "3"
535
- },
536
- {
537
- "state_name": "South Dakota",
538
- "state": "SD",
539
- "activity_level": "8",
540
- "activity_level_label": "High",
541
- "num_sites": "1"
542
- },
543
- {
544
- "state_name": "California",
545
- "state": "CA",
546
- "activity_level": "5",
547
- "activity_level_label": "Moderate",
548
- "num_sites": "62"
549
- },
550
- {
551
- "state_name": "New York",
552
- "state": "NY",
553
- "activity_level": "8",
554
- "activity_level_label": "High",
555
- "num_sites": "117"
556
- },
557
- {
558
- "state_name": "Wisconsin",
559
- "state": "WI",
560
- "activity_level": "9",
561
- "activity_level_label": "Very High",
562
- "num_sites": "39"
563
- },
564
- {
565
- "state_name": "Maine",
566
- "state": "ME",
567
- "activity_level": "8",
568
- "activity_level_label": "High",
569
- "num_sites": "14"
570
- },
571
- {
572
- "state_name": "Colorado",
573
- "state": "CO",
574
- "activity_level": "5",
575
- "activity_level_label": "Moderate",
576
- "num_sites": "46"
577
- }
578
- ]
579
- }
@@ -1,6 +0,0 @@
1
- .data-table-container {
2
- margin: 0;
3
- @include breakpointClass(md) {
4
- margin: 5px 1em;
5
- }
6
- }