Skip to main content
100%

Massachusetts City Population by Burglary

✓ Published0🌍 Public
Yyuzhang21
Last edited Sep 27, 2019
Created on Sep 18, 2019

This visualization compares burglary counts across Massachusetts communities using a bar chart with a logarithmic scale, making large value differences readable. The chart groups bars by community, with crime type on the x-axis and total crime count on the y-axis, colored by crime type. Built with the vega-lite-api library, it uses d3.v5 to load and unpivot a CSV dataset fetched from a Gist, then aggregates counts per community and crime type via `vl.aggregate` and `vl.sum`. Custom axis styling in `config.js` improves label readability.

AI-generated description

A visualization constructed using the vega-lite-api.

Crime dataset is unpivot and reloaded in gist repository. This is used to visualize crime distribution in different community. Notice that the log scale is used in Y axis, as the value differences are really huge.

The Massachusetts crime data used here is available on the Gist.

MIT Licensed

Similar vizzes