@cdc/map 4.24.9 → 4.24.11
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 +26371 -25867
- package/examples/private/DEV-9644.json +184 -0
- package/package.json +3 -3
- package/src/CdcMap.tsx +25 -12
- package/src/_stories/CdcMap.stories.tsx +2 -6
- package/src/_stories/CdcMapLegend.stories.tsx +86 -0
- package/src/_stories/_mock/usa-state-gradient.json +238 -0
- package/src/_stories/_mock/wastewater-map.json +208 -0
- package/src/components/Annotation/AnnotationDropdown.styles.css +0 -1
- package/src/components/CityList.tsx +55 -10
- package/src/components/DataTable.tsx +94 -17
- package/src/components/EditorPanel/components/EditorPanel.tsx +118 -64
- package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +27 -23
- package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +75 -16
- package/src/components/Legend/components/Legend.tsx +23 -19
- package/src/components/Legend/components/index.scss +23 -10
- package/src/components/UsaMap/components/HexIcon.tsx +7 -1
- package/src/components/UsaMap/components/Territory/Territory.Hexagon.tsx +56 -11
- package/src/components/UsaMap/components/Territory/Territory.Rectangle.tsx +88 -15
- package/src/components/UsaMap/components/Territory/TerritoryShape.ts +13 -0
- package/src/components/UsaMap/components/UsaMap.County.tsx +49 -48
- package/src/components/UsaMap/components/UsaMap.State.tsx +5 -4
- package/src/components/UsaMap/helpers/shapes.ts +207 -0
- package/src/coreStyles_map.scss +3 -0
- package/src/data/initial-state.js +1 -0
- package/src/index.jsx +7 -1
- package/src/scss/editor-panel.scss +5 -13
- package/src/scss/filters.scss +2 -7
- package/src/scss/main.scss +4 -9
- package/src/scss/map.scss +6 -6
- package/src/scss/mixins.scss +47 -0
- package/src/types/MapConfig.ts +6 -3
- package/src/types/MapContext.ts +0 -1
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
{
|
|
2
|
+
"annotations": [],
|
|
3
|
+
"general": {
|
|
4
|
+
"geoType": "us",
|
|
5
|
+
"type": "data",
|
|
6
|
+
"noStateFoundMessage": "Map Unavailable",
|
|
7
|
+
"annotationDropdownText": "Annotations",
|
|
8
|
+
"geoBorderColor": "darkGray",
|
|
9
|
+
"headerColor": "theme-blue",
|
|
10
|
+
"title": "",
|
|
11
|
+
"showTitle": true,
|
|
12
|
+
"showSidebar": true,
|
|
13
|
+
"showDownloadButton": true,
|
|
14
|
+
"showDownloadMediaButton": false,
|
|
15
|
+
"displayAsHex": false,
|
|
16
|
+
"displayStateLabels": false,
|
|
17
|
+
"territoriesLabel": "Territories",
|
|
18
|
+
"territoriesAlwaysShow": false,
|
|
19
|
+
"language": "en",
|
|
20
|
+
"geoLabelOverride": "",
|
|
21
|
+
"hasRegions": false,
|
|
22
|
+
"fullBorder": false,
|
|
23
|
+
"convertFipsCodes": true,
|
|
24
|
+
"palette": { "isReversed": false },
|
|
25
|
+
"allowMapZoom": true,
|
|
26
|
+
"hideGeoColumnInTooltip": false,
|
|
27
|
+
"hidePrimaryColumnInTooltip": false,
|
|
28
|
+
"statePicked": { "fipsCode": "01", "stateName": "Alabama" },
|
|
29
|
+
"expandDataTable": false
|
|
30
|
+
},
|
|
31
|
+
"type": "map",
|
|
32
|
+
"color": "pinkpurple",
|
|
33
|
+
"columns": {
|
|
34
|
+
"geo": { "name": "STATE", "label": "Location", "tooltip": false, "dataTable": true },
|
|
35
|
+
"primary": {
|
|
36
|
+
"dataTable": true,
|
|
37
|
+
"tooltip": true,
|
|
38
|
+
"prefix": "",
|
|
39
|
+
"suffix": "",
|
|
40
|
+
"name": "Rate",
|
|
41
|
+
"label": "",
|
|
42
|
+
"roundToPlace": 0
|
|
43
|
+
},
|
|
44
|
+
"navigate": { "name": "" },
|
|
45
|
+
"latitude": { "name": "" },
|
|
46
|
+
"longitude": { "name": "" }
|
|
47
|
+
},
|
|
48
|
+
"legend": {
|
|
49
|
+
"descriptions": {},
|
|
50
|
+
"specialClasses": [],
|
|
51
|
+
"unified": false,
|
|
52
|
+
"singleColumn": false,
|
|
53
|
+
"singleRow": false,
|
|
54
|
+
"verticalSorted": false,
|
|
55
|
+
"showSpecialClassesLast": false,
|
|
56
|
+
"dynamicDescription": false,
|
|
57
|
+
"type": "equalnumber",
|
|
58
|
+
"numberOfItems": 3,
|
|
59
|
+
"position": "top",
|
|
60
|
+
"title": "",
|
|
61
|
+
"style": "gradient",
|
|
62
|
+
"subStyle": "linear blocks",
|
|
63
|
+
"tickRotation": "",
|
|
64
|
+
"singleColumnLegend": false,
|
|
65
|
+
"hideBorder": true
|
|
66
|
+
},
|
|
67
|
+
"filters": [],
|
|
68
|
+
"table": {
|
|
69
|
+
"wrapColumns": false,
|
|
70
|
+
"label": "Data Table",
|
|
71
|
+
"expanded": false,
|
|
72
|
+
"limitHeight": false,
|
|
73
|
+
"height": "",
|
|
74
|
+
"caption": "",
|
|
75
|
+
"showDownloadUrl": false,
|
|
76
|
+
"showDataTableLink": true,
|
|
77
|
+
"showDownloadLinkBelow": true,
|
|
78
|
+
"showFullGeoNameInCSV": false,
|
|
79
|
+
"forceDisplay": true,
|
|
80
|
+
"download": true,
|
|
81
|
+
"indexLabel": ""
|
|
82
|
+
},
|
|
83
|
+
"tooltips": { "appearanceType": "hover", "linkLabel": "Learn More", "capitalizeLabels": true, "opacity": 90 },
|
|
84
|
+
"runtime": { "editorErrorMessage": [] },
|
|
85
|
+
"visual": {
|
|
86
|
+
"minBubbleSize": 1,
|
|
87
|
+
"maxBubbleSize": 20,
|
|
88
|
+
"extraBubbleBorder": false,
|
|
89
|
+
"cityStyle": "circle",
|
|
90
|
+
"cityStyleLabel": "",
|
|
91
|
+
"showBubbleZeros": false,
|
|
92
|
+
"additionalCityStyles": [],
|
|
93
|
+
"geoCodeCircleSize": 8
|
|
94
|
+
},
|
|
95
|
+
"mapPosition": { "coordinates": [0, 30], "zoom": 1 },
|
|
96
|
+
"map": { "layers": [], "patterns": [] },
|
|
97
|
+
"hexMap": {
|
|
98
|
+
"type": "",
|
|
99
|
+
"shapeGroups": [
|
|
100
|
+
{
|
|
101
|
+
"legendTitle": "",
|
|
102
|
+
"legendDescription": "",
|
|
103
|
+
"items": [{ "key": "", "shape": "Arrow Up", "column": "", "operator": "=", "value": "" }]
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"filterBehavior": "Filter Change",
|
|
108
|
+
"datasets": {},
|
|
109
|
+
"isResponsiveTicks": false,
|
|
110
|
+
"barThickness": "0.37",
|
|
111
|
+
"xAxis": { "type": "categorical", "size": 75, "maxTickRotation": 45, "labelOffset": 0 },
|
|
112
|
+
"data": [
|
|
113
|
+
{ "STATE": "Overall", "Rate": "55", "Location": "Vehicle", "URL": "https://www.cdc.gov" },
|
|
114
|
+
{ "STATE": "Alabama", "Rate": 130, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
115
|
+
{ "STATE": "Alaska", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
116
|
+
{ "STATE": "American Samoa", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
117
|
+
{ "STATE": "Arizona", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
118
|
+
{ "STATE": "Arkansas", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
119
|
+
{ "STATE": "California", "Rate": 30, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
120
|
+
{ "STATE": "Colorado", "Rate": 40, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
121
|
+
{ "STATE": "Connecticut", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
122
|
+
{ "STATE": "Deleware", "Rate": "57", "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
123
|
+
{ "STATE": "DC", "Rate": 60, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
124
|
+
{ "STATE": "Florida", "Rate": 30, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
125
|
+
{ "STATE": "Georgia", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
126
|
+
{ "STATE": "Guam", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
127
|
+
{ "STATE": "Hawaii", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
128
|
+
{ "STATE": "Idaho", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
129
|
+
{ "STATE": "Illinois", "Rate": 30, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
130
|
+
{ "STATE": "Indiana", "Rate": 40, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
131
|
+
{ "STATE": "Iowa", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
132
|
+
{ "STATE": "Kansas", "Rate": 57, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
133
|
+
{ "STATE": "Kentucky", "Rate": 60, "Location": "NA", "URL": "https://www.cdc.gov/" },
|
|
134
|
+
{ "STATE": "Louisiana", "Rate": 30, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
135
|
+
{ "STATE": "Maine", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
136
|
+
{ "STATE": "Marshall Islands", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
137
|
+
{ "STATE": "Maryland", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
138
|
+
{ "STATE": "Massachusetts", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
139
|
+
{ "STATE": "Michigan", "Rate": 12, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
140
|
+
{ "STATE": "Micronesia", "Rate": 65, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
141
|
+
{ "STATE": "Minnesota", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
142
|
+
{ "STATE": "Mississippi", "Rate": 57, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
143
|
+
{ "STATE": "Montana", "Rate": 60, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
144
|
+
{ "STATE": "Montana", "Rate": 30, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
145
|
+
{ "STATE": "Nebraska", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
146
|
+
{ "STATE": "Nevada", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
147
|
+
{ "STATE": "New Hampshire", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
148
|
+
{ "STATE": "New Jersey", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
149
|
+
{ "STATE": "New Mexico", "Rate": 12, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
150
|
+
{ "STATE": "New York", "Rate": 40, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
151
|
+
{ "STATE": "North Carolina", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
152
|
+
{ "STATE": "North Dakota", "Rate": 57, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
153
|
+
{ "STATE": "Northern Mariana Islands", "Rate": "60", "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
154
|
+
{ "STATE": "Ohio", "Rate": 88, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
155
|
+
{ "STATE": "Oklahoma", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
156
|
+
{ "STATE": "Oregon", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
157
|
+
{ "STATE": "Palau", "Rate": 15, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
158
|
+
{ "STATE": "Pennsylvania", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
159
|
+
{ "STATE": "Puerto Rico", "Rate": 30, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
160
|
+
{ "STATE": "Rhode Island", "Rate": 40, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
161
|
+
{ "STATE": "South Carolina", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
162
|
+
{ "STATE": "South Dakota", "Rate": 86, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
163
|
+
{ "STATE": "Tennessee", "Rate": 60, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
164
|
+
{ "STATE": "Texas", "Rate": 30, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
165
|
+
{ "STATE": "Utah", "Rate": 54, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
166
|
+
{ "STATE": "Vermont", "Rate": 40, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
167
|
+
{ "STATE": "Virgin Islands", "Rate": 55, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
168
|
+
{ "STATE": "Virginia", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
169
|
+
{ "STATE": "Washington", "Rate": 62, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
170
|
+
{ "STATE": "West Virginia", "Rate": 25, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
171
|
+
{ "STATE": "Wyoming", "Rate": 43, "Location": "Vehicle", "URL": "https://www.cdc.gov/" }
|
|
172
|
+
],
|
|
173
|
+
"dataFileName": "valid-data-map.csv",
|
|
174
|
+
"dataFileSourceType": "file",
|
|
175
|
+
"formattedData": [
|
|
176
|
+
{ "STATE": "Overall", "Rate": "55", "Location": "Vehicle", "URL": "https://www.cdc.gov" },
|
|
177
|
+
{ "STATE": "Alabama", "Rate": 130, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
178
|
+
{ "STATE": "Alaska", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
179
|
+
{ "STATE": "American Samoa", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
180
|
+
{ "STATE": "Arizona", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
181
|
+
{ "STATE": "Arkansas", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
182
|
+
{ "STATE": "California", "Rate": 30, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
183
|
+
{ "STATE": "Colorado", "Rate": 40, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
184
|
+
{ "STATE": "Connecticut", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
185
|
+
{ "STATE": "Deleware", "Rate": "57", "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
186
|
+
{ "STATE": "DC", "Rate": 60, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
187
|
+
{ "STATE": "Florida", "Rate": 30, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
188
|
+
{ "STATE": "Georgia", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
189
|
+
{ "STATE": "Guam", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
190
|
+
{ "STATE": "Hawaii", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
191
|
+
{ "STATE": "Idaho", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
192
|
+
{ "STATE": "Illinois", "Rate": 30, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
193
|
+
{ "STATE": "Indiana", "Rate": 40, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
194
|
+
{ "STATE": "Iowa", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
195
|
+
{ "STATE": "Kansas", "Rate": 57, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
196
|
+
{ "STATE": "Kentucky", "Rate": 60, "Location": "NA", "URL": "https://www.cdc.gov/" },
|
|
197
|
+
{ "STATE": "Louisiana", "Rate": 30, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
198
|
+
{ "STATE": "Maine", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
199
|
+
{ "STATE": "Marshall Islands", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
200
|
+
{ "STATE": "Maryland", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
201
|
+
{ "STATE": "Massachusetts", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
202
|
+
{ "STATE": "Michigan", "Rate": 12, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
203
|
+
{ "STATE": "Micronesia", "Rate": 65, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
204
|
+
{ "STATE": "Minnesota", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
205
|
+
{ "STATE": "Mississippi", "Rate": 57, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
206
|
+
{ "STATE": "Montana", "Rate": 60, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
207
|
+
{ "STATE": "Montana", "Rate": 30, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
208
|
+
{ "STATE": "Nebraska", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
209
|
+
{ "STATE": "Nevada", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
210
|
+
{ "STATE": "New Hampshire", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
211
|
+
{ "STATE": "New Jersey", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
212
|
+
{ "STATE": "New Mexico", "Rate": 12, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
213
|
+
{ "STATE": "New York", "Rate": 40, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
214
|
+
{ "STATE": "North Carolina", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
215
|
+
{ "STATE": "North Dakota", "Rate": 57, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
216
|
+
{ "STATE": "Northern Mariana Islands", "Rate": "60", "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
217
|
+
{ "STATE": "Ohio", "Rate": 88, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
218
|
+
{ "STATE": "Oklahoma", "Rate": 40, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
219
|
+
{ "STATE": "Oregon", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
220
|
+
{ "STATE": "Palau", "Rate": 15, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
221
|
+
{ "STATE": "Pennsylvania", "Rate": 60, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
222
|
+
{ "STATE": "Puerto Rico", "Rate": 30, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
223
|
+
{ "STATE": "Rhode Island", "Rate": 40, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
224
|
+
{ "STATE": "South Carolina", "Rate": 55, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
225
|
+
{ "STATE": "South Dakota", "Rate": 86, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
226
|
+
{ "STATE": "Tennessee", "Rate": 60, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
227
|
+
{ "STATE": "Texas", "Rate": 30, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
228
|
+
{ "STATE": "Utah", "Rate": 54, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
229
|
+
{ "STATE": "Vermont", "Rate": 40, "Location": "Home", "URL": "https://www.cdc.gov/" },
|
|
230
|
+
{ "STATE": "Virgin Islands", "Rate": 55, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
231
|
+
{ "STATE": "Virginia", "Rate": 57, "Location": "School", "URL": "https://www.cdc.gov/" },
|
|
232
|
+
{ "STATE": "Washington", "Rate": 62, "Location": "Work", "URL": "https://www.cdc.gov/" },
|
|
233
|
+
{ "STATE": "West Virginia", "Rate": 25, "Location": "Vehicle", "URL": "https://www.cdc.gov/" },
|
|
234
|
+
{ "STATE": "Wyoming", "Rate": 43, "Location": "Vehicle", "URL": "https://www.cdc.gov/" }
|
|
235
|
+
],
|
|
236
|
+
"dataDescription": { "horizontal": false, "series": false },
|
|
237
|
+
"version": "4.24.10"
|
|
238
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
{
|
|
2
|
+
"annotations": [],
|
|
3
|
+
"general": {
|
|
4
|
+
"geoBorderColor": "darkGray",
|
|
5
|
+
"headerColor": "theme-blue",
|
|
6
|
+
"title": "",
|
|
7
|
+
"showTitle": true,
|
|
8
|
+
"showSidebar": true,
|
|
9
|
+
"showDownloadButton": true,
|
|
10
|
+
"showDownloadMediaButton": false,
|
|
11
|
+
"displayAsHex": false,
|
|
12
|
+
"displayStateLabels": false,
|
|
13
|
+
"territoriesLabel": "Territories",
|
|
14
|
+
"territoriesAlwaysShow": false,
|
|
15
|
+
"language": "en",
|
|
16
|
+
"geoType": "us",
|
|
17
|
+
"geoLabelOverride": "State/Territory",
|
|
18
|
+
"hasRegions": false,
|
|
19
|
+
"fullBorder": false,
|
|
20
|
+
"type": "map",
|
|
21
|
+
"convertFipsCodes": true,
|
|
22
|
+
"palette": { "isReversed": false },
|
|
23
|
+
"allowMapZoom": true,
|
|
24
|
+
"hideGeoColumnInTooltip": false,
|
|
25
|
+
"hidePrimaryColumnInTooltip": false,
|
|
26
|
+
"statePicked": { "fipsCode": "01", "stateName": "Alabama" },
|
|
27
|
+
"expandDataTable": false,
|
|
28
|
+
"annotationDropdownText": "Annotations",
|
|
29
|
+
"noStateFoundMessage": "Map Unavailable",
|
|
30
|
+
"subtext": "<div class=\"text-left\">Data last updated on <span data-timestamp=\"nwss_rsv_sc2_flua_combined_state_map:Data_as_of\"></span> and presented through <span data-timestamp=\"nwss_rsv_sc2_flua_combined_state_map:Data_Presented_Through\"></span>. "
|
|
31
|
+
},
|
|
32
|
+
"type": "map",
|
|
33
|
+
"color": "greenbluereverse",
|
|
34
|
+
"columns": {
|
|
35
|
+
"geo": {
|
|
36
|
+
"name": "State",
|
|
37
|
+
"label": "Location",
|
|
38
|
+
"tooltip": false,
|
|
39
|
+
"dataTable": true
|
|
40
|
+
},
|
|
41
|
+
"primary": {
|
|
42
|
+
"dataTable": true,
|
|
43
|
+
"tooltip": true,
|
|
44
|
+
"prefix": "",
|
|
45
|
+
"suffix": "",
|
|
46
|
+
"name": "activity_level_label",
|
|
47
|
+
"label": "Viral Activity Level",
|
|
48
|
+
"roundToPlace": 0
|
|
49
|
+
},
|
|
50
|
+
"navigate": { "name": "" },
|
|
51
|
+
"latitude": { "name": "" },
|
|
52
|
+
"longitude": { "name": "" },
|
|
53
|
+
"additionalColumn1": {
|
|
54
|
+
"label": "Sites Currently Reporting",
|
|
55
|
+
"dataTable": true,
|
|
56
|
+
"tooltips": false,
|
|
57
|
+
"prefix": "",
|
|
58
|
+
"suffix": "",
|
|
59
|
+
"name": "num_sites",
|
|
60
|
+
"tooltip": true
|
|
61
|
+
},
|
|
62
|
+
"additionalColumn2": {
|
|
63
|
+
"label": "Limited Coverage",
|
|
64
|
+
"dataTable": true,
|
|
65
|
+
"tooltips": false,
|
|
66
|
+
"prefix": "",
|
|
67
|
+
"suffix": "",
|
|
68
|
+
"tooltip": false,
|
|
69
|
+
"name": "hatch"
|
|
70
|
+
},
|
|
71
|
+
"additionalColumn3": {
|
|
72
|
+
"label": "",
|
|
73
|
+
"dataTable": false,
|
|
74
|
+
"tooltips": false,
|
|
75
|
+
"prefix": "",
|
|
76
|
+
"suffix": "",
|
|
77
|
+
"tooltip": true,
|
|
78
|
+
"useCommas": true,
|
|
79
|
+
"name": "hatch"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"legend": {
|
|
83
|
+
"descriptions": {},
|
|
84
|
+
"specialClasses": [],
|
|
85
|
+
"unified": false,
|
|
86
|
+
"singleColumn": false,
|
|
87
|
+
"singleRow": true,
|
|
88
|
+
"verticalSorted": false,
|
|
89
|
+
"showSpecialClassesLast": true,
|
|
90
|
+
"dynamicDescription": false,
|
|
91
|
+
"type": "category",
|
|
92
|
+
"numberOfItems": 8,
|
|
93
|
+
"position": "bottom",
|
|
94
|
+
"title": "Wastewater Viral Activity Level",
|
|
95
|
+
"categoryValuesOrder": [
|
|
96
|
+
"Very High",
|
|
97
|
+
"High",
|
|
98
|
+
"Moderate",
|
|
99
|
+
"Low",
|
|
100
|
+
"Minimal",
|
|
101
|
+
"No Data"
|
|
102
|
+
],
|
|
103
|
+
"additionalCategories": [
|
|
104
|
+
"No Data",
|
|
105
|
+
"Minimal",
|
|
106
|
+
"Low",
|
|
107
|
+
"Moderate",
|
|
108
|
+
"High",
|
|
109
|
+
"Very High"
|
|
110
|
+
],
|
|
111
|
+
"description": "",
|
|
112
|
+
"style": "gradient",
|
|
113
|
+
"subStyle": "linear blocks",
|
|
114
|
+
"tickRotation": "",
|
|
115
|
+
"singleColumnLegend": false,
|
|
116
|
+
"hideBorder": false
|
|
117
|
+
},
|
|
118
|
+
"filters": [
|
|
119
|
+
{
|
|
120
|
+
"order": "asc",
|
|
121
|
+
"label": "Select a virus from the dropdown:",
|
|
122
|
+
"columnName": "pathogen",
|
|
123
|
+
"values": ["COVID-19", "Influenza A", "RSV"],
|
|
124
|
+
"active": "COVID-19",
|
|
125
|
+
"filterStyle": "dropdown"
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"table": {
|
|
129
|
+
"label": "Data Table",
|
|
130
|
+
"expanded": false,
|
|
131
|
+
"limitHeight": true,
|
|
132
|
+
"height": "500",
|
|
133
|
+
"caption": "",
|
|
134
|
+
"showDownloadUrl": true,
|
|
135
|
+
"showDataTableLink": true,
|
|
136
|
+
"showFullGeoNameInCSV": false,
|
|
137
|
+
"forceDisplay": true,
|
|
138
|
+
"download": true,
|
|
139
|
+
"indexLabel": "State/Territory",
|
|
140
|
+
"wrapColumns": false
|
|
141
|
+
},
|
|
142
|
+
"tooltips": {
|
|
143
|
+
"appearanceType": "hover",
|
|
144
|
+
"linkLabel": "Learn More",
|
|
145
|
+
"capitalizeLabels": true,
|
|
146
|
+
"opacity": 90
|
|
147
|
+
},
|
|
148
|
+
"visual": {
|
|
149
|
+
"minBubbleSize": 1,
|
|
150
|
+
"maxBubbleSize": 20,
|
|
151
|
+
"extraBubbleBorder": false,
|
|
152
|
+
"cityStyle": "circle",
|
|
153
|
+
"geoCodeCircleSize": 2,
|
|
154
|
+
"showBubbleZeros": false,
|
|
155
|
+
"cityStyleLabel": "",
|
|
156
|
+
"additionalCityStyles": []
|
|
157
|
+
},
|
|
158
|
+
"mapPosition": { "coordinates": [0, 30], "zoom": 1 },
|
|
159
|
+
"map": {
|
|
160
|
+
"layers": [],
|
|
161
|
+
"patterns": [
|
|
162
|
+
{
|
|
163
|
+
"dataKey": "hatch",
|
|
164
|
+
"pattern": "lines",
|
|
165
|
+
"dataValue": "Limited Coverage",
|
|
166
|
+
"label": "Limited Coverage*",
|
|
167
|
+
"size": "medium"
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"hexMap": {
|
|
172
|
+
"type": "",
|
|
173
|
+
"shapeGroups": [
|
|
174
|
+
{
|
|
175
|
+
"legendTitle": "",
|
|
176
|
+
"legendDescription": "",
|
|
177
|
+
"items": [
|
|
178
|
+
{
|
|
179
|
+
"key": "",
|
|
180
|
+
"shape": "Arrow Up",
|
|
181
|
+
"column": "",
|
|
182
|
+
"operator": "=",
|
|
183
|
+
"value": ""
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"filterBehavior": "Filter Change",
|
|
190
|
+
"customColors": [
|
|
191
|
+
"#34547B",
|
|
192
|
+
"#4B7F9B",
|
|
193
|
+
"#4B7F9B",
|
|
194
|
+
"#6BB0BD",
|
|
195
|
+
"#9FDAD0",
|
|
196
|
+
"#C8EFDA",
|
|
197
|
+
"#B4B4B4",
|
|
198
|
+
"#B4B4B4",
|
|
199
|
+
"#B4B4B4",
|
|
200
|
+
"#B4B4B4"
|
|
201
|
+
],
|
|
202
|
+
"datasets": {},
|
|
203
|
+
"dataFileName": "https://www.cdc.gov/wcms/vizdata/ncezid_didri/NWSSStateMapCombined.json",
|
|
204
|
+
"dataFileSourceType": "url",
|
|
205
|
+
"dataDescription": { "horizontal": false, "series": false },
|
|
206
|
+
"version": "4.24.9",
|
|
207
|
+
"dataUrl": "https://www.cdc.gov/wcms/vizdata/ncezid_didri/NWSSStateMapCombined.json"
|
|
208
|
+
}
|
|
@@ -8,7 +8,18 @@ import { getFilterControllingStatePicked } from './UsaMap/helpers/map'
|
|
|
8
8
|
|
|
9
9
|
import ConfigContext from '../context'
|
|
10
10
|
|
|
11
|
-
const CityList = ({
|
|
11
|
+
const CityList = ({
|
|
12
|
+
data,
|
|
13
|
+
geoClickHandler,
|
|
14
|
+
applyTooltipsToGeo,
|
|
15
|
+
displayGeoName,
|
|
16
|
+
applyLegendToRow,
|
|
17
|
+
titleCase,
|
|
18
|
+
setSharedFilterValue,
|
|
19
|
+
isFilterValueSupported,
|
|
20
|
+
tooltipId,
|
|
21
|
+
projection
|
|
22
|
+
}) => {
|
|
12
23
|
const [citiesData, setCitiesData] = useState({})
|
|
13
24
|
const { scale, state, topoData, runtimeData, position } = useContext(ConfigContext)
|
|
14
25
|
if (!projection) return
|
|
@@ -28,7 +39,9 @@ const CityList = ({ data, geoClickHandler, applyTooltipsToGeo, displayGeoName, a
|
|
|
28
39
|
|
|
29
40
|
if (state.general.type === 'bubble') {
|
|
30
41
|
const maxDataValue = Math.max(...(data ? Object.keys(data).map(key => data[key][state.columns.primary.name]) : [0]))
|
|
31
|
-
const sortedRuntimeData = Object.values(data).sort((a, b) =>
|
|
42
|
+
const sortedRuntimeData = Object.values(data).sort((a, b) =>
|
|
43
|
+
a[state.columns.primary.name] < b[state.columns.primary.name] ? 1 : -1
|
|
44
|
+
)
|
|
32
45
|
if (!sortedRuntimeData) return
|
|
33
46
|
|
|
34
47
|
// Set bubble sizes
|
|
@@ -84,7 +97,12 @@ const CityList = ({ data, geoClickHandler, applyTooltipsToGeo, displayGeoName, a
|
|
|
84
97
|
|
|
85
98
|
let transform = ''
|
|
86
99
|
|
|
87
|
-
if (
|
|
100
|
+
if (
|
|
101
|
+
!geoData?.[state.columns.longitude.name] &&
|
|
102
|
+
!geoData?.[state.columns.latitude.name] &&
|
|
103
|
+
city &&
|
|
104
|
+
supportedCities[city.toUpperCase()]
|
|
105
|
+
) {
|
|
88
106
|
transform = `translate(${projection(supportedCities[city.toUpperCase()])})`
|
|
89
107
|
}
|
|
90
108
|
|
|
@@ -96,7 +114,11 @@ const CityList = ({ data, geoClickHandler, applyTooltipsToGeo, displayGeoName, a
|
|
|
96
114
|
needsPointer = true
|
|
97
115
|
}
|
|
98
116
|
|
|
99
|
-
if (
|
|
117
|
+
if (
|
|
118
|
+
geoData?.[state.columns.longitude.name] &&
|
|
119
|
+
geoData?.[state.columns.latitude.name] &&
|
|
120
|
+
state.general.geoType === 'single-state'
|
|
121
|
+
) {
|
|
100
122
|
const statePicked = getFilterControllingStatePicked(state, runtimeData)
|
|
101
123
|
const _statePickedData = topoData?.states?.find(s => s.properties.name === statePicked)
|
|
102
124
|
// SVG ITEMS
|
|
@@ -112,8 +134,9 @@ const CityList = ({ data, geoClickHandler, applyTooltipsToGeo, displayGeoName, a
|
|
|
112
134
|
_statePickedData
|
|
113
135
|
)
|
|
114
136
|
let coords = [Number(geoData?.[state.columns.longitude.name]), Number(geoData?.[state.columns.latitude.name])]
|
|
115
|
-
|
|
116
|
-
|
|
137
|
+
transform = `translate(${newProjection(coords)}) scale(${
|
|
138
|
+
state.visual.geoCodeCircleSize / (position.zoom > 1 ? position.zoom : 1)
|
|
139
|
+
})`
|
|
117
140
|
needsPointer = true
|
|
118
141
|
}
|
|
119
142
|
|
|
@@ -123,8 +146,20 @@ const CityList = ({ data, geoClickHandler, applyTooltipsToGeo, displayGeoName, a
|
|
|
123
146
|
|
|
124
147
|
const styles = {
|
|
125
148
|
fill: legendColors[0],
|
|
126
|
-
opacity:
|
|
127
|
-
|
|
149
|
+
opacity:
|
|
150
|
+
setSharedFilterValue &&
|
|
151
|
+
isFilterValueSupported &&
|
|
152
|
+
data[city] &&
|
|
153
|
+
data[city][state.columns.geo.name] !== setSharedFilterValue
|
|
154
|
+
? 0.5
|
|
155
|
+
: 1,
|
|
156
|
+
stroke:
|
|
157
|
+
setSharedFilterValue &&
|
|
158
|
+
isFilterValueSupported &&
|
|
159
|
+
data[city] &&
|
|
160
|
+
data[city][state.columns.geo.name] === setSharedFilterValue
|
|
161
|
+
? 'rgba(0, 0, 0, 1)'
|
|
162
|
+
: 'rgba(0, 0, 0, 0.4)',
|
|
128
163
|
'&:hover': {
|
|
129
164
|
fill: legendColors[1],
|
|
130
165
|
outline: 0
|
|
@@ -137,7 +172,10 @@ const CityList = ({ data, geoClickHandler, applyTooltipsToGeo, displayGeoName, a
|
|
|
137
172
|
}
|
|
138
173
|
|
|
139
174
|
// If we need to add a cursor pointer
|
|
140
|
-
if (
|
|
175
|
+
if (
|
|
176
|
+
(state.columns.navigate && geoData?.[state.columns.navigate.name] && geoData[state.columns.navigate.name]) ||
|
|
177
|
+
state.tooltips.appearanceType === 'click'
|
|
178
|
+
) {
|
|
141
179
|
styles.cursor = 'pointer'
|
|
142
180
|
}
|
|
143
181
|
|
|
@@ -174,8 +212,14 @@ const CityList = ({ data, geoClickHandler, applyTooltipsToGeo, displayGeoName, a
|
|
|
174
212
|
})
|
|
175
213
|
|
|
176
214
|
if (cityStyle !== undefined && cityStyle.shape) {
|
|
177
|
-
if (
|
|
215
|
+
if (
|
|
216
|
+
!geoData?.[state.columns.longitude.name] &&
|
|
217
|
+
!geoData?.[state.columns.latitude.name] &&
|
|
218
|
+
city &&
|
|
219
|
+
supportedCities[city.toUpperCase()]
|
|
220
|
+
) {
|
|
178
221
|
let translate = `translate(${projection(supportedCities[city.toUpperCase()])})`
|
|
222
|
+
|
|
179
223
|
return (
|
|
180
224
|
<g key={i} transform={translate} style={styles} className='geo-point' tabIndex={-1}>
|
|
181
225
|
{cityStyleShapes[cityStyle.shape.toLowerCase()]}
|
|
@@ -186,6 +230,7 @@ const CityList = ({ data, geoClickHandler, applyTooltipsToGeo, displayGeoName, a
|
|
|
186
230
|
if (geoData?.[state.columns.longitude.name] && geoData?.[state.columns.latitude.name]) {
|
|
187
231
|
const coords = [Number(geoData?.[state.columns.longitude.name]), Number(geoData?.[state.columns.latitude.name])]
|
|
188
232
|
let translate = `translate(${projection(coords)})`
|
|
233
|
+
console.log(translate, 'translate')
|
|
189
234
|
return (
|
|
190
235
|
<g key={i} transform={translate} style={styles} className='geo-point' tabIndex={-1}>
|
|
191
236
|
{cityStyleShapes[cityStyle.shape.toLowerCase()]}
|