Skip to main content
100%

Fork

✓ Published0🌍 Public
Ppavan vasamsetti
Last edited Mar 21, 2024
Created on Mar 21, 2024
Forked from ICE-6(sai nitish)

This horizontal bar chart displays the population of U.S. states in 2014, sourced from a Plotly-hosted CSV dataset. The visualization uses D3 v5’s `scaleLinear` and `scaleBand` to map population values to bar lengths and state names to rows, with `axisLeft` and `axisBottom` rendering the axes. Custom tick formatting via `format('.3s')` abbreviates large numbers, while red bars and a title clarify the data. The code loads the CSV with `d3.csv`, converts population strings to numbers, and draws the chart in an SVG.

AI-generated description

This bar chart shows population of the top 10 most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017. It also demonstrates customization of D3 axes.

MIT Licensed

Similar vizzes