Tableau & Python (Web Scrape) - Tokyo Olympics 2020
- Cheryl Tan
- Jun 19, 2021
- 1 min read
Updated: Nov 14, 2021
I had an exhilarating time watching the Tokyo Summer Olympics 2020 games, albeit, it was through a screen. Kudos to all the athletes who gave their all!
I did up a simple visual dashboard to summarize the country performances in the Olympic games. If you're curious to know which country made it into the top 5 highest medal count after 2 consecutive summer games, do check out my dashboard!

Fig 1. Snapshot of Tokyo Summer Games Dashboard
Data Collection and Manipulation
Web-Scraping with Python
I did up a code to automatically extract data from multiple webpages using Python.
The code automatically scrape through multiple pages (~86 countries) of the Olympic website to extract the medal count of sports data that was embedded in the respective country pages.

Fig 2. Snapshot of Web Scrape Code
Gather Live Data with Google Sheet Function
As the Olympics was still on-going, I imported the real-life data from Olympics main website onto google sheet, such that active and timely data will automatically be reflected on the google sheets every second - I'll get instant active data reflected on my dashboard too!

Fig 3. Collection of Live Olympic Data
Tableau Interactive Dashboard
Search Bar/Map Filter
To easily zoom into a country performance results across different tables, I did up a search bar and created a country map filter. The dashboard will churn out the results automatically based on
1) The country name keyed into the country search bar OR
2) Sports name in the sports search bar OR
3) Select a country on the map

Fig 4. Snapshot of Filtered Results


Comments