Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

data for stacked bar

Public visualization

Viewing a saved revision (read-only)

311bed294dbb453e800f134f235b06b0

data for stacked bar

0 stars0🌍 Public
AAkanksha
Last edited Apr 4, 2024
Created on Apr 4, 2024

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 description

Dataset - 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