Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Country map using d3.js

Public visualization

Country map using d3.js

0 stars1🌍 Public
Ss-pranathi
Last edited Apr 4, 2022
Created on Mar 31, 2022

This example displays a choropleth map of India, with each state rendered as a green SVG path against a black background. It uses D3’s `geoMercator` projection and `geoPath` generator to create the geographic outlines. State boundaries are drawn from a TopoJSON file fetched from a GitHub repository, processed with the `topojson.feature` function. The map is built entirely with SVG elements, and the overall shape is outlined using a sphere path, while state paths are appended dynamically after the data loads.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed