Viewing a saved revision (read-only)
6b39e2b7edc64e89abfb83cf1784188e
Activity 6_Q2.A2
This stacked bar chart compares the populations of ten countries from 2010 to 2020 using data from a CSV file. Red and blue bars represent each year, with country names along the x-axis and population values on the y-axis. The visualization uses D3.js v6 APIs like `d3.scaleBand`, `d3.scaleLinear`, and `d3.stack` to render SVG rectangles, with a legend identifying the two time periods.
AI-generated descriptionPopulation change with respect to different years
This stacked bar chart has been created by using ‘Activity6_population.csv’ dataset that displays the population of 10 countries on the year 2010 and 2020 as shown in figure 17. The population of two years are represented with two different colors. Countries names are displayed on the x-axis and population of respective country on the y-axis.