Fork of Activity6_population q2
✓ Published0🌍 Public
This bar chart displays the top 20 countries by population in 2010, sorted in descending order. It uses D3.js v7, loaded via a CDN in the HTML. The visualization fetches data from a CSV file hosted on GitHub, processes it with `d3.csv`, and sorts it before selecting the top 20 entries. The chart is rendered as an SVG using `d3.axisBottom`, `d3.axisLeft`, and `d3.scaleBand` for the y-axis. Bars are drawn as `rect` elements with a width mapped by `d3.scaleLinear` and are colored `steelblue`.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed