Skip to main content
Public

Share visualization

Loading preview…

Scatterplot of Intentional Homicides

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

Scatterplot of Intentional Homicides

1
LLilly-beth Linnell
Last edited Sep 29, 2021
Created on Sep 15, 2021
Forked from D3 Scatter Plot

This scatterplot visualizes intentional homicide counts for various countries over time, with each circle’s vertical position representing the number of homicides and the horizontal position denoting the year. Built with d3.v6, the code uses `d3.csv` to load data from a GitHub Gist, `scaleLinear` and `extent` to map values, and `axisLeft` alongside `axisBottom` to render the axes. The SVG circles are placed using `attr` for the `cx` and `cy` coordinates, drawing directly from the UN Intentional Homicide dataset.

AI-generated description

This is a scatterplot using the UN Intentional Homicide dataset. Each circle represents a country, with the position of the circle representing the number of intentional homicides (y-axis) and the year (x-axis).

Issues: I couldn't get the correct values for the # of homicides - I think this is because it's a decimal representing numbers in the 100,000 range....also, even with scalePoint, I couldn't get every country to line up on the x-axis so I used year instead. I had to clean up my data through my gist multiple times to get this to work.

Comments

Sign in to join the discussion.

MIT Licensed