ICE - 8 Singapore Topojson using d3
✓ Published1🌍 Public
This example visualizes a choropleth map of Singapore’s planning areas using a TopoJSON dataset loaded from a GitHub gist. It renders the map as SVG paths with a blue fill and yellow hover highlighting, using a Mercator projection fitted to the viewport. The code employs `d3.geoMercator`, `d3.geoPath`, and `topojson.feature` to convert the TopoJSON data into drawable paths, while `d3.zoom` enables pan and zoom interactions with configurable scale and translate extents. The visualization runs entirely in the browser with D3 v6 and the d3-geo-projection module.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed