@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useEffect, memo } from 'react';
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { jsx } from '@emotion/react'
|
|
4
4
|
import ErrorBoundary from '@cdc/core/components/ErrorBoundary';
|
|
@@ -9,11 +9,44 @@ import topoJSON from '../data/world-topo.json';
|
|
|
9
9
|
import ZoomableGroup from './ZoomableGroup';
|
|
10
10
|
import Geo from './Geo'
|
|
11
11
|
import CityList from './CityList';
|
|
12
|
+
import BubbleList from './BubbleList';
|
|
12
13
|
|
|
13
14
|
const { features: world } = feature(topoJSON, topoJSON.objects.countries)
|
|
14
15
|
|
|
15
16
|
let projection = geoMercator()
|
|
16
17
|
|
|
18
|
+
const WorldMap = (props) => {
|
|
19
|
+
const {
|
|
20
|
+
state,
|
|
21
|
+
applyTooltipsToGeo,
|
|
22
|
+
data,
|
|
23
|
+
geoClickHandler,
|
|
24
|
+
applyLegendToRow,
|
|
25
|
+
displayGeoName,
|
|
26
|
+
supportedCountries,
|
|
27
|
+
rebuildTooltips,
|
|
28
|
+
setState,
|
|
29
|
+
setRuntimeData,
|
|
30
|
+
generateRuntimeData,
|
|
31
|
+
setFilteredCountryCode,
|
|
32
|
+
position,
|
|
33
|
+
setPosition,
|
|
34
|
+
hasZoom,
|
|
35
|
+
handleMapAriaLabels
|
|
36
|
+
} = props;
|
|
37
|
+
|
|
38
|
+
// TODO Refactor - state should be set together here to avoid rerenders
|
|
39
|
+
// Resets to original data & zooms out
|
|
40
|
+
const handleReset = (state, setState, setRuntimeData, generateRuntimeData) => {
|
|
41
|
+
let reRun = generateRuntimeData(state)
|
|
42
|
+
setRuntimeData(reRun)
|
|
43
|
+
setState({
|
|
44
|
+
...state,
|
|
45
|
+
focusedCountry: false,
|
|
46
|
+
mapPosition: { coordinates: [0, 30], zoom: 1 }
|
|
47
|
+
})
|
|
48
|
+
setFilteredCountryCode('')
|
|
49
|
+
}
|
|
17
50
|
const handleZoomIn = (position, setPosition) => {
|
|
18
51
|
if (position.zoom >= 4) return;
|
|
19
52
|
setPosition((pos) => ({ ...pos, zoom: pos.zoom * 1.5 }));
|
|
@@ -24,9 +57,9 @@ const handleZoomOut = (position, setPosition) => {
|
|
|
24
57
|
setPosition((pos) => ({ ...pos, zoom: pos.zoom / 1.5 }));
|
|
25
58
|
};
|
|
26
59
|
|
|
27
|
-
const ZoomControls = ({position, setPosition}) => (
|
|
60
|
+
const ZoomControls = ({position, setPosition, state, setState, setRuntimeData, generateRuntimeData}) => (
|
|
28
61
|
<div className="zoom-controls" data-html2canvas-ignore>
|
|
29
|
-
<button onClick={() => handleZoomIn(position, setPosition)}>
|
|
62
|
+
<button onClick={() => handleZoomIn(position, setPosition)} aria-label="Zoom In">
|
|
30
63
|
<svg
|
|
31
64
|
viewBox="0 0 24 24"
|
|
32
65
|
stroke="currentColor"
|
|
@@ -36,7 +69,7 @@ const ZoomControls = ({position, setPosition}) => (
|
|
|
36
69
|
<line x1="5" y1="12" x2="19" y2="12" />
|
|
37
70
|
</svg>
|
|
38
71
|
</button>
|
|
39
|
-
<button onClick={() => handleZoomOut(position, setPosition)}>
|
|
72
|
+
<button onClick={() => handleZoomOut(position, setPosition)} aria-label="Zoom Out">
|
|
40
73
|
<svg
|
|
41
74
|
viewBox="0 0 24 24"
|
|
42
75
|
stroke="currentColor"
|
|
@@ -45,22 +78,20 @@ const ZoomControls = ({position, setPosition}) => (
|
|
|
45
78
|
<line x1="5" y1="12" x2="19" y2="12" />
|
|
46
79
|
</svg>
|
|
47
80
|
</button>
|
|
81
|
+
{state.general.type === 'bubble' &&
|
|
82
|
+
<button onClick={() => handleReset(state, setState, setRuntimeData, generateRuntimeData)} className="reset" aria-label="Reset Zoom and Map Filters">
|
|
83
|
+
Reset Filters
|
|
84
|
+
</button>
|
|
85
|
+
}
|
|
48
86
|
</div>
|
|
49
87
|
);
|
|
50
88
|
|
|
51
|
-
|
|
52
|
-
const {
|
|
53
|
-
state
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
applyLegendToRow,
|
|
58
|
-
displayGeoName,
|
|
59
|
-
supportedCountries,
|
|
60
|
-
rebuildTooltips
|
|
61
|
-
} = props;
|
|
62
|
-
|
|
63
|
-
const [position, setPosition] = useState({ coordinates: [0, 30], zoom: 1 });
|
|
89
|
+
// TODO Refactor - state should be set together here to avoid rerenders
|
|
90
|
+
const handleCircleClick = (country, state, setState, setRuntimeData, generateRuntimeData) => {
|
|
91
|
+
if(!state.general.allowMapZoom) return;
|
|
92
|
+
let newRuntimeData = state.data.filter(item => item[state.columns.geo.name] === country[state.columns.geo.name])
|
|
93
|
+
setFilteredCountryCode(newRuntimeData[0].uid)
|
|
94
|
+
}
|
|
64
95
|
|
|
65
96
|
useEffect(() => rebuildTooltips());
|
|
66
97
|
|
|
@@ -95,7 +126,7 @@ const WorldMap = (props) => {
|
|
|
95
126
|
const strokeWidth = .9
|
|
96
127
|
|
|
97
128
|
// If a legend applies, return it with appropriate information.
|
|
98
|
-
if (legendColors && legendColors[0] !== '#000000') {
|
|
129
|
+
if (legendColors && legendColors[0] !== '#000000' && state.general.type !== 'bubble') {
|
|
99
130
|
const tooltip = applyTooltipsToGeo(geoDisplayName, geoData);
|
|
100
131
|
|
|
101
132
|
styles = {
|
|
@@ -143,31 +174,83 @@ const WorldMap = (props) => {
|
|
|
143
174
|
applyTooltipsToGeo={applyTooltipsToGeo}
|
|
144
175
|
displayGeoName={displayGeoName}
|
|
145
176
|
applyLegendToRow={applyLegendToRow}
|
|
177
|
+
isGeoCodeMap={state.general.type === 'us-geocode'}
|
|
146
178
|
/>)
|
|
147
179
|
|
|
180
|
+
// Bubbles
|
|
181
|
+
if(state.general.type === 'bubble') {
|
|
182
|
+
geosJsx.push(
|
|
183
|
+
<BubbleList
|
|
184
|
+
key="bubbles"
|
|
185
|
+
data={state.data}
|
|
186
|
+
runtimeData={data}
|
|
187
|
+
state={state}
|
|
188
|
+
projection={projection}
|
|
189
|
+
applyLegendToRow={applyLegendToRow}
|
|
190
|
+
applyTooltipsToGeo={applyTooltipsToGeo}
|
|
191
|
+
displayGeoName={displayGeoName}
|
|
192
|
+
handleCircleClick={(country) => handleCircleClick(country, state, setState, setRuntimeData, generateRuntimeData) }
|
|
193
|
+
/>
|
|
194
|
+
)
|
|
195
|
+
}
|
|
196
|
+
|
|
148
197
|
return geosJsx;
|
|
149
198
|
};
|
|
150
199
|
|
|
151
200
|
return (
|
|
152
201
|
<ErrorBoundary component="WorldMap">
|
|
153
|
-
|
|
154
|
-
<
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
maxZoom={4}
|
|
159
|
-
projection={projection}
|
|
160
|
-
width={880}
|
|
161
|
-
height={500}
|
|
202
|
+
{hasZoom ? (
|
|
203
|
+
<svg
|
|
204
|
+
viewBox="0 0 880 500"
|
|
205
|
+
role="img"
|
|
206
|
+
aria-label={handleMapAriaLabels(state)}
|
|
162
207
|
>
|
|
163
|
-
<
|
|
164
|
-
|
|
208
|
+
<rect height={500} width={880} onClick={() => handleReset(state, setState, setRuntimeData, generateRuntimeData)} fill="white"/>
|
|
209
|
+
<ZoomableGroup
|
|
210
|
+
zoom={position.zoom}
|
|
211
|
+
center={position.coordinates}
|
|
212
|
+
onMoveEnd={handleMoveEnd}
|
|
213
|
+
maxZoom={4}
|
|
214
|
+
projection={projection}
|
|
215
|
+
width={880}
|
|
216
|
+
height={500}
|
|
165
217
|
>
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
218
|
+
<Mercator
|
|
219
|
+
data={world}
|
|
220
|
+
>
|
|
221
|
+
{({ features }) => constructGeoJsx(features)}
|
|
222
|
+
</Mercator>
|
|
223
|
+
</ZoomableGroup>
|
|
224
|
+
</svg>
|
|
225
|
+
) :
|
|
226
|
+
<svg viewBox="0 0 880 500">
|
|
227
|
+
<ZoomableGroup
|
|
228
|
+
zoom={1}
|
|
229
|
+
center={position.coordinates}
|
|
230
|
+
onMoveEnd={handleMoveEnd}
|
|
231
|
+
maxZoom={0}
|
|
232
|
+
projection={projection}
|
|
233
|
+
width={880}
|
|
234
|
+
height={500}
|
|
235
|
+
>
|
|
236
|
+
<Mercator
|
|
237
|
+
data={world}
|
|
238
|
+
>
|
|
239
|
+
{({ features }) => constructGeoJsx(features)}
|
|
240
|
+
</Mercator>
|
|
241
|
+
</ZoomableGroup>
|
|
242
|
+
</svg>
|
|
243
|
+
}
|
|
244
|
+
{(state.general.type === 'data' || state.general.type === 'bubble' && hasZoom) &&
|
|
245
|
+
<ZoomControls
|
|
246
|
+
position={position}
|
|
247
|
+
setPosition={setPosition}
|
|
248
|
+
setRuntimeData={setRuntimeData}
|
|
249
|
+
state={state}
|
|
250
|
+
setState={setState}
|
|
251
|
+
generateRuntimeData={generateRuntimeData} />
|
|
252
|
+
}
|
|
253
|
+
|
|
171
254
|
</ErrorBoundary>
|
|
172
255
|
);
|
|
173
256
|
};
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
export const countryCoordinates = {
|
|
2
|
+
"AFG":[33.93911,67.709953],
|
|
3
|
+
"ALA":[60.1785,19.9156],
|
|
4
|
+
"ARG":[-38.416097,-63.616672],
|
|
5
|
+
"ARM":[40.069099,45.038189],
|
|
6
|
+
"ABW":[12.52111,-69.968338],
|
|
7
|
+
"AUS":[-25.27,133.77],
|
|
8
|
+
"AUT":[47.516231,14.550072],
|
|
9
|
+
"AZE":[40.143105,47.576927],
|
|
10
|
+
"BHS":[25.03428,-77.39628],
|
|
11
|
+
"BHR":[25.930414,50.637772],
|
|
12
|
+
"BGD":[23.684994,90.356331],
|
|
13
|
+
"BRB":[13.193887,-59.543198],
|
|
14
|
+
"BLR":[53.709807,27.953389],
|
|
15
|
+
"BEL":[50.503887,4.469936],
|
|
16
|
+
"BLZ":[17.189877,-88.49765],
|
|
17
|
+
"BEN":[9.30769,2.315834],
|
|
18
|
+
"BTN":[27.514162,90.433601],
|
|
19
|
+
"BRA":[-14.235,-51.9253],
|
|
20
|
+
"BGR":[42.733883,25.48583],
|
|
21
|
+
"BFA":[12.238333,-1.561593],
|
|
22
|
+
"CAN":[56.1304,-106.3468],
|
|
23
|
+
"CHL":[-35.6751,-71.543],
|
|
24
|
+
"COL":[4.5709,-74.2973],
|
|
25
|
+
"CRI":[9.748917,-83.753428],
|
|
26
|
+
"HRV":[45.1,15.2],
|
|
27
|
+
"CUB":[21.521757,-77.781167],
|
|
28
|
+
"CZE":[49.8175,15.4729],
|
|
29
|
+
"DNK":[56.2639,9.5018],
|
|
30
|
+
"EST":[58.5953,25.0136],
|
|
31
|
+
"FIN":[61.9241,25.7482],
|
|
32
|
+
"FRA":[46.2276,2.2137],
|
|
33
|
+
"GEO":[42.3154,43.3569],
|
|
34
|
+
"DEU":[51.1657,10.4515],
|
|
35
|
+
"GIB":[36.1408,-5.3536],
|
|
36
|
+
"GRC":[39.0742,21.8243],
|
|
37
|
+
"HUN":[47.1625,19.5033],
|
|
38
|
+
"ISL":[64.9631,-19.0208],
|
|
39
|
+
"IRL":[53.1424,-7.6921],
|
|
40
|
+
"ISR":[31.0461,34.8516],
|
|
41
|
+
"ITA":[41.8719,12.5674],
|
|
42
|
+
"LVA":[56.8796,24.6032],
|
|
43
|
+
"LBN":[33.8547,35.8623],
|
|
44
|
+
"LUX":[49.8153,6.1296],
|
|
45
|
+
"MLT":[35.9375,14.3754],
|
|
46
|
+
"MEX":[23.6345,-102.5528],
|
|
47
|
+
"MAR":[31.7917,-7.0926],
|
|
48
|
+
"NAM":[-22.95764,18.49041],
|
|
49
|
+
"NRU":[-0.522778,166.931503],
|
|
50
|
+
"NPL":[28.394857,84.124008],
|
|
51
|
+
"NLD":[52.1326,5.2913],
|
|
52
|
+
"NZL":[-40.900557,174.885971],
|
|
53
|
+
"NIC":[12.865416,-85.207229],
|
|
54
|
+
"NER":[17.607789,8.081666],
|
|
55
|
+
"NGA":[9.081999,8.675277],
|
|
56
|
+
"NOR":[60.472024,8.468946],
|
|
57
|
+
"OMN":[21.512583,55.923255],
|
|
58
|
+
"PAK":[30.375321,69.345116],
|
|
59
|
+
"PLW":[7.51498,134.58252],
|
|
60
|
+
"PAN":[8.537981,-80.782127],
|
|
61
|
+
"PNG":[-6.314993,143.95555],
|
|
62
|
+
"PRY":[-23.442503,-58.443832],
|
|
63
|
+
"PER":[-9.189967,-75.015152],
|
|
64
|
+
"PHL":[12.879721,121.774017],
|
|
65
|
+
"POL":[51.919438,19.145136],
|
|
66
|
+
"PRT":[39.399872,-8.224454],
|
|
67
|
+
"QAT":[25.354826,51.183884],
|
|
68
|
+
"ROU":[45.943161,24.96676],
|
|
69
|
+
"RWA":[-1.940278,29.873888],
|
|
70
|
+
"LCA":[13.909444,-60.978893],
|
|
71
|
+
"WSM":[-13.759029,-172.104629],
|
|
72
|
+
"SMR":[43.94236,12.457777],
|
|
73
|
+
"SAU":[23.885942,45.079162],
|
|
74
|
+
"SEN":[14.497401,-14.452362],
|
|
75
|
+
"SRB":[44.016521,21.005859],
|
|
76
|
+
"SYC":[-4.679574,55.491977],
|
|
77
|
+
"SLE":[8.460555,-11.779889],
|
|
78
|
+
"SGP":[1.352083,103.819836],
|
|
79
|
+
"SVN":[46.1512,14.9955],
|
|
80
|
+
"ZAF":[-30.5595,22.9375],
|
|
81
|
+
"KOR":[35.9078,127.7669],
|
|
82
|
+
"ESP":[40.4637,-3.7492],
|
|
83
|
+
"SWE":[60.1282,18.6435],
|
|
84
|
+
"CHE":[46.8182,8.2275],
|
|
85
|
+
"TWN":[23.68579,120.89749],
|
|
86
|
+
"UGA":[1.373333,32.290275],
|
|
87
|
+
"UKR":[48.379433,31.16558],
|
|
88
|
+
"ARE":[23.424076,53.847818],
|
|
89
|
+
"GBR":[55.3781,-3.436],
|
|
90
|
+
"USA":[37.0902,-95.7129],
|
|
91
|
+
"VEN":[6.4238,-66.14542],
|
|
92
|
+
"ALB":[41.1533,20.1683],
|
|
93
|
+
"DZA":[28.0339,1.6596],
|
|
94
|
+
"ASM":[-14.271,-170.1322],
|
|
95
|
+
"AND":[42.5063,1.5218],
|
|
96
|
+
"AGO":[-11.2027,17.8739],
|
|
97
|
+
"AIA":[18.2206,-63.0686],
|
|
98
|
+
"ATG":[17.0608,-61.7964],
|
|
99
|
+
"BMU":[32.2995,-64.7903],
|
|
100
|
+
"BOL":[-16.2902,-63.5887],
|
|
101
|
+
"BES":[12.2019,-68.2624],
|
|
102
|
+
"BIH":[43.9159,17.6791],
|
|
103
|
+
"BWA":[-22.3285,24.6849],
|
|
104
|
+
"BVT":[-54.4208,3.3464],
|
|
105
|
+
"IOT":[-6.3432,71.8765],
|
|
106
|
+
"BRN":[4.5353,114.7277],
|
|
107
|
+
"MMR":[21.9162,95.956],
|
|
108
|
+
"BDI":[-3.3731,29.9189],
|
|
109
|
+
"CPV":[16.5388,-23.0418],
|
|
110
|
+
"KHM":[12.5657,104.991],
|
|
111
|
+
"CMR":[7.3697,12.3547],
|
|
112
|
+
"CYM":[19.3133,-81.2546],
|
|
113
|
+
"CAF":[6.6111,20.9394],
|
|
114
|
+
"TCD":[15.4542,18.7322],
|
|
115
|
+
"CHN":[35.8617,104.1954],
|
|
116
|
+
"CXR":[-10.4475,105.6904],
|
|
117
|
+
"CCK":[-12.1642,96.871],
|
|
118
|
+
"COM":[-11.6455,43.3333],
|
|
119
|
+
"COD":[-4.0383,21.7587],
|
|
120
|
+
"COK":[-21.2367,159.7777],
|
|
121
|
+
"CIV":[7.5401,-5.5471],
|
|
122
|
+
"CUW":[12.1696,-68.9901],
|
|
123
|
+
"CYP":[35.095192,33.20343],
|
|
124
|
+
"COG":[-0.430179, 15.967529],
|
|
125
|
+
"DJI":[11.8251,42.5903],
|
|
126
|
+
"DMA":[15.4151,-61.3711],
|
|
127
|
+
"DOM":[18.7357,-70.1627],
|
|
128
|
+
"ECU":[-1.8312,-78.1834],
|
|
129
|
+
"EGY":[26.8206,30.8025],
|
|
130
|
+
"SLV":[13.7942,-88.8965],
|
|
131
|
+
"GNQ":[1.6508,10.2679],
|
|
132
|
+
"ERI":[15.1794,39.7823],
|
|
133
|
+
"SWZ":[-26.5225,31.465],
|
|
134
|
+
"ETH":[9.1451,40.4897],
|
|
135
|
+
"FLK":[-51.7963,-59.5236],
|
|
136
|
+
"FRO":[56.2639,9.5018],
|
|
137
|
+
"FJI":[-17.42,178.3],
|
|
138
|
+
"GUF":[3.9339,-53.1258],
|
|
139
|
+
"PYF":[-17.6797,-149.4068],
|
|
140
|
+
"ATF":[-49.2804,69.3486],
|
|
141
|
+
"GAB":[-0.8037,11.6094],
|
|
142
|
+
"GMB":[13.4432,-15.3101],
|
|
143
|
+
"GHA":[7.9465,-1.0232],
|
|
144
|
+
"GRL":[71.7069,-42.6043],
|
|
145
|
+
"GRD":[12.1165,-61.6791],
|
|
146
|
+
"GLP":[16.2651,-61.5511],
|
|
147
|
+
"GUM":[13.4443,144.7937],
|
|
148
|
+
"GTM":[15.7835,-90.2308],
|
|
149
|
+
"GGY":[49.4482,-2.5895],
|
|
150
|
+
"GIN":[9.9456,-9.6966],
|
|
151
|
+
"GNB":[11.8037,-15.1804],
|
|
152
|
+
"GUY":[4.8604,-58.9302],
|
|
153
|
+
"HTI":[18.9712,-72.2852],
|
|
154
|
+
"HMD":[-53.0818,73.5042],
|
|
155
|
+
"HND":[15.2001,-86.2419],
|
|
156
|
+
"HKG":[22.3193,114.1694],
|
|
157
|
+
"IND":[20.5937,78.9629],
|
|
158
|
+
"IDN":[-0.7893,113.9213],
|
|
159
|
+
"IRN":[32.4279,53.688],
|
|
160
|
+
"IRQ":[33.2232,43.6793],
|
|
161
|
+
"IMN":[54.2361,-4.5481],
|
|
162
|
+
"JAM":[18.1096,-77.2975],
|
|
163
|
+
"JPN":[36.2048,138.2529],
|
|
164
|
+
"JEY":[49.2138,-2.1358],
|
|
165
|
+
"JOR":[30.5852,36.2384],
|
|
166
|
+
"KAZ":[48.0196,66.9237],
|
|
167
|
+
"KEN":[-0.0236,37.9062],
|
|
168
|
+
"KIR":[-3.3704,168.734],
|
|
169
|
+
"KOS":[42.6026,20.903],
|
|
170
|
+
"KWT":[29.3117,47.4818],
|
|
171
|
+
"KGZ":[41.2044,74.7661],
|
|
172
|
+
"LAO":[19.8563,102.4955],
|
|
173
|
+
"LSO":[-29.6101,28.2336],
|
|
174
|
+
"LBR":[6.4281,-9.4295],
|
|
175
|
+
"LBY":[26.3351,17.2283],
|
|
176
|
+
"LIE":[47.166,9.5554],
|
|
177
|
+
"LTU":[55.1694,23.8813],
|
|
178
|
+
"MAC":[22.1987,113.5439],
|
|
179
|
+
"MDG":[-18.7669,46.8691],
|
|
180
|
+
"MWI":[-13.2543,34.3015],
|
|
181
|
+
"MYS":[4.2105,101.9758],
|
|
182
|
+
"MDV":[3.2028,73.2207],
|
|
183
|
+
"MLI":[17.5707,-3.9962],
|
|
184
|
+
"MHL":[7.1315,171.1845],
|
|
185
|
+
"MTQ":[14.6415,-61.0242],
|
|
186
|
+
"MRT":[21.0079,-10.9408],
|
|
187
|
+
"MUS":[-20.3484,57.5522],
|
|
188
|
+
"MYT":[-12.8275,45.1662],
|
|
189
|
+
"FSM":[7.4256,150.5508],
|
|
190
|
+
"MDA":[47.4116,28.3699],
|
|
191
|
+
"MCO":[43.7384,7.4246],
|
|
192
|
+
"MNG":[46.8625,103.8467],
|
|
193
|
+
"MNE":[42.7087,19.3744],
|
|
194
|
+
"MSR":[16.7425,-62.1874],
|
|
195
|
+
"MOZ":[-18.6657,35.5296],
|
|
196
|
+
"NCL":[-20.9043,165.618],
|
|
197
|
+
"NIU":[-19.0544,-169.8672],
|
|
198
|
+
"NFK":[-29.0408,167.9547],
|
|
199
|
+
"PRK":[40.3399,127.5101],
|
|
200
|
+
"MKD":[41.6086,21.7453],
|
|
201
|
+
"MNP":[15.0979,145.6739],
|
|
202
|
+
"PCN":[-24.3768,-128.3242],
|
|
203
|
+
"PRI":[18.2208,-66.5901],
|
|
204
|
+
"REU":[-21.1151,55.5364],
|
|
205
|
+
"RUS":[61.524,105.3188],
|
|
206
|
+
"BLM":[17.9001,-62.8333],
|
|
207
|
+
"SHN":[-15.9651,-5.7089],
|
|
208
|
+
"KNA":[17.3578,-62.783],
|
|
209
|
+
"SPM":[46.8852,-56.3159],
|
|
210
|
+
"VCT":[12.9843,-61.2872],
|
|
211
|
+
"STP":[0.1864,6.6131],
|
|
212
|
+
"SXM":[18.0425,-63.0548],
|
|
213
|
+
"SVK":[48.669,19.699],
|
|
214
|
+
"SLB":[-9.6457,160.1562],
|
|
215
|
+
"SOM":[9.4117,46.8253],
|
|
216
|
+
"SGS":[-54.4296,-36.5879],
|
|
217
|
+
"SDS":[6.877,31.307],
|
|
218
|
+
"LKA":[7.8731,80.7718],
|
|
219
|
+
"MAF":[18.0708,-63.0501],
|
|
220
|
+
"SDN":[12.8628,30.2176],
|
|
221
|
+
"SUR":[3.9193,-56.0278],
|
|
222
|
+
"SJM":[77.5536,23.6703],
|
|
223
|
+
"SYR":[34.8021,38.9968],
|
|
224
|
+
"TJK":[38.861,71.2761],
|
|
225
|
+
"TZA":[-6.369,34.8888],
|
|
226
|
+
"THA":[15.8701,100.9925],
|
|
227
|
+
"TLS":[-8.8742,125.7275],
|
|
228
|
+
"TGO":[8.6195,0.8248],
|
|
229
|
+
"TKL":[-9.2002,-171.8484],
|
|
230
|
+
"TON":[-21.179,-175.1982],
|
|
231
|
+
"TTO":[10.6918,-61.2225],
|
|
232
|
+
"TUN":[33.8869,9.5375],
|
|
233
|
+
"TUR":[38.9637,35.2433],
|
|
234
|
+
"TKM":[38.9697,59.5563],
|
|
235
|
+
"TCA":[21.694,-71.7979],
|
|
236
|
+
"TUV":[-7.1095,177.6493],
|
|
237
|
+
"UMI":[19.2823,166.647],
|
|
238
|
+
"URY":[-32.5228,-55.7658],
|
|
239
|
+
"UZB":[41.3775,64.5853],
|
|
240
|
+
"VUT":[-15.3767,166.9592],
|
|
241
|
+
"VAT":[41.9029,12.4534],
|
|
242
|
+
"VNM":[14.0583,108.2772],
|
|
243
|
+
"VGB":[18.4207,-64.6401],
|
|
244
|
+
"VIR":[18.3358,-64.8963],
|
|
245
|
+
"WLF":[-14.2938,-178.1165],
|
|
246
|
+
"SAH":[24.2155,-12.8858],
|
|
247
|
+
"YEM":[15.5527,48.5164],
|
|
248
|
+
"ZMB":[-13.1339,27.8493],
|
|
249
|
+
"ZWE":[-19.0154,29.1549]
|
|
250
|
+
}
|
|
File without changes
|
|
@@ -14,8 +14,15 @@ export default {
|
|
|
14
14
|
hasRegions: false,
|
|
15
15
|
expandDataTable: true,
|
|
16
16
|
fullBorder: false,
|
|
17
|
-
type: 'data'
|
|
17
|
+
type: 'data',
|
|
18
|
+
palette:{
|
|
19
|
+
isReversed:false
|
|
20
|
+
},
|
|
21
|
+
allowMapZoom: true,
|
|
22
|
+
hideGeoColumnInTooltip: false,
|
|
23
|
+
hidePrimaryColumnInTooltip: false
|
|
18
24
|
},
|
|
25
|
+
|
|
19
26
|
type: "map",
|
|
20
27
|
color: 'pinkpurple',
|
|
21
28
|
columns: {
|
|
@@ -35,7 +42,9 @@ export default {
|
|
|
35
42
|
},
|
|
36
43
|
navigate: {
|
|
37
44
|
name: ''
|
|
38
|
-
}
|
|
45
|
+
},
|
|
46
|
+
latitude: { name: "" },
|
|
47
|
+
longitude: { name: "" }
|
|
39
48
|
},
|
|
40
49
|
legend: {
|
|
41
50
|
descriptions: {},
|
|
@@ -56,5 +65,16 @@ export default {
|
|
|
56
65
|
appearanceType: 'hover',
|
|
57
66
|
linkLabel: 'Learn More',
|
|
58
67
|
capitalizeLabels: true
|
|
59
|
-
}
|
|
68
|
+
},
|
|
69
|
+
runtime: {
|
|
70
|
+
editorErrorMessage: []
|
|
71
|
+
},
|
|
72
|
+
visual: {
|
|
73
|
+
minBubbleSize: 1,
|
|
74
|
+
maxBubbleSize: 20,
|
|
75
|
+
extraBubbleBorder: false,
|
|
76
|
+
cityStyle: 'circle'
|
|
77
|
+
},
|
|
78
|
+
mapPosition:
|
|
79
|
+
{ coordinates: [0, 30], zoom: 1 }
|
|
60
80
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const stateCoordinates = {
|
|
2
|
+
'US-AK': {"Abbreviation":"AK","Name":"Alaska","Latitude":"63.588753","Longitude":"-154.493062"},
|
|
3
|
+
'US-AL': {"Abbreviation":"AL","Name":"Alabama","Latitude":"32.318231","Longitude":"-86.902298"},
|
|
4
|
+
'US-AR': {"Abbreviation":"AR","Name":"Arkansas","Latitude":"35.20105","Longitude":"-91.831833"},
|
|
5
|
+
'US-AZ': {"Abbreviation":"AZ","Name":"Arizona","Latitude":"34.048928","Longitude":"-111.093731"},
|
|
6
|
+
'US-CA': {"Abbreviation":"CA","Name":"California","Latitude":"36.778261","Longitude":"-119.417932"},
|
|
7
|
+
'US-CO': {"Abbreviation":"CO","Name":"Colorado","Latitude":"39.550051","Longitude":"-105.782067"},
|
|
8
|
+
'US-CT': {"Abbreviation":"CT","Name":"Connecticut","Latitude":"41.603221","Longitude":"-73.087749"},
|
|
9
|
+
'US-DC': {"Abbreviation":"DC","Name":"District of Columbia","Latitude":"38.905985","Longitude":"-77.033418"},
|
|
10
|
+
'US-DE': {"Abbreviation":"DE","Name":"Delaware","Latitude":"38.910832","Longitude":"-75.52767"},
|
|
11
|
+
'US-FL': {"Abbreviation":"FL","Name":"Florida","Latitude":"27.664827","Longitude":"-81.515754"},
|
|
12
|
+
'US-GA': {"Abbreviation":"GA","Name":"Georgia","Latitude":"32.157435","Longitude":"-82.907123"},
|
|
13
|
+
'US-HI': {"Abbreviation":"HI","Name":"Hawaii","Latitude":"19.898682","Longitude":"-155.665857"},
|
|
14
|
+
'US-IA': {"Abbreviation":"IA","Name":"Iowa","Latitude":"41.878003","Longitude":"-93.097702"},
|
|
15
|
+
'US-ID': {"Abbreviation":"ID","Name":"Idaho","Latitude":"44.068202","Longitude":"-114.742041"},
|
|
16
|
+
'US-IL': {"Abbreviation":"IL","Name":"Illinois","Latitude":"40.633125","Longitude":"-89.398528"},
|
|
17
|
+
'US-IN': {"Abbreviation":"IN","Name":"Indiana","Latitude":"40.551217","Longitude":"-85.602364"},
|
|
18
|
+
'US-KS': {"Abbreviation":"KS","Name":"Kansas","Latitude":"39.011902","Longitude":"-98.484246"},
|
|
19
|
+
'US-KY': {"Abbreviation":"KY","Name":"Kentucky","Latitude":"37.839333","Longitude":"-84.270018"},
|
|
20
|
+
'US-LA': {"Abbreviation":"LA","Name":"Louisiana","Latitude":"31.244823","Longitude":"-92.145024"},
|
|
21
|
+
'US-MA': {"Abbreviation":"MA","Name":"Massachusetts","Latitude":"42.407211","Longitude":"-71.382437"},
|
|
22
|
+
'US-MD': {"Abbreviation":"MD","Name":"Maryland","Latitude":"39.045755","Longitude":"-76.641271"},
|
|
23
|
+
'US-ME': {"Abbreviation":"ME","Name":"Maine","Latitude":"45.253783","Longitude":"-69.445469"},
|
|
24
|
+
'US-MI': {"Abbreviation":"MI","Name":"Michigan","Latitude":"44.314844","Longitude":"-85.602364"},
|
|
25
|
+
'US-MN': {"Abbreviation":"MN","Name":"Minnesota","Latitude":"46.729553","Longitude":"-94.6859"},
|
|
26
|
+
'US-MO': {"Abbreviation":"MO","Name":"Missouri","Latitude":"37.964253","Longitude":"-91.831833"},
|
|
27
|
+
'US-MS': {"Abbreviation":"MS","Name":"Mississippi","Latitude":"32.354668","Longitude":"-89.398528"},
|
|
28
|
+
'US-MT': {"Abbreviation":"MT","Name":"Montana","Latitude":"46.879682","Longitude":"-110.362566"},
|
|
29
|
+
'US-NC': {"Abbreviation":"NC","Name":"North Carolina","Latitude":"35.759573","Longitude":"-79.0193"},
|
|
30
|
+
'US-ND': {"Abbreviation":"ND","Name":"North Dakota","Latitude":"47.551493","Longitude":"-101.002012"},
|
|
31
|
+
'US-NE': {"Abbreviation":"NE","Name":"Nebraska","Latitude":"41.492537","Longitude":"-99.901813"},
|
|
32
|
+
'US-NH': {"Abbreviation":"NH","Name":"New Hampshire","Latitude":"43.193852","Longitude":"-71.572395"},
|
|
33
|
+
'US-NJ': {"Abbreviation":"NJ","Name":"New Jersey","Latitude":"40.058324","Longitude":"-74.405661"},
|
|
34
|
+
'US-NM': {"Abbreviation":"NM","Name":"New Mexico","Latitude":"34.97273","Longitude":"-105.032363"},
|
|
35
|
+
'US-NV': {"Abbreviation":"NV","Name":"Nevada","Latitude":"38.80261","Longitude":"-116.419389"},
|
|
36
|
+
'US-NY': {"Abbreviation":"NY","Name":"New York","Latitude":"43.299428","Longitude":"-74.217933"},
|
|
37
|
+
'US-OH': {"Abbreviation":"OH","Name":"Ohio","Latitude":"40.417287","Longitude":"-82.907123"},
|
|
38
|
+
'US-OK': {"Abbreviation":"OK","Name":"Oklahoma","Latitude":"35.007752","Longitude":"-97.092877"},
|
|
39
|
+
'US-OR': {"Abbreviation":"OR","Name":"Oregon","Latitude":"43.804133","Longitude":"-120.554201"},
|
|
40
|
+
'US-PA': {"Abbreviation":"PA","Name":"Pennsylvania","Latitude":"41.203322","Longitude":"-77.194525"},
|
|
41
|
+
'US-PR': {"Abbreviation":"PR","Name":"Puerto Rico","Latitude":"18.220833","Longitude":"-66.590149"},
|
|
42
|
+
'US-RI': {"Abbreviation":"RI","Name":"Rhode Island","Latitude":"41.580095","Longitude":"-71.477429"},
|
|
43
|
+
'US-SC': {"Abbreviation":"SC","Name":"South Carolina","Latitude":"33.836081","Longitude":"-81.163725"},
|
|
44
|
+
'US-SD': {"Abbreviation":"SD","Name":"South Dakota","Latitude":"43.969515","Longitude":"-99.901813"},
|
|
45
|
+
'US-TN': {"Abbreviation":"TN","Name":"Tennessee","Latitude":"35.517491","Longitude":"-86.580447"},
|
|
46
|
+
'US-TX': {"Abbreviation":"TX","Name":"Texas","Latitude":"31.968599","Longitude":"-99.901813"},
|
|
47
|
+
'US-UT': {"Abbreviation":"UT","Name":"Utah","Latitude":"39.32098","Longitude":"-111.093731"},
|
|
48
|
+
'US-VA': {"Abbreviation":"VA","Name":"Virginia","Latitude":"37.431573","Longitude":"-78.656894"},
|
|
49
|
+
'US-VT': {"Abbreviation":"VT","Name":"Vermont","Latitude":"44.558803","Longitude":"-72.577841"},
|
|
50
|
+
'US-WA': {"Abbreviation":"WA","Name":"Washington","Latitude":"47.751074","Longitude":"-120.740139"},
|
|
51
|
+
'US-WI': {"Abbreviation":"WI","Name":"Wisconsin","Latitude":"43.78444","Longitude":"-88.787868"},
|
|
52
|
+
'US-WV': {"Abbreviation":"WV","Name":"West Virginia","Latitude":"38.597626","Longitude":"-80.454903"},
|
|
53
|
+
'US-WY': {"Abbreviation":"WY","Name":"Wyoming","Latitude":"43.075968","Longitude":"-107.290284"}
|
|
54
|
+
}
|
|
55
|
+
export default stateCoordinates;
|