@cdc/map 2.6.3 → 4.22.10

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 (75) hide show
  1. package/LICENSE +201 -0
  2. package/dist/cdcmap.js +32 -18
  3. package/examples/bubble-us.json +363 -0
  4. package/examples/bubble-world.json +427 -0
  5. package/examples/default-county.json +64 -12
  6. package/examples/default-geocode.json +746 -0
  7. package/examples/default-hex.json +477 -0
  8. package/examples/default-usa-regions.json +118 -0
  9. package/examples/default-usa.json +1 -1
  10. package/examples/default-world-data.json +1450 -0
  11. package/examples/default-world.json +5 -3
  12. package/examples/example-city-state.json +46 -1
  13. package/examples/gallery/categorical-qualitative.json +797 -0
  14. package/examples/gallery/categorical-scale-based.json +739 -0
  15. package/examples/gallery/city-state.json +479 -0
  16. package/examples/gallery/county.json +22731 -0
  17. package/examples/gallery/equal-interval.json +1027 -0
  18. package/examples/gallery/equal-number.json +1027 -0
  19. package/examples/gallery/filterable.json +909 -0
  20. package/examples/gallery/hex-filtered.json +420 -0
  21. package/examples/gallery/hex.json +413 -0
  22. package/examples/gallery/single-state.json +21402 -0
  23. package/examples/gallery/world.json +1592 -0
  24. package/examples/private/atsdr.json +439 -0
  25. package/examples/private/atsdr_new.json +436 -0
  26. package/examples/private/bubble.json +285 -0
  27. package/examples/private/city-state.json +428 -0
  28. package/examples/private/cty-issue.json +42768 -0
  29. package/examples/private/default-usa.json +460 -0
  30. package/examples/private/default-world-data.json +1444 -0
  31. package/examples/private/default.json +968 -0
  32. package/examples/private/legend-issue.json +1 -0
  33. package/examples/private/map-rounding-error.json +42759 -0
  34. package/examples/private/map.csv +60 -0
  35. package/examples/private/mdx.json +210 -0
  36. package/examples/private/monkeypox.json +376 -0
  37. package/examples/private/regions.json +52 -0
  38. package/examples/private/valid-data-map.csv +59 -0
  39. package/examples/private/wcmsrd-13881-data.json +2858 -0
  40. package/examples/private/wcmsrd-13881.json +5823 -0
  41. package/examples/private/wcmsrd-14492-data.json +292 -0
  42. package/examples/private/wcmsrd-14492.json +114 -0
  43. package/examples/private/wcmsrd-test.json +268 -0
  44. package/examples/private/world.json +1580 -0
  45. package/examples/private/worldmap.json +1490 -0
  46. package/package.json +51 -50
  47. package/src/CdcMap.js +1384 -1075
  48. package/src/components/BubbleList.js +244 -0
  49. package/src/components/CityList.js +79 -17
  50. package/src/components/CountyMap.js +104 -44
  51. package/src/components/DataTable.js +32 -22
  52. package/src/components/EditorPanel.js +977 -414
  53. package/src/components/Geo.js +1 -1
  54. package/src/components/Modal.js +2 -1
  55. package/src/components/NavigationMenu.js +4 -3
  56. package/src/components/Sidebar.js +14 -19
  57. package/src/components/SingleStateMap.js +178 -249
  58. package/src/components/UsaMap.js +104 -36
  59. package/src/components/UsaRegionMap.js +320 -0
  60. package/src/components/WorldMap.js +117 -34
  61. package/src/data/country-coordinates.js +250 -0
  62. package/src/data/{dfc-map.json → county-map.json} +0 -0
  63. package/src/data/initial-state.js +23 -3
  64. package/src/data/state-coordinates.js +55 -0
  65. package/src/data/supported-geos.js +101 -15
  66. package/src/data/us-regions-topo-2.json +360525 -0
  67. package/src/data/us-regions-topo.json +37894 -0
  68. package/src/hooks/useColorPalette.ts +96 -0
  69. package/src/index.html +8 -4
  70. package/src/scss/editor-panel.scss +78 -57
  71. package/src/scss/main.scss +1 -6
  72. package/src/scss/map.scss +126 -2
  73. package/src/scss/sidebar.scss +2 -1
  74. package/src/data/color-palettes.js +0 -200
  75. package/src/images/map-folded.svg +0 -1
@@ -7,6 +7,7 @@ export const supportedStates = {
7
7
  'US-CA': ['CALIFORNIA', 'CA'],
8
8
  'US-CO': ['COLORADO', 'CO'],
9
9
  'US-CT': ['CONNECTICUT', 'CT'],
10
+ 'US-DC': ['District of Columbia', 'DC'],
10
11
  'US-DE': ['DELAWARE', 'DE'],
11
12
  'US-FL': ['FLORIDA', 'FL'],
12
13
  'US-GA': ['GEORGIA', 'GA'],
@@ -52,6 +53,18 @@ export const supportedStates = {
52
53
  'US-WY': ['WYOMING', 'WY']
53
54
  };
54
55
 
56
+ export const supportedRegions = {
57
+ 'region 1': ['REGION 1', 'R1'],
58
+ 'region 2': ['REGION 2', 'R2'],
59
+ 'region 3': ['REGION 3', 'R3'],
60
+ 'region 4': ['REGION 4', 'R4'],
61
+ 'region 5': ['REGION 5', 'R5'],
62
+ 'region 6': ['REGION 6', 'R6'],
63
+ 'region 7': ['REGION 7', 'R7'],
64
+ 'region 8': ['REGION 8', 'R8'],
65
+ 'region 9': ['REGION 9', 'R9'],
66
+ 'region 10': ['REGION 10', 'R10']
67
+ }
55
68
 
56
69
  export const stateToIso = {
57
70
  // States
@@ -107,6 +120,62 @@ export const stateToIso = {
107
120
  'Wyoming': 'US-WY',
108
121
  };
109
122
 
123
+ export const stateFipsToTwoDigit = {
124
+ ['01']: "AL",
125
+ ['02']: "AK",
126
+ ['04']: "AZ",
127
+ ['05']: "AR",
128
+ ['06']: "CA",
129
+ ['08']: "CO",
130
+ ['09']: "CT",
131
+ 10: "DE",
132
+ 11: "DC",
133
+ 12: "FL",
134
+ 13: "GA",
135
+ 15: "HI",
136
+ 16: "ID",
137
+ 17: "IL",
138
+ 18: "IN",
139
+ 19: "IA",
140
+ 20: "KS",
141
+ 21: "KY",
142
+ 22: "LA",
143
+ 23: "ME",
144
+ 24: "MD",
145
+ 25: "MA",
146
+ 26: "MI",
147
+ 27: "MN",
148
+ 28: "MS",
149
+ 29: "MO",
150
+ 30: "MT",
151
+ 31: "NE",
152
+ 32: "NV",
153
+ 33: "NH",
154
+ 34: "NJ",
155
+ 35: "NM",
156
+ 36: "NY",
157
+ 37: "NC",
158
+ 38: "ND",
159
+ 39: "OH",
160
+ 40: "OK",
161
+ 41: "OR",
162
+ 42: "PA",
163
+ 44: "RI",
164
+ 45: "SC",
165
+ 46: "SD",
166
+ 47: "TN",
167
+ 48: "TX",
168
+ 49: "UT",
169
+ 50: "VT",
170
+ 51: "VA",
171
+ 53: "WA",
172
+ 54: "WV",
173
+ 55: "WI",
174
+ 56: "WY",
175
+ 72: "PR",
176
+ 78: "VI"
177
+ }
178
+
110
179
  export const supportedStatesFipsCodes = {
111
180
  '01': 'Alabama',
112
181
  '02': 'Alaska',
@@ -214,7 +283,7 @@ export const supportedCountries = {
214
283
  CCK: ['Cocos (Keeling) Islands', 'Cocos (Keeling) Islands (Australia)'],
215
284
  COL: ['Colombia'],
216
285
  COM: ['Comoros'],
217
- COG: ['Congo', 'Congo, Republic of the'],
286
+ COG: ['Congo', 'Congo, Republic of the', 'Republic of the Congo'],
218
287
  COD: ['Democratic Republic of the Congo', 'Congo, Democratic Republic of the', 'Congo, the Democratic Republic of the', 'Dem. Rep. Congo'],
219
288
  COK: ['Cook Islands', 'Cook Is.', 'Cook Islands (New Zealand)'],
220
289
  CRI: ['Costa Rica'],
@@ -417,18 +486,23 @@ export const supportedCountries = {
417
486
  };
418
487
 
419
488
  export const supportedTerritories = {
420
- 'US-AS': ['American Samoa', 'AS'],
421
- 'US-GU': ['Guam', 'GU'],
422
- 'US-PR': ['Puerto Rico', 'PR'],
423
- 'US-VI': ['Virgin Islands', 'VI'],
424
- 'US-MP': ['Northern Marianas', 'MP', 'CNMI'],
425
- 'US-FM': ['Micronesia', 'FM', 'Federated States of Micronesia'], // Note: Key is not an official ISO code
426
- 'US-PW': ['Palau', 'PW'], // Note: Key is not an official ISO code
427
- 'US-MH': ['Marshall Islands', 'MH', 'RMI'], // Note: Key is not an official ISO code
489
+ 'US-AS': ['AMERICAN SAMOA', 'AS'],
490
+ 'US-GU': ['GUAM', 'GU'],
491
+ 'US-PR': ['PUERTO RICO', 'PR'],
492
+ 'US-VI': ['VIRGIN ISLANDS', 'VI'],
493
+ 'US-MP': ['NORTHERN MARIANAS', 'MP', 'CNMI'],
494
+ 'US-FM': ['MICRONESIA', 'FM', 'Federated States of Micronesia'], // Note: Key is not an official ISO code
495
+ 'US-PW': ['PALAU', 'PW'], // Note: Key is not an official ISO code
496
+ 'US-MH': ['MARSHALL ISLANDS', 'MH', 'RMI'], // Note: Key is not an official ISO code
428
497
  };
429
498
 
430
499
  export const supportedCities = {
500
+ 'GAINESVILLE': [-82.3248, 29.6516],
431
501
  'DISTRICT OF COLUMBIA': [-77.036873, 38.907192],
502
+ 'US-DC': [-77.036873, 38.907192],
503
+ 'WASHINGTON D.C.': [-77.036873, 38.907192],
504
+ 'WASHINGTON DC.': [-77.036873, 38.907192],
505
+ 'WASHINGTON DC': [-77.036873, 38.907192],
432
506
  'LOS ANGELES COUNTY': [-118.229362, 34.058762],
433
507
  MESA: [-111.831474, 33.415184],
434
508
  PHOENIX: [-112.074036, 33.448376],
@@ -452,9 +526,9 @@ export const supportedCities = {
452
526
  LOUISVILLE: [-85.758453, 38.252666],
453
527
  'NEW ORLEANS': [-90.071533, 29.951065],
454
528
  BOSTON: [-71.058884, 42.360081],
455
- Baltimore: [-76.612190, 39.290386],
456
- Detroit: [-83.045753, 42.331429],
457
- Minneapolis: [-93.265015, 44.977753],
529
+ BALTIMORE: [-76.612190, 39.290386],
530
+ DETROIT: [-83.045753, 42.331429],
531
+ MINNEAPOLIS: [-93.265015, 44.977753],
458
532
  'KANSAS CITY': [-94.578568, 39.099728],
459
533
  CHARLOTTE: [-80.843124, 35.227085],
460
534
  RALEIGH: [-78.638176, 35.779591],
@@ -462,12 +536,13 @@ export const supportedCities = {
462
536
  'NEW YORK CITY': [-74.005974, 40.712776],
463
537
  OMAHA: [-95.934502, 41.256538],
464
538
  'LAS VEGAS': [-115.139832, 36.169941],
539
+ SALEM:[-88.945618,38.626991],
465
540
  CLEVELAND: [-81.694359, 41.499321],
466
541
  COLUMBUS: [-82.998795, 39.961178],
467
542
  'OKLAHOMA CITY': [-97.516426, 35.467560],
468
543
  TULSA: [-95.992775, 36.153980],
469
544
  PORTLAND: [-122.658722, 45.512230],
470
- PHILIDELPHIA: [-75.165222, 39.952583],
545
+ PHILADELPHIA: [-75.165222, 39.952583],
471
546
  NASHVILLE: [-86.781601, 36.162663],
472
547
  MEMPHIS: [-90.048981, 35.149532],
473
548
  ARLINGTON: [-97.108063, 32.735687],
@@ -488,11 +563,16 @@ export const supportedCities = {
488
563
  HONOLULU: [-157.858337, 21.306944],
489
564
  'SANTA ANA': [-117.867653, 33.745472],
490
565
  RIVERSIDE: [-117.375496, 33.980602],
566
+ 'SAN BERNARDINO':[-117.302399,34.115784],
567
+ 'SANTA CLARA':[-121.955238,37.354107],
568
+ MARION:[-88.9330556,37.7305556],
569
+ PASADENA:[-95.209099,29.691063],
491
570
  'CORPUS CHRISTI': [-97.396378, 27.800583],
492
571
  LEXINGTON: [-84.503716, 38.040585],
493
572
  STOCKTON: [-121.290779, 37.957703],
494
573
  HENDERSON: [-114.981720, 36.039524],
495
574
  'SAINT PAUL': [-93.089958, 44.953705],
575
+ 'ST PAUL': [ -93.089958, 44.953705],
496
576
  'ST. LOUIS': [-90.199402, 38.627003],
497
577
  CINCINNATI: [-84.512016, 39.103119],
498
578
  PITTSBURGH: [-79.995888, 40.440624],
@@ -506,7 +586,8 @@ export const supportedCities = {
506
586
  TOLEDO: [-83.537865, 41.652805],
507
587
  DURHAM: [-78.898621, 35.994034],
508
588
  'CHULA VISTA': [-117.084198, 32.640053],
509
- 'FOR WAYNE': [-85.139351, 41.079273],
589
+ 'FORT WAYNE': [-85.139351, 41.079273],
590
+ 'FT WAYNE': [-85.139351, 41.079273],
510
591
  'JERSEY CITY': [-74.077644, 40.728157],
511
592
  'ST. PETERSBURG': [-82.640289, 27.767601],
512
593
  LAREDO: [-99.507553, 27.503561],
@@ -519,6 +600,7 @@ export const supportedCities = {
519
600
  GLENDALE: [-118.255074, 34.142509],
520
601
  GILBERT: [-111.789024, 33.352825],
521
602
  'WINSTON-SALEM': [-80.244217, 36.099861],
603
+ 'WINSTON SALEM': [-80.244217, 36.099861],
522
604
  'NORTH LAS VEGAS': [-115.114571, 36.195850],
523
605
  NORFOLK: [-76.285873, 36.850769],
524
606
  CHESAPEAKE: [-76.287491, 36.768208],
@@ -531,7 +613,11 @@ export const supportedCities = {
531
613
  'BATON ROUGE': [-91.187149, 30.451468],
532
614
  SPOKANE: [-117.426048, 47.658779],
533
615
  'MARION COUNTY, INDIANA': [-86.136543, 39.781029],
534
- 'MONTGOMERY COUNTY, MARYLAND': [-77.199406, 39.153515]
616
+ 'MONTGOMERY COUNTY, MARYLAND': [-77.199406, 39.153515],
617
+ BIRMINGHAM: [-86.9902166, 33.5314447],
618
+ HERSHEY: [-76.6779444, 40.2849997 ],
619
+ 'SALT LAKE CITY': [-112.0605644, 40.7767833],
620
+ SYRACUSE: [-76.1742992, 43.0352913]
535
621
  };
536
622
 
537
623
  export const supportedCounties = {