@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.
- package/LICENSE +201 -0
- package/dist/cdcmap.js +32 -18
- package/examples/bubble-us.json +363 -0
- package/examples/bubble-world.json +427 -0
- package/examples/default-county.json +64 -12
- package/examples/default-geocode.json +746 -0
- package/examples/default-hex.json +477 -0
- package/examples/default-usa-regions.json +118 -0
- package/examples/default-usa.json +1 -1
- package/examples/default-world-data.json +1450 -0
- package/examples/default-world.json +5 -3
- package/examples/example-city-state.json +46 -1
- package/examples/gallery/categorical-qualitative.json +797 -0
- package/examples/gallery/categorical-scale-based.json +739 -0
- package/examples/gallery/city-state.json +479 -0
- package/examples/gallery/county.json +22731 -0
- package/examples/gallery/equal-interval.json +1027 -0
- package/examples/gallery/equal-number.json +1027 -0
- package/examples/gallery/filterable.json +909 -0
- package/examples/gallery/hex-filtered.json +420 -0
- package/examples/gallery/hex.json +413 -0
- package/examples/gallery/single-state.json +21402 -0
- package/examples/gallery/world.json +1592 -0
- package/examples/private/atsdr.json +439 -0
- package/examples/private/atsdr_new.json +436 -0
- package/examples/private/bubble.json +285 -0
- package/examples/private/city-state.json +428 -0
- package/examples/private/cty-issue.json +42768 -0
- package/examples/private/default-usa.json +460 -0
- package/examples/private/default-world-data.json +1444 -0
- package/examples/private/default.json +968 -0
- package/examples/private/legend-issue.json +1 -0
- package/examples/private/map-rounding-error.json +42759 -0
- package/examples/private/map.csv +60 -0
- package/examples/private/mdx.json +210 -0
- package/examples/private/monkeypox.json +376 -0
- package/examples/private/regions.json +52 -0
- package/examples/private/valid-data-map.csv +59 -0
- package/examples/private/wcmsrd-13881-data.json +2858 -0
- package/examples/private/wcmsrd-13881.json +5823 -0
- package/examples/private/wcmsrd-14492-data.json +292 -0
- package/examples/private/wcmsrd-14492.json +114 -0
- package/examples/private/wcmsrd-test.json +268 -0
- package/examples/private/world.json +1580 -0
- package/examples/private/worldmap.json +1490 -0
- package/package.json +51 -50
- package/src/CdcMap.js +1384 -1075
- package/src/components/BubbleList.js +244 -0
- package/src/components/CityList.js +79 -17
- package/src/components/CountyMap.js +104 -44
- package/src/components/DataTable.js +32 -22
- package/src/components/EditorPanel.js +977 -414
- package/src/components/Geo.js +1 -1
- package/src/components/Modal.js +2 -1
- package/src/components/NavigationMenu.js +4 -3
- package/src/components/Sidebar.js +14 -19
- package/src/components/SingleStateMap.js +178 -249
- package/src/components/UsaMap.js +104 -36
- package/src/components/UsaRegionMap.js +320 -0
- package/src/components/WorldMap.js +117 -34
- package/src/data/country-coordinates.js +250 -0
- package/src/data/{dfc-map.json → county-map.json} +0 -0
- package/src/data/initial-state.js +23 -3
- package/src/data/state-coordinates.js +55 -0
- package/src/data/supported-geos.js +101 -15
- package/src/data/us-regions-topo-2.json +360525 -0
- package/src/data/us-regions-topo.json +37894 -0
- package/src/hooks/useColorPalette.ts +96 -0
- package/src/index.html +8 -4
- package/src/scss/editor-panel.scss +78 -57
- package/src/scss/main.scss +1 -6
- package/src/scss/map.scss +126 -2
- package/src/scss/sidebar.scss +2 -1
- package/src/data/color-palettes.js +0 -200
- 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': ['
|
|
421
|
-
'US-GU': ['
|
|
422
|
-
'US-PR': ['
|
|
423
|
-
'US-VI': ['
|
|
424
|
-
'US-MP': ['
|
|
425
|
-
'US-FM': ['
|
|
426
|
-
'US-PW': ['
|
|
427
|
-
'US-MH': ['
|
|
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
|
-
|
|
456
|
-
|
|
457
|
-
|
|
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
|
-
|
|
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
|
-
'
|
|
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 = {
|