Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Singapore topoJSON import

Public visualization

Viewing a saved revision (read-only)

16fd8ba209d342569db2983e8278aff2

Singapore topoJSON import

0 stars0🌍 Public
RRichard Wong
Last edited Apr 13, 2021
Created on Apr 9, 2021
Forked from Hello VizHub

This example displays the planning areas of Singapore as interactive SVG polygons, loaded from an external topoJSON file and rendered using D3’s `geoMercator` projection and `geoPath` generator. The map supports pan and zoom via the `d3.zoom` behavior with configurable scale and translate extents. Hovering over a region changes its fill color to red, and clicking logs the feature to the console. The visualization demonstrates importing topoJSON data with the `topojson.feature` helper, projecting geographic coordinates, and attaching zoom interactivity to a D3 selection.

AI-generated description

An example showing the capabilities of VizHub.