Viewing a saved revision (read-only)
cf5c7348b4fe4440bc2b51417c85d7e5
Population of Towns on the South Shore Of MA
This visualization shows how the populations of eight Massachusetts South Shore towns changed from 2000 to 2023, drawing on CSV data that includes yearly population figures and year-over-year changes. It displays multiple lines on a single chart, with each town color-coded and matched to a legend below, making it easy to compare trends like Weymouth’s sharp increase or Hull’s relative stability. The chart uses React to manage state and D3 v7’s `scaleLinear`, `line`, `axisBottom`, and `axisLeft` APIs to build the axes and plot the curves. Population values are formatted with commas via `tickFormat` and `toLocaleString`.
AI-generated descriptionPopulation Data Visualization
This project visualizes population trends for several Massachusetts towns from 2000-2023 using React and D3.js.
Data Sources
- Hull.csv
- Hingham.csv
- Scituate.csv
- Cohasset.csv
- Duxbury.csv
- Weymouth.csv
- Norwell.csv
- Abington.csv
Each CSV file contains:
- Year: Census year
- Population: Town population for that year
- Year on Year Change: Absolute change from previous year
- Change in Percent: Percentage change from previous year
Features
- Line chart showing population trends over time
- Interactive data points
- Color-coded towns for easy comparison
- Legend with town names
- Properly formatted axes with commas for population values