@cdc/map 4.23.2 → 4.23.4
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/dist/cdcmap.js +24661 -24191
- package/examples/custom-map-layers.json +764 -0
- package/examples/default-county.json +169 -155
- package/examples/default-geocode.json +744 -744
- package/examples/default-hex.json +3 -5
- package/examples/example-city-state-no-territories.json +703 -0
- package/examples/example-city-state.json +26 -7
- package/examples/example-city-stateBAD.json +744 -0
- package/examples/gallery/city-state.json +478 -478
- package/examples/testing-layer-2.json +1 -0
- package/examples/testing-layer.json +96 -0
- package/examples/world-geocode-data.json +18 -0
- package/examples/world-geocode.json +108 -0
- package/index.html +35 -29
- package/package.json +6 -3
- package/src/CdcMap.jsx +179 -111
- package/src/components/CityList.jsx +35 -35
- package/src/components/CountyMap.jsx +309 -446
- package/src/components/DataTable.jsx +7 -31
- package/src/components/EditorPanel.jsx +468 -217
- package/src/components/Sidebar.jsx +2 -0
- package/src/components/UsaMap.jsx +34 -23
- package/src/components/WorldMap.jsx +40 -8
- package/src/data/feature-test.json +73 -0
- package/src/data/initial-state.js +10 -3
- package/src/data/supported-geos.js +7 -7
- package/src/hooks/useMapLayers.jsx +243 -0
- package/src/index.jsx +4 -8
- package/src/scss/editor-panel.scss +97 -97
- package/src/scss/filters.scss +0 -2
- package/src/scss/main.scss +25 -26
- package/src/scss/map.scss +12 -0
- package/src/test/CdcMap.test.jsx +19 -0
- package/vite.config.js +3 -3
- package/src/components/Filters.jsx +0 -113
- package/src/hooks/useColorPalette.ts +0 -88
|
@@ -1,157 +1,171 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
2
|
+
"general": {
|
|
3
|
+
"title": "Default County Map",
|
|
4
|
+
"subtext": "",
|
|
5
|
+
"territoriesLabel": "Territories",
|
|
6
|
+
"type": "data",
|
|
7
|
+
"geoType": "us-county",
|
|
8
|
+
"headerColor": "theme-blue",
|
|
9
|
+
"showSidebar": true,
|
|
10
|
+
"showTitle": true,
|
|
11
|
+
"geoBorderColor": "darkGray",
|
|
12
|
+
"showDownloadButton": true,
|
|
13
|
+
"expandDataTable": false,
|
|
14
|
+
"showDownloadMediaButton": false,
|
|
15
|
+
"displayAsHex": false,
|
|
16
|
+
"displayStateLabels": false,
|
|
17
|
+
"language": "en",
|
|
18
|
+
"hasRegions": false,
|
|
19
|
+
"fullBorder": false,
|
|
20
|
+
"palette": {
|
|
21
|
+
"isReversed": false
|
|
22
|
+
},
|
|
23
|
+
"allowMapZoom": true,
|
|
24
|
+
"hideGeoColumnInTooltip": false,
|
|
25
|
+
"hidePrimaryColumnInTooltip": false,
|
|
26
|
+
"statePicked": {
|
|
27
|
+
"fipsCode": "01",
|
|
28
|
+
"stateName": "Alabama"
|
|
29
|
+
},
|
|
30
|
+
"equalNumberOptIn": true
|
|
31
|
+
},
|
|
32
|
+
"map": {
|
|
33
|
+
"layers": [
|
|
34
|
+
{
|
|
35
|
+
"name": "Layer One",
|
|
36
|
+
"url": "./examples/testing-layer.json",
|
|
37
|
+
"namespace": "cove"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Layer Two",
|
|
41
|
+
"url": "./examples/testing-layer.json",
|
|
42
|
+
"namespace": "cove"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"type": "map",
|
|
47
|
+
"color": "pinkpurple",
|
|
48
|
+
"columns": {
|
|
49
|
+
"geo": {
|
|
50
|
+
"name": "FIPS Codes",
|
|
51
|
+
"label": "Location",
|
|
52
|
+
"tooltip": false,
|
|
53
|
+
"dataTable": true
|
|
54
|
+
},
|
|
55
|
+
"primary": {
|
|
56
|
+
"name": "Insured Rate",
|
|
57
|
+
"label": "Data Label",
|
|
58
|
+
"prefix": "",
|
|
59
|
+
"suffix": "%",
|
|
60
|
+
"dataTable": true,
|
|
61
|
+
"tooltip": true
|
|
62
|
+
},
|
|
63
|
+
"navigate": {
|
|
64
|
+
"name": "",
|
|
65
|
+
"tooltip": false,
|
|
66
|
+
"dataTable": false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"legend": {
|
|
70
|
+
"numberOfItems": 3,
|
|
71
|
+
"position": "side",
|
|
72
|
+
"title": "Legend Title",
|
|
73
|
+
"description": "Legend Text",
|
|
74
|
+
"type": "equalnumber",
|
|
75
|
+
"specialClasses": [
|
|
76
|
+
{
|
|
77
|
+
"key": "Insured Rate",
|
|
78
|
+
"value": "18",
|
|
79
|
+
"label": "18"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"descriptions": {},
|
|
83
|
+
"unified": false,
|
|
84
|
+
"singleColumn": false,
|
|
85
|
+
"dynamicDescription": false
|
|
86
|
+
},
|
|
87
|
+
"filters": [],
|
|
88
|
+
"dataTable": {
|
|
89
|
+
"title": "Data Table",
|
|
90
|
+
"forceDisplay": true
|
|
91
|
+
},
|
|
92
|
+
"tooltips": {
|
|
93
|
+
"appearanceType": "hover",
|
|
94
|
+
"linkLabel": "Learn More",
|
|
95
|
+
"capitalizeLabels": true
|
|
96
|
+
},
|
|
97
|
+
"runtime": {
|
|
98
|
+
"editorErrorMessage": []
|
|
99
|
+
},
|
|
100
|
+
"visual": {
|
|
101
|
+
"minBubbleSize": 1,
|
|
102
|
+
"maxBubbleSize": 20,
|
|
103
|
+
"extraBubbleBorder": false,
|
|
104
|
+
"cityStyle": "circle"
|
|
105
|
+
},
|
|
106
|
+
"mapPosition": {
|
|
107
|
+
"coordinates": [
|
|
108
|
+
0,
|
|
109
|
+
30
|
|
110
|
+
],
|
|
111
|
+
"zoom": 1
|
|
112
|
+
},
|
|
113
|
+
"data": [
|
|
114
|
+
{
|
|
115
|
+
"Insured Rate": 8,
|
|
116
|
+
"Coverage Status": "Insured",
|
|
117
|
+
"FIPS Codes": "06071",
|
|
118
|
+
"Year (Good filter option)": "2010",
|
|
119
|
+
"link": ""
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"Insured Rate": 0,
|
|
123
|
+
"Coverage Status": "Insured",
|
|
124
|
+
"FIPS Codes": "55005",
|
|
125
|
+
"Year (Good filter option)": "2010",
|
|
126
|
+
"link": "https://cdc.gov"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"Insured Rate": 25,
|
|
130
|
+
"Coverage Status": "Insured",
|
|
131
|
+
"FIPS Codes": "12103",
|
|
132
|
+
"Year (Good filter option)": "2010",
|
|
133
|
+
"link": ""
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"Insured Rate": 25,
|
|
137
|
+
"Coverage Status": "Insured",
|
|
138
|
+
"FIPS Codes": "32005",
|
|
139
|
+
"Year (Good filter option)": "2010",
|
|
140
|
+
"link": ""
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"Insured Rate": 18,
|
|
144
|
+
"Coverage Status": "Insured",
|
|
145
|
+
"FIPS Codes": "06075",
|
|
146
|
+
"Year (Good filter option)": "2010",
|
|
147
|
+
"link": ""
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"Insured Rate": 3,
|
|
151
|
+
"Coverage Status": "Insured",
|
|
152
|
+
"FIPS Codes": "06027",
|
|
153
|
+
"Year (Good filter option)": "2010",
|
|
154
|
+
"link": ""
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"Insured Rate": 25,
|
|
158
|
+
"Coverage Status": "Insured",
|
|
159
|
+
"FIPS Codes": "06029",
|
|
160
|
+
"Year (Good filter option)": "2010",
|
|
161
|
+
"link": ""
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"Insured Rate": 60,
|
|
165
|
+
"Coverage Status": "Insured",
|
|
166
|
+
"FIPS Codes": "06065",
|
|
167
|
+
"Year (Good filter option)": "2010",
|
|
168
|
+
"link": ""
|
|
169
|
+
}
|
|
170
|
+
]
|
|
157
171
|
}
|