Skip to content

Commit dc3f571

Browse files
committed
population for msa/county/state has been added
1 parent 3025ca3 commit dc3f571

File tree

6 files changed

+8
-5
lines changed

6 files changed

+8
-5
lines changed

public/maps/new_counties.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

public/maps/new_msa.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

public/maps/new_states.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

src/MapBox.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
8080
if (hoveredId !== null && level === 'mega-county') return;
8181
// popup
82-
const { value, direction, NAME } = e.features[0].properties;
82+
const { value, direction, NAME, Population } = e.features[0].properties;
8383
const fillColor = e.features[0].layer.paint['fill-color'].toString();
8484
8585
const sens = $sensorMap.get($currentSensor);
@@ -95,6 +95,7 @@
9595
const death_num = e.features[0].properties.value1;
9696
body = `
9797
<div class="map-popup-region-value-container">
98+
Population: ${Population} <br>
9899
Deaths : ${death_num} <br>
99100
${sens.yAxis}:
100101
<span class="map-popup-region-value"

src/stores.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ export const levels = readable({
131131
// This loads all the GeoJSON's for each granularity that the MapBox component reads as layers.
132132
export const geojsons = readable(new Map(), function start(set) {
133133
Promise.all([
134-
d3.json('./maps/counties-simple.json'),
135-
d3.json('./maps/states-simple.json'),
136-
d3.json('./maps/msa-albers-new.json'),
134+
d3.json('./maps/new_counties.json'),
135+
d3.json('./maps/new_states.json'),
136+
d3.json('./maps/new_msa.json'),
137137
d3.json('./maps/city_data/cities-reprojected.json'),
138138
]).then(([a, b, c, d]) => {
139139
let m = new Map();

src/util.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export const calculateValFromRectified = (rectified) => {
1212
export const injectIDs = (level, data) => {
1313
data.features.forEach((d) => {
1414
d.properties.level = level;
15-
1615
if (level === 'county') {
1716
d.id = d.properties.id = d.properties.GEO_ID.slice(-5);
1817
} else if (level === 'msa') {

0 commit comments

Comments
 (0)