Skip to main content
100%

Massachussetts Top 10 Crime City filter works

✓ Published2🌍 Public
Wwenleicao
Last edited Oct 11, 2019
Created on Oct 1, 2019

A dropdown menu filters a bar chart of the top 10 cities in Massachusetts by crime rate, comparing All, City, Rural, and Suburb community types. The bars display the crime ratio as a percentage, with hover tooltips showing exact values. Built with React and D3 v5, it uses `scaleBand`, `scaleLinear`, and `csv` to load and visualize 2016 crime data, with SVG rendering for the chart and axes.

AI-generated description

A 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.

  1. 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
  2. tilt the text label so they don't overlap
  3. 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.

Data: Masschusetts Crime dataset for 2016.

MIT Licensed

Similar vizzes