Activity6_population
✓ Published4🌍 Public
This example visualizes the top 20 countries by population in 2010 using a horizontal bar chart. The code loads CSV data from a GitHub gist via `d3.csv`, sorts it in descending order, and renders SVG bars with `d3.scaleLinear` for the x-axis and `d3.scaleBand` for the y-axis. Axes are generated with `d3.axisBottom` and `d3.axisLeft`, while tick labels are formatted in millions. The chart includes axis labels and uses steelblue bars, demonstrating D3 v7’s data binding and SVG rendering capabilities.
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