Skip to main content
100%

Project most affected country

✓ Published0🌍 Public
PPreethi Medepalli-91
Last edited Dec 4, 2024
Created on Dec 4, 2024
Forked from Project ANalysis

This bar chart shows the top 10 countries with the most pollution occurrences, ranked from highest to lowest count, with each bar labeled with its exact value. Built with D3 v6 and PapaParse, it loads a GitHub-hosted CSV of world air quality data, filters rows for valid country and value fields, and counts occurrences via `d3.rollup`. The x-axis uses `d3.scaleBand` with rotated labels for readability, while `d3.scaleLinear` handles the count axis. The SVG renders steel-blue bars that turn orange on hover, with clear axis labels for intuitive interpretation.

AI-generated description

The code fetches data from a GitHub-hosted CSV file using PapaParse and visualizes the top 10 pollutants with the highest average values. The bar chart includes bars and displays pollutant names and average values, making it intuitive for users to interpret the data. Axes are clearly labeled, and the chart is styled for readability.

MIT Licensed

Similar vizzes