Skip to main content
Public

Share visualization

Loading preview…

Crime_dataset_cities vs crime rate

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Crime_dataset_cities vs crime rate

3
Yyyaaa1
Last edited Sep 19, 2019
Created on Sep 19, 2019

This bar chart visualizes violent crime rates per 100,000 residents across U.S. metro areas from 1975 to 2015, comparing average rates for each city using data from the UCR crime dataset. The bars are sorted descending by crime rate, revealing Detroit as the highest and Nassau County as the lowest. Built with the vega-lite-api, it uses a bar mark with q/x/y channel encodings, a tooltip aggregating total population, and custom axis styling from a shared config.

AI-generated description

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

  1. add a Drop-down menu to filter by year
  2. change violent_per_100k to crime rate

Questions:

  1. How to add drop-down menu?
  2. How to perform row-level divide operation in vega-lite-api?

Comments

Sign in to join the discussion.

MIT Licensed