Viewing a saved revision (read-only)
311bed294dbb453e800f134f235b06b0
data for stacked bar
This example visualizes the total number of Olympic medals won by each country for each Winter Games year, broken down by gold, silver, and bronze counts. A stacked bar chart displays the medal distribution across countries and years, with each bar segment representing a medal type. The code loads a CSV dataset from the Winter Olympic Medals 1924–2018 Kaggle dataset, converts numeric fields, and uses `d3.rollup` to group and sum medal counts by year and country. The flattened data structure is then prepared for rendering, though the main function currently outputs a sample data object as JSON text rather than drawing the chart.
AI-generated descriptionDataset - https://www.kaggle.com/datasets/ramontanoeiro/winter-olympic-medals-1924-2018
Tasks I would like to perform -
Visualize number of medals won by each country every year