Skip to main content
Public

Share visualization

Loading preview…

Fork of Fork of US states map : with colorScale. One color for each country

vizhub.com

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

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 & exportHTML, source ZIP

Fork of Fork of US states map : with colorScale. One color for each country

0 stars0Public
Bbhargavarathod
Last edited Apr 4, 2022
Created on Mar 31, 2022

This example displays a choropleth-style map of African states, rendered as green SVG paths with white strokes on a dark background. It loads GeoJSON data from a GitHub gist, converts it into geographic features using `topojson.feature`, and projects the shapes with `d3.geoAlbersUsa` and `d3.geoPath`. Each state path includes a `<title>` element showing the region’s name from the data’s properties. The implementation relies on D3 v5 for selection, data loading, and path generation, while the map’s styling is defined in an external stylesheet.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed