The ratio of students in the country bar plot
This bar plot shows the student-to-teacher ratio for every country-year pair in a global education dataset. Each vertical bar represents one country-year combination, with bar height mapped to the ratio value, while the x-axis lists concatenated country codes and years. The visualization uses D3 v7’s `scaleBand` and `scaleLinear` to position and size rectangles, and loads data from a CSV file via `d3.csv`. The data originates from the Global Economy rankings and was consolidated through a TidyTuesday GitHub repository.
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