Fork of Stylised Bar chart
✓ Published0🌍 Public
This horizontal bar chart displays the populations of major US cities in millions, using rectangles whose length encodes value and whose vertical position encodes city. Built with React and D3 v7, the visualization loads data from a remote CSV, applies a linear scale for the population axis and a band scale for the categorical city axis, and includes gridlines, axis labels, and hover opacity effects for readability.
AI-generated descriptionICE-6 — US Cities Population (Bar Chart)
What this shows
- Marks: rectangles (bars)
- Channels: x position / length (population), y position (city), color
- Gridlines + axis labels for readability
How to run
- Upload your CSV to a public URL (GitHub Gist → copy the Raw link).
- Open
useData.jsand set:CSV_URLto your Raw CSV linkCATEGORY_COL = "city"VALUE_COL = "population_millions"
- Save → the chart renders.
CSV schema
city,population_millions
New York,8.5
Los Angeles,3.9
...
MIT Licensed