Skip to main content
100%

Massachussetts Top 10 Crime city with margin and axis

✓ Published0🌍 Public
CCurran Kelleher
Last edited Sep 23, 2019
Created on Sep 23, 2019

This chart visualizes the top 10 Massachusetts cities with the highest crime rates using data from a CSV mapping city crime and population. A bar chart displays each city on the x-axis and its crime rate on the y-axis, with a linear scale correctly inverted to place larger values at the top. Built with React and D3 v5, the code uses `scaleLinear`, `scaleBand`, and `csv` to load and render data as SVG rectangles, alongside gridlines and axis ticks.

AI-generated description

A modified version showing how to correctly deal with the inverted Y scale for a vertical bar chart.

Data: Masschusetts Crime dataset for 2016.

MIT Licensed

Similar vizzes