Skip to main content
100%

Assignment 2 USA map

✓ Published1🌍 Public
Ppasyasahas
Last edited Jul 21, 2023
Created on Jul 21, 2023
Forked from Hello VizHub

This example displays a choropleth-style map of the United States rendered as SVG paths. The code uses D3 v5’s `d3.geoAlbersUsa` projection and `d3.geoPath` to convert GeoJSON features into map outlines, with each state filled red and stroked blue. The geographic data comes from a remote US features JSON file fetched via `d3.json`. The visualization sets a fixed 700×700 canvas and demonstrates D3 map projection, path generation, and asynchronous data loading in a single page.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes