@cdc/map 2.6.0 → 2.6.3

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.
Files changed (61) hide show
  1. package/convert-topojson.js +70 -0
  2. package/dist/cdcmap.js +190 -0
  3. package/examples/default-county.json +105 -0
  4. package/examples/default-single-state.json +109 -0
  5. package/examples/default-usa.json +968 -0
  6. package/examples/default-world.json +1495 -0
  7. package/examples/example-city-state.json +474 -0
  8. package/examples/example-world-map.json +1596 -0
  9. package/examples/gender-rate-map.json +1 -0
  10. package/package.json +50 -50
  11. package/src/CdcMap.js +1384 -0
  12. package/src/components/CityList.js +93 -0
  13. package/src/components/CountyMap.js +556 -0
  14. package/src/components/DataTable.js +357 -0
  15. package/src/components/EditorPanel.js +2111 -0
  16. package/src/components/Geo.js +21 -0
  17. package/src/components/Modal.js +31 -0
  18. package/src/components/NavigationMenu.js +66 -0
  19. package/src/components/Sidebar.js +167 -0
  20. package/src/components/SingleStateMap.js +326 -0
  21. package/src/components/UsaMap.js +342 -0
  22. package/src/components/WorldMap.js +175 -0
  23. package/src/components/ZoomableGroup.js +47 -0
  24. package/src/data/abbreviations.js +57 -0
  25. package/src/data/color-palettes.js +200 -0
  26. package/src/data/county-map-halfquality.json +58453 -0
  27. package/src/data/county-map-quarterquality.json +1 -0
  28. package/src/data/county-topo.json +1 -0
  29. package/src/data/dfc-map.json +1 -0
  30. package/src/data/initial-state.js +60 -0
  31. package/src/data/newtest.json +1 -0
  32. package/src/data/state-abbreviations.js +60 -0
  33. package/src/data/supported-geos.js +3775 -0
  34. package/src/data/test.json +1 -0
  35. package/src/data/us-hex-topo.json +1 -0
  36. package/src/data/us-topo.json +1 -0
  37. package/src/data/world-topo.json +1 -0
  38. package/src/hooks/useActiveElement.js +19 -0
  39. package/src/hooks/useZoomPan.js +110 -0
  40. package/src/images/active-checkmark.svg +1 -0
  41. package/src/images/asc.svg +1 -0
  42. package/src/images/close.svg +1 -0
  43. package/src/images/desc.svg +1 -0
  44. package/src/images/external-link.svg +1 -0
  45. package/src/images/icon-download-img.svg +1 -0
  46. package/src/images/icon-download-pdf.svg +1 -0
  47. package/src/images/inactive-checkmark.svg +1 -0
  48. package/src/images/map-folded.svg +1 -0
  49. package/src/index.html +29 -0
  50. package/src/index.js +20 -0
  51. package/src/scss/btn.scss +69 -0
  52. package/src/scss/datatable.scss +7 -0
  53. package/src/scss/editor-panel.scss +654 -0
  54. package/src/scss/main.scss +224 -0
  55. package/src/scss/map.scss +188 -0
  56. package/src/scss/sidebar.scss +146 -0
  57. package/src/scss/tooltips.scss +30 -0
  58. package/src/scss/variables.scss +1 -0
  59. package/uploads/upload-example-city-state.json +392 -0
  60. package/uploads/upload-example-world-data.json +1490 -0
  61. package/LICENSE +0 -201
@@ -0,0 +1,105 @@
1
+ {
2
+ "type": "map",
3
+ "general": {
4
+ "title": "Default County Map",
5
+ "subtext": "",
6
+ "territoriesLabel": "Territories",
7
+ "type": "map",
8
+ "geoType": "us-county",
9
+ "headerColor": "theme-blue",
10
+ "showSidebar": true,
11
+ "showTitle": true,
12
+ "geoBorderColor": "darkGray",
13
+ "showDownloadButton": true,
14
+ "expandDataTable": false
15
+ },
16
+ "color": "pinkpurple",
17
+ "columns": {
18
+ "geo": {
19
+ "name": "FIPS Codes",
20
+ "label": "Location",
21
+ "tooltip": false,
22
+ "dataTable": true
23
+ },
24
+ "primary": {
25
+ "name": "Insured Rate",
26
+ "label": "Data Label",
27
+ "prefix": "",
28
+ "suffix": "%",
29
+ "dataTable": true,
30
+ "tooltip": true
31
+ },
32
+ "navigate": {
33
+ "name": "",
34
+ "tooltip": false,
35
+ "dataTable": false
36
+ }
37
+ },
38
+ "legend": {
39
+ "numberOfItems": 3,
40
+ "position": "side",
41
+ "title": "Legend Title",
42
+ "description": "Legend Text",
43
+ "type": "equalnumber",
44
+ "specialClasses": ["N/A"]
45
+ },
46
+ "filters": [],
47
+ "data": [
48
+ {
49
+ "Insured Rate": "8",
50
+ "Coverage Status": "Insured",
51
+ "FIPS Codes": "06071",
52
+ "Year (Good filter option)": "2010",
53
+ "link": ""
54
+ },
55
+ {
56
+ "Insured Rate": "25",
57
+ "Coverage Status": "Insured",
58
+ "FIPS Codes": "55005",
59
+ "Year (Good filter option)": "2010",
60
+ "link": "https://cdc.gov"
61
+ },
62
+ {
63
+ "Insured Rate": "25",
64
+ "Coverage Status": "Insured",
65
+ "FIPS Codes": "12103",
66
+ "Year (Good filter option)": "2010",
67
+ "link": ""
68
+ },
69
+ {
70
+ "Insured Rate": "25",
71
+ "Coverage Status": "Insured",
72
+ "FIPS Codes": "32005",
73
+ "Year (Good filter option)": "2010",
74
+ "link": ""
75
+ },
76
+ {
77
+ "Insured Rate": "18",
78
+ "Coverage Status": "Insured",
79
+ "FIPS Codes": "06075",
80
+ "Year (Good filter option)": "2010",
81
+ "link": ""
82
+ },
83
+ {
84
+ "Insured Rate": "3",
85
+ "Coverage Status": "Insured",
86
+ "FIPS Codes": "06027",
87
+ "Year (Good filter option)": "2010",
88
+ "link": ""
89
+ },
90
+ {
91
+ "Insured Rate": "25",
92
+ "Coverage Status": "Insured",
93
+ "FIPS Codes": "06029",
94
+ "Year (Good filter option)": "2010",
95
+ "link": ""
96
+ },
97
+ {
98
+ "Insured Rate": "60",
99
+ "Coverage Status": "Insured",
100
+ "FIPS Codes": "06065",
101
+ "Year (Good filter option)": "2010",
102
+ "link": ""
103
+ }
104
+ ]
105
+ }
@@ -0,0 +1,109 @@
1
+ {
2
+ "type": "map",
3
+ "general": {
4
+ "title": "Default County Map",
5
+ "subtext": "",
6
+ "territoriesLabel": "Territories",
7
+ "type": "map",
8
+ "geoType": "single-state",
9
+ "headerColor": "theme-blue",
10
+ "showSidebar": true,
11
+ "showTitle": true,
12
+ "geoBorderColor": "darkGray",
13
+ "showDownloadButton": true,
14
+ "expandDataTable": false,
15
+ "statePicked": {
16
+ "stateName": "California",
17
+ "fipsCode": "06"
18
+ }
19
+ },
20
+ "color": "pinkpurple",
21
+ "columns": {
22
+ "geo": {
23
+ "name": "FIPS Codes",
24
+ "label": "Location",
25
+ "tooltip": false,
26
+ "dataTable": true
27
+ },
28
+ "primary": {
29
+ "name": "Insured Rate",
30
+ "label": "Data Label",
31
+ "prefix": "",
32
+ "suffix": "%",
33
+ "dataTable": true,
34
+ "tooltip": true
35
+ },
36
+ "navigate": {
37
+ "name": "link",
38
+ "tooltip": false,
39
+ "dataTable": false
40
+ }
41
+ },
42
+ "legend": {
43
+ "numberOfItems": 3,
44
+ "position": "side",
45
+ "title": "Legend Title",
46
+ "description": "Legend Text",
47
+ "type": "equalnumber",
48
+ "specialClasses": ["N/A"]
49
+ },
50
+ "filters": [],
51
+ "data": [
52
+ {
53
+ "Insured Rate": "8",
54
+ "Coverage Status": "Insured",
55
+ "FIPS Codes": "06071",
56
+ "Year (Good filter option)": "2010",
57
+ "link": ""
58
+ },
59
+ {
60
+ "Insured Rate": "25",
61
+ "Coverage Status": "Insured",
62
+ "FIPS Codes": "55005",
63
+ "Year (Good filter option)": "2010",
64
+ "link": ""
65
+ },
66
+ {
67
+ "Insured Rate": "25",
68
+ "Coverage Status": "Insured",
69
+ "FIPS Codes": "12103",
70
+ "Year (Good filter option)": "2010",
71
+ "link": ""
72
+ },
73
+ {
74
+ "Insured Rate": "25",
75
+ "Coverage Status": "Insured",
76
+ "FIPS Codes": "32005",
77
+ "Year (Good filter option)": "2010",
78
+ "link": ""
79
+ },
80
+ {
81
+ "Insured Rate": "18",
82
+ "Coverage Status": "Insured",
83
+ "FIPS Codes": "06075",
84
+ "Year (Good filter option)": "2010",
85
+ "link": ""
86
+ },
87
+ {
88
+ "Insured Rate": "3",
89
+ "Coverage Status": "Insured",
90
+ "FIPS Codes": "06027",
91
+ "Year (Good filter option)": "2010",
92
+ "link": ""
93
+ },
94
+ {
95
+ "Insured Rate": "25",
96
+ "Coverage Status": "Insured",
97
+ "FIPS Codes": "06029",
98
+ "Year (Good filter option)": "2010",
99
+ "link": ""
100
+ },
101
+ {
102
+ "Insured Rate": "60",
103
+ "Coverage Status": "Insured",
104
+ "FIPS Codes": "06065",
105
+ "Year (Good filter option)": "2010",
106
+ "link": ""
107
+ }
108
+ ]
109
+ }