Scatterplot of Intentional Homicides
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 descriptionThis 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.