The ratio of students in the country (Primary Education)
This visualization shows the ratio of students in primary education across countries, with bars sorted in descending order to highlight the highest ratios. A bar chart rendered with SVG uses D3 v7’s `scaleBand` and `scaleLinear` to position and size the rectangles, while `d3.axisBottom` and `d3.axisLeft` display the country-year labels and ratio scale. The data is loaded from a CSV file sourced from the Global Economy and tidytuesday dataset, with bars colored steelblue and axis labels added via SVG text elements.
AI-generated descriptionA demonstration of how to start using D3 version 6.
The original data is shown in https://www.theglobaleconomy.com/rankings/Preprimary_school_enrollment/ Someone consolidated the dataset. So I download the dataset from github https://github.com/rfordatascience/tidytuesday/tree/master/data/2019/2019-05-07