Massachussetts Top 10 Crime City add filter
✓ Published1🌍 Public
Wwenleicao
Last edited Oct 1, 2019
Created on Sep 28, 2019
A bar chart displays the top 10 Massachusetts cities by crime rate, filtered by community type (all, city, rural, suburb). The visualization uses React with D3 v5's `scaleLinear`, `scaleBand`, and `format` to render SVG rectangles. Crime ratio data comes from a CSV of the 2016 Massachusetts crime dataset. A Dropdown component controls the community filter, re-filtering the data and updating the chart dynamically.
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