Crime_dataset_cities vs crime rate
This bar chart visualization compares average violent crime rates per 100,000 residents across U.S. metro areas from 1975 to 2015, using data from the UCR Crime dataset. The bars are sorted descending by violent_per_100k, showing Detroit with the highest rate and Nassau County, N.Y. with the lowest. Built with vega-lite-api, d3.v5, and Vega-Lite, the visualization loads CSV data via d3.csv and renders horizontal bars with tooltips displaying total population. The chart’s color scheme and axis styling are customized through a separate config file for readability.
AI-generated descriptionA visualization for U.S. Metro Areas Violent Crime Rates by Type using the vega-lite-api.
Completed task: Cities vs crime rate
Observation : Detroit had the highest average violent per 100k from 1975 to 2015, and Nassau County N.Y. had the lowest average violent per 100k.
Future improvements:
- add a Drop-down menu to filter by year
- change violent_per_100k to crime rate
Questions:
- How to add drop-down menu?
- How to perform row-level divide operation in vega-lite-api?