Skip to main content
Public

Share visualization

Loading preview…

Country map fork

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Country map fork

1
Nnagarjuna1968
Last edited Apr 3, 2022
Created on Apr 3, 2022

This example displays a choropleth map of India using the Mercator projection, with each state colored via a categorical color scale. The visualization renders SVG paths derived from TopoJSON data fetched from a GitHub gist, using `d3.geoPath` and `d3.geoMercator` for geometry and projection. The code employs `d3.select`, `d3.json`, `d3.scaleOrdinal`, and `schemeCategory10` for styling, while the `country` class applies a hover effect that turns regions yellow. The map is built within a React framework using D3 v5.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed