Task8_Wolfe_Jordan
✓ Published1🌍 Public
This example visualizes the 2020 populations of 30 countries as a horizontal bar chart, with red bars sorted by country name on the y-axis and population on the x-axis. It uses D3’s `scaleBand` and `scaleLinear` to map the categorical and quantitative variables, with axes rendered via custom `AxisBottom` and `AxisLeft` components. The chart is built with React, using the `useData` hook to load a CSV from GitHub, and formatting population values with `d3.format` (converting gigas to billions). SVG rendering includes tooltips showing the formatted population on hover.
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