Activity6_Question2 Khushi
✓ Published0🌍 Public
This bar chart displays the population of 20 countries in 2010, sorted by country name along the vertical axis with horizontal bars indicating population size. The visualization uses React with D3 v5 to load CSV data from GitHub, scale bands and linear scales to position marks, and SVG rectangles for rendering. The code imports d3.csv, scaleBand, scaleLinear, max, and format from the D3 library, while custom Axis components generate tick marks and labels. Population values are formatted using the SI prefix notation, converting gigabytes to billions via the xAxisTickFormat function.
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