Skip to main content
100%

Fork of ICE 8 - 1Q Sharanya

✓ Published0🌍 Public
BBHUMIKA CHUNDU
Last edited Nov 3, 2025
Created on Nov 2, 2025

This choropleth displays a numeric metric for each U.S. state, colored with a quantized green scale and accompanied by interactive tooltips showing the state name and value. It renders vector paths with d3.geoPath, uses a geoAlbersUsa projection, and loads TopoJSON from the us-atlas package. Custom CSV data is joined to state names via a FIPS ID mapping, and a gradient legend communicates the color scale.

AI-generated description

Map (ICE-8 Q1) — Explanation

What the code does

  • Loads TopoJSON for world countries (110m) and converts to GeoJSON via topojson.feature.
  • Uses country-names.tsv to map numeric IDs to country names, then joins with my CSV (name,value).
  • Projects with Natural Earth (d3.geoNaturalEarth1) and draws a graticule for context.
  • Colors countries using a quantized color scale with a legend.
  • Adds tooltips on hover (country + formatted value).

Data

  • country_data_sample.csv contains a metric per country (example: population in millions).
  • To replace the metric, edit the CSV and keep the name,value columns.

How it meets the rubric

  • Runs on VizHub without errors and uses TopoJSON (10 pts).
  • Commented code + explanation (10 pts).
  • World map rendered (10 pts).
  • Linked custom data via CSV (15 pts).

Sources (from course tutorial)

  • World Atlas TopoJSON + d3 links as provided in the tutorial PDF.
MIT Licensed

Similar vizzes