Massachussetts Top 10 Crime City by Crime Count/Population
✓ Published2🌍 Public
Wwenleicao
Last edited Sep 28, 2019
Created on Sep 24, 2019
Forked from Massachussetts Top 10 Crime city Refactor Code
This bar chart displays the top 10 Massachusetts cities by crime rate, calculated as the ratio of crime count to population for 2016. Users see the cities ranked along the x-axis, with each bar’s height representing its crime rate percentage. The visualization employs React and D3 v5, using `scaleBand` for the categorical axis and `scaleLinear` for the numeric scale, with SVG rendering. Data is loaded from a CSV via the `d3.csv` method, and hover tooltips show exact percentage values.
AI-generated descriptionA program that shows the top 10 most crime city in massachusetts
I have tried my best to adjust the chart. there are a few things I cannot figure out still.
- adjst the Y axis, so that 0.0% line line with bottom of column. column value appear correct though. wrap my head, not sure why
- tilt the text label so they don't overlap
- I was able to refactor useData.js, but not other module. There is a tick() is not a function error I don't have solution.
MIT Licensed