Viewing a saved revision (read-only)
33d39ad3cbd6481f97ba63a47b2b0f72
Massachussetts Top 10 Crime City filter works
This interactive bar chart displays the crime rates of Massachusetts cities, filterable by community type (All, City, Rural, Suburb) via a dropdown menu. Built with React and D3 v5, it renders an SVG visualization where each bar shows the crime rate as a percentage. The chart loads data from a CSV file containing 2016 crime statistics, using D3's `csv`, `scaleBand`, `scaleLinear`, and `format` functions for data processing and axis scaling. The top 10 cities are displayed by default, with tooltips revealing precise 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.