This bar chart visualizes the number of intentional homicides per country using data from the UN Intentional Homicide dataset, with values plotted on the y-axis and country names along the x-axis. The chart uses D3 v6 to load the CSV data, filters out zero values, and renders bars as SVG rectangles using the `scaleBand` and `scaleLinear` scales. The visualization highlights the challenge of overlapping country labels on the x-axis due to the large number of categories, while employing `axisLeft` and `axisBottom` for axes and a fixed bar width of 30 pixels.
AI-generated descriptionA bar chart using the UN Intentional Homicide dataset. This bar chart shows the number of intentional homicides (Y-axis) per the Country (X-axis) The country names do collide with each other, but that is an issue I have yet to fix. I want to thank Peter Cordone and Denise Mauldin for their help with troubleshooting!
Comments
Sign in to join the discussion.