Skip to main content
100%

circles on a map

✓ Published1🌍 Public
Jjlongwellchc
Last edited Sep 19, 2019
Created on Sep 18, 2019

This map uses D3 v5 to display country populations in 2020 as circles overlaid on a geographic projection. The base map is drawn with `d3.geoPath` and a natural Earth projection, while circle radii are scaled using `d3.scaleSqrt` based on population data. Countries lacking population data are filled red. Data comes from a United Nations population CSV joined with TopoJSON world map geometry. An interactive zoom feature is implemented via the `d3.zoom` API.

AI-generated description

This one is just hosed because, I think, the data he had is different than the data I have. not just the values but the layout. some things are not numbers and I can't seem to coorce them unless I want to spend all day on it and I really don't. We'll just chalk it up to this one not being complete and call it that.

// Uncaught (in promise) TypeError: d.properties.2020.replace is not a function

//sizeScale .range is all kinds of hosed //console.log(radiusValue); // // == // d => d.properties['2020'] // (above that): const radiusValue = d => d.properties['2020']; // so I think that has something to do with it. Maybe an update in js?

MIT Licensed

Similar vizzes