[Working with spatial data](https://github.com/enjalot/wwsd)
This example demonstrates how latitude and longitude coordinates from a world GeoJSON file are projected onto an SVG canvas using a custom cylindrical map projection, with red circles marking London and San Francisco. Built with D3.js version 3.5.5, the code uses `d3.geo.projection` to define the cylindrical transformation and `d3.geo.path` to render the world map from the 110m-resolution GeoJSON data. The `projection([0,52])` and `projection([-122.4194,37.7749])` calls place the two cities, while the commented-out alternative projections (Mercator and azimuthal equidistant) show the flexibility of the approach.
AI-generated descriptionWorking with spatial data
Example #6
Working with d3.js projections for mapping geospatial data
Built with blockbuilder.org
forked from <a href='http://bl.ocks.org/enjalot/'>enjalot</a>'s block: <a href='http://bl.ocks.org/enjalot/c069550b4fc4fb409430829f07bd78f2'>WWSD #6: d3.js projections</a>
forked from <a href='http://bl.ocks.org/KristinHenry/'>KristinHenry</a>'s block: <a href='http://bl.ocks.org/KristinHenry/7c6b6578109c909adcc23aadd64fcbb3'>WWSD #6: d3.js projections</a>
forked from <a href='http://bl.ocks.org/KristinHenry/'>KristinHenry</a>'s block: <a href='http://bl.ocks.org/KristinHenry/4535a0dd666b8df5be6afcdb9d3994c9'>WWSD #6: d3.js projections</a>