@cdc/map 2.6.2 → 2.6.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 +37 -29
- package/examples/bubble-us.json +363 -0
- package/examples/bubble-world.json +427 -0
- package/examples/default-county.json +105 -0
- package/examples/default-hex.json +475 -0
- package/examples/default-single-state.json +109 -0
- package/examples/default-usa-regions.json +118 -0
- package/examples/default-usa.json +744 -603
- package/examples/default-world-data.json +1450 -0
- package/examples/default-world.json +5 -3
- package/examples/example-city-state.json +510 -0
- package/examples/example-world-map.json +1596 -0
- package/examples/gender-rate-map.json +1 -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/default-world-data.json +1444 -0
- package/examples/private/default.json +968 -0
- package/examples/private/map.csv +60 -0
- package/examples/private/mdx.json +210 -0
- package/examples/private/regions.json +52 -0
- package/examples/private/wcmsrd-13881-data.json +2858 -0
- package/examples/private/wcmsrd-13881.json +5823 -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 +11 -7
- package/src/CdcMap.js +726 -202
- package/src/components/BubbleList.js +240 -0
- package/src/components/CityList.js +22 -3
- package/src/components/CountyMap.js +557 -0
- package/src/components/DataTable.js +85 -24
- package/src/components/EditorPanel.js +2455 -1204
- package/src/components/Geo.js +1 -1
- package/src/components/Sidebar.js +5 -5
- package/src/components/SingleStateMap.js +326 -0
- package/src/components/UsaMap.js +41 -9
- package/src/components/UsaRegionMap.js +319 -0
- package/src/components/WorldMap.js +112 -35
- package/src/data/abbreviations.js +57 -0
- package/src/data/country-coordinates.js +250 -0
- package/src/data/county-map-halfquality.json +58453 -0
- package/src/data/county-map-quarterquality.json +1 -0
- package/src/data/county-topo.json +1 -0
- package/src/data/dfc-map.json +1 -0
- package/src/data/initial-state.js +21 -4
- package/src/data/newtest.json +1 -0
- package/src/data/state-abbreviations.js +60 -0
- package/src/data/state-coordinates.js +55 -0
- package/src/data/supported-geos.js +3592 -163
- package/src/data/test.json +1 -0
- package/src/data/us-regions-topo-2.json +360525 -0
- package/src/data/us-regions-topo.json +37894 -0
- package/src/hooks/useActiveElement.js +19 -0
- package/src/hooks/useColorPalette.ts +96 -0
- package/src/index.html +35 -20
- package/src/index.js +8 -4
- package/src/scss/datatable.scss +2 -1
- package/src/scss/editor-panel.scss +76 -55
- package/src/scss/main.scss +10 -1
- package/src/scss/map.scss +257 -121
- package/src/scss/sidebar.scss +0 -1
- package/uploads/upload-example-city-state.json +392 -0
- package/uploads/upload-example-world-data.json +1490 -0
- package/LICENSE +0 -201
- package/src/data/color-palettes.js +0 -191
- package/src/images/map-folded.svg +0 -1
package/src/scss/map.scss
CHANGED
|
@@ -1,158 +1,294 @@
|
|
|
1
1
|
// Map Download UI
|
|
2
2
|
.map-downloads {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
position: relative;
|
|
4
|
+
z-index: 3;
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
.map-downloads__ui.btn-group {
|
|
7
|
+
transform: scale(0.8);
|
|
8
|
+
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
.map-downloads__ui {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0.5em;
|
|
13
|
+
left: 0.5em;
|
|
14
|
+
transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
|
|
15
|
+
box-shadow: 0 5px 12px -8px rgba(0, 0, 0, 0.5);
|
|
16
|
+
user-select: none;
|
|
17
|
+
height: 42px;
|
|
18
|
+
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.map-container {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
&.full-border {
|
|
23
|
+
border: #c2c2c2 1px solid;
|
|
24
|
+
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
header + .map-container.full-border {
|
|
28
|
-
|
|
28
|
+
border-top: 0; // When they have a header, don't add a border top
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// World Specific Styles
|
|
32
32
|
.map-container.world {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
&.data .geography-container {
|
|
34
|
+
border-bottom: $lightGray 1px solid;
|
|
35
|
+
}
|
|
36
|
+
.geography-container {
|
|
37
|
+
cursor: move;
|
|
38
|
+
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
@include breakpointClass(md) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
// US Specific
|
|
43
|
+
.map-container.us {
|
|
44
|
+
margin: 0 1em;
|
|
45
|
+
}
|
|
46
|
+
// Data Specific
|
|
47
|
+
.map-container.data {
|
|
48
|
+
&.side {
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Bubble Specific
|
|
53
|
+
.map-container.bubble {
|
|
54
|
+
&.side {
|
|
55
|
+
flex-direction: row;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
.geography-container {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
position: relative;
|
|
62
|
+
flex-grow: 1;
|
|
63
|
+
width: 100%;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
.geo-point {
|
|
66
|
+
transition: 0.3s all;
|
|
67
|
+
circle {
|
|
68
|
+
fill: inherit;
|
|
69
|
+
transition: 0.1s transform;
|
|
70
|
+
}
|
|
71
|
+
&:hover {
|
|
72
|
+
transition: 0.2s all;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.map-logo {
|
|
76
|
+
position: absolute;
|
|
77
|
+
bottom: 2em;
|
|
78
|
+
right: 1em;
|
|
79
|
+
z-index: 3;
|
|
80
|
+
width: 75px;
|
|
81
|
+
}
|
|
76
82
|
}
|
|
77
83
|
|
|
78
84
|
.single-geo {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
transition: 0.2s fill;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
&:focus {
|
|
88
|
+
outline: 0;
|
|
89
|
+
}
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
// Cities and Territories
|
|
86
93
|
.territories {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
94
|
+
margin: 2em 100px 2em 0;
|
|
95
|
+
font-size: 1.1em;
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
> span {
|
|
99
|
+
margin-left: 1em;
|
|
100
|
+
margin-right: 0.5em;
|
|
101
|
+
}
|
|
102
|
+
svg {
|
|
103
|
+
max-width: 35px;
|
|
104
|
+
min-width: 25px;
|
|
105
|
+
margin-left: 0.5em;
|
|
106
|
+
transition: 0.3s all;
|
|
107
|
+
text {
|
|
108
|
+
font-size: 0.95em;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
103
111
|
}
|
|
104
112
|
|
|
105
113
|
.zoom-controls {
|
|
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
|
-
|
|
114
|
+
display: flex;
|
|
115
|
+
position: absolute;
|
|
116
|
+
bottom: 2em;
|
|
117
|
+
left: 1em;
|
|
118
|
+
z-index: 4;
|
|
119
|
+
> button.reset {
|
|
120
|
+
margin-left: 5px;
|
|
121
|
+
background: rgba(0, 0, 0, 0.65);
|
|
122
|
+
transition: 0.2s all;
|
|
123
|
+
color: #fff;
|
|
124
|
+
&:hover {
|
|
125
|
+
background: rgba(0, 0, 0, 0.8);
|
|
126
|
+
transition: 0.2s all;
|
|
127
|
+
}
|
|
128
|
+
&:active {
|
|
129
|
+
transform: scale(0.9);
|
|
130
|
+
}
|
|
131
|
+
&:focus {
|
|
132
|
+
background: #005eaa;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
> button:not(.reset) {
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
padding: 0.2em;
|
|
140
|
+
height: 1.75em;
|
|
141
|
+
width: 1.75em;
|
|
142
|
+
background: rgba(0, 0, 0, 0.65);
|
|
143
|
+
transition: 0.2s all;
|
|
144
|
+
color: #fff;
|
|
145
|
+
border-radius: 100%;
|
|
146
|
+
border: 0;
|
|
147
|
+
&:hover {
|
|
148
|
+
background: rgba(0, 0, 0, 0.8);
|
|
149
|
+
transition: 0.2s all;
|
|
150
|
+
}
|
|
151
|
+
&:active {
|
|
152
|
+
transform: scale(0.9);
|
|
153
|
+
}
|
|
154
|
+
svg {
|
|
155
|
+
height: 1.75em;
|
|
156
|
+
width: 1.75em;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
> button:first-child {
|
|
160
|
+
margin-right: 0.25em;
|
|
161
|
+
}
|
|
134
162
|
}
|
|
135
163
|
|
|
136
164
|
@include breakpointClass(sm) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
165
|
+
.zoom-controls > button:not(.reset) {
|
|
166
|
+
height: 2.5em;
|
|
167
|
+
width: 2.5em;
|
|
168
|
+
svg {
|
|
169
|
+
height: 2.5em;
|
|
170
|
+
width: 2.5em;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
141
173
|
}
|
|
142
174
|
|
|
143
175
|
@include breakpointClass(md) {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
176
|
+
.map-downloads .map-downloads__ui.btn-group {
|
|
177
|
+
top: 1em;
|
|
178
|
+
left: 1em;
|
|
179
|
+
transform: none;
|
|
180
|
+
}
|
|
181
|
+
.territories {
|
|
182
|
+
font-size: 1em;
|
|
183
|
+
> span {
|
|
184
|
+
margin-left: 0;
|
|
185
|
+
}
|
|
186
|
+
svg {
|
|
187
|
+
max-width: 45px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.countyMapGroup {
|
|
193
|
+
transition: transform 1s;
|
|
194
|
+
will-change: transform;
|
|
195
|
+
transform-origin: center;
|
|
196
|
+
stroke: none !important;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// .state {
|
|
200
|
+
// display: none;
|
|
201
|
+
// }
|
|
202
|
+
|
|
203
|
+
.state {
|
|
204
|
+
&--inactive:hover path {
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
transition: fill 0.5s;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.county--path {
|
|
211
|
+
fill: white;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.btn--reset {
|
|
215
|
+
position: absolute;
|
|
216
|
+
top: 10px;
|
|
217
|
+
right: 10px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
//Region Maps
|
|
221
|
+
#region-1-label,
|
|
222
|
+
#region-2-label,
|
|
223
|
+
#region-3-label,
|
|
224
|
+
#region-4-label,
|
|
225
|
+
#region-5-label,
|
|
226
|
+
#region-6-label,
|
|
227
|
+
#region-7-label,
|
|
228
|
+
#region-8-label,
|
|
229
|
+
#region-9-label,
|
|
230
|
+
#region-10-label {
|
|
231
|
+
background: #fff;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
#region-1-label {
|
|
235
|
+
transform: translate(90%, 22%);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
#region-2-label {
|
|
239
|
+
//transform: translate(83%, 31%); SIDE CHART EXPERIMENT
|
|
240
|
+
transform: translate(83%, 33%);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
#region-3-label {
|
|
244
|
+
//transform: translate(78%, 48%); SIDE CHART EXPERIMENT
|
|
245
|
+
transform: translate(75%, 45%);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
#region-4-label {
|
|
249
|
+
transform: translate(68%, 70%);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
#region-5-label {
|
|
253
|
+
transform: translate(65%, 44%);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
#region-6-label {
|
|
257
|
+
transform: translate(45%, 75%);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
#region-7-label {
|
|
261
|
+
transform: translate(53%, 47%);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
#region-8-label {
|
|
265
|
+
transform: translate(35%, 30%);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
#region-9-label {
|
|
269
|
+
transform: translate(18%, 58%);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
#region-10-label {
|
|
273
|
+
transform: translate(15%, 28%);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
#region-2-territories,
|
|
277
|
+
#region-9-territories {
|
|
278
|
+
text {
|
|
279
|
+
font-weight: bold;
|
|
280
|
+
font-size: 14px;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
#region-2-territories {
|
|
285
|
+
transform: translate(86%, 40%);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
#region-9-territories {
|
|
289
|
+
transform: translate(4%, 72%);
|
|
290
|
+
|
|
291
|
+
.region-9-row2 {
|
|
292
|
+
transform: translateY(34px);
|
|
293
|
+
}
|
|
158
294
|
}
|