Massachusetts Crime Proportion by Community (final project)
This visualization shows the proportion of different crime types across Massachusetts communities, using a stacked, normalized bar chart to compare relative shares. Rural areas exhibit more burglary, while cities show higher rates of robbery, motor vehicle theft, and violent crime. Built with vega-lite-api on d3.v5, it loads CSV data from a GitHub gist, aggregates crime counts by community and type, and renders horizontal bars with tableau20 color coding. The config adjusts font sizes and axis styling, while vega-tooltip provides interactive crime-type and count details on hover.
AI-generated descriptionA 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. Use 100% stack column chart. From the Chart, rural area have more Burglary, which city has more Robbery, Motor Viechil theft as well as violent crime
dateset intro is here
Gist is from here
modification for final project
- Change from column chart to bar chart so that it is easier to compare the proportion visually
- add additional tool tip to be user-friendly