1. Introduction

This repository contains the code for an interactive web application that allows users to explore the history of the Olympic Games. The application is built using Streamlit, a Python library for creating interactive web apps. The data used in the application is from the Kaggle dataset.

2. Prerequisites

To run this application, you will need the following:

  • Python 3.6 or later
  • Streamlit
  • Pandas
  • Numpy
  • Matplotlib
  • Seaborn
  • plotly

You can install these dependencies using pip:

pip install streamlit pandas numpy matplotlib seaborn plotly

3. Running the Application

To run the application, clone this repository and then run the following command:

streamlit run app.py

The application will then be available at http://localhost:8501.

4. Code Explanation

The code for the application is contained in the app.py file. The code is divided into the following sections:

  • Imports
  • Data Loading and Preprocessing
  • Sidebar
  • Main Content

4.1 Imports

The first section of the code imports the necessary libraries.

import pandas as pd
import numpy as np 
import matplotlib.pyplot as plt
import seaborn as sns
import streamlit as st
import helper
import plotly.express as px
import plotly.figure_factory as ff
import plotly.graph_objects as go

4.2 Data Loading and Preprocessing

The second section of the code loads the data from the CSV files and then preprocesses it.

dataset1 = pd.read_csv('athlete_events.csv')
dataset2 = pd.read_csv('noc_regions.csv')

dataset = helper.preprocess(dataset1,dataset2)

The preprocess() function drops the duplicate rows from the dataset and then merges the two datasets on the NOC column.

4.3 Sidebar

The third section of the code creates the sidebar for the application. The sidebar allows users to select the data they want to explore.

sidebar_data = st.sidebar.radio(
    'Select an Option',
    ('Medal Tally','Overall Analysis','Countrywise Analysis

Generated by [BlackboxAI](https://www.useblackbox.ai)