Aditya_Pratap_Olympic_Analysis[1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

CENTRAL BOARD OF SECONDARY EDUCATION

JINDAL ADARSH VIDYALAYA


SHANKAR HILL TOWN

This is to certify that the project on “BANK PROFILE MANGAEMENT


SYSTEM” was successfully carried out by AMISHA SINGH at JAV during the
academic year 2024-2025.

MR. KUMARASWAMY BALIGAR MRS. J AGNETA


(Principal) (Department of IP)
External Examiner

Acknowledgement
It gives me immense pleasure in bringing out this synopsis of the
project entitled “BANK PROFILE MANGAEMENT SYSTEM”.

Firstly, I would like to express my profound gratitude and deep regards


to our teacher and mentor MRS. J AGNETA, who gave us her valuable
suggestions, exemplary guidance, mentoring and constant
encouragement through the course of this dissertation.

I also take this opportunity to express my deep gratitude to


MR. KUMARASWAMY BALIGAR, Principal of Jindal Adarsh Vidyalaya,
for his affable support, valuable information and guidance, which
helped us a lot in completing this task through the various stages.

I am immensely grateful to all who have also been involved in this


project as without their valuable suggestions and support, it
would not have been possible to develop the project within the
prescribed time.

With Sincere Regards


AMISHA SINGH
XII-COMMERCE
SOURCE CODE
#TOPIC ~> OLYMPICS DATA ANALYSIS
####################################################
#IMPORTING LIBRARIES
####################################################
import sys import numpy as np import pandas as pd import
matplotlib.pyplot as plt import matplotlib.transforms as ts
import mysql.connector as sqlcn

#DATAFRAME USED
####################################################
df=pd.read_csv('olymp_data.csv')
pd.set_option('display.max_columns',None)

#FUNCTION FOR THE MAIN MENU


####################################################

def clear():
print("♦"*100)
for x in range(2):
print() def
menu():
ans=True
while ans:
print("""
****************************************************************
OLYMPICS GAMES ANALYSIS SYSTEM
****************************************************************
1- Data Visualisation
2- Data Analysis
3- Read CSV File
4- LINE CHART --> TOP 10 COUNTRIES VS TOTAL MEDALS
5- LINE CHART --> TOP 10 COUNTRIES VS TOTAL NO. OF TIMES PARTICIPATED (IN
SUMMER & WINTER)
6- BAR CHART --> TOP 10 COUNTRIES vs TOTAL NO. OF GOLD MEDALS
7- BAR CHART --> TOP 10 COUNTRIES VS TOTAL NO. OF SILVER MEDALS
8- BAR CHART --> TOP 10 COUNTRIES VS TOTAL NO. OF BRONZE MEDALS
9- PIE CHART --> TOP 5 COUNTRIES VS TOTAL MEDALS
10- Exit
""")

inp=int(input("Enter your choice: "))


if inp== 1:
datavisual()
elif inp== 2:
odanalysis() elif
inp==3:
read_csv_excel()
elif inp==4:
line_chart1()
elif inp==5:
line_chart2() elif
inp==6:#Gold Medal
bar_chart1() elif
inp==7:#Silver Medal
bar_chart2() elif
inp==8:#Bronze Medal
bar_chart3() elif
inp==9:#Pie Chart
pie_chart_top_countries()
elif inp==10:
print('''Program Quitted Succesfully
Projected By - Aditya Kumar Bind''') break

else:
print("\nInvalid choice. Try again")
continue
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦♦♦
# # OD ANALYSIS () # def
datavisual():
df = pd.read_csv('olymp_data.csv')
# Plotting Total Medals for the top 10 countries
df.sort_values(by='TotalMedal', ascending=False, inplace=True)
df_top10 = df.head(10) plt.figure(figsize=(10, 6))
plt.bar(df_top10['Country'], df_top10['TotalMedal'], color='blue')
plt.xlabel('Country') plt.ylabel('Total Medals')
plt.title('Top 10 Countries by Total Medals in the Olympics')
plt.xticks(rotation=45) plt.show()
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
#2 # OD ANALYSIS () #
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦♦♦♦♦ def odanalysis(): print() print("♦"*80)
# Example analysis of country performance in the Olympics
df = pd.read_csv('olymp_data.csv')
print("\nStatistical Summary of Olympic Data:")
print(df.describe())
print("\nCountries with the Most Total Medals:")
top_countries = df[['Country', 'TotalMedal']].sort_values(by='TotalMedal',
ascending=False).head(5) print(top_countries)
# Additional analysis example
print("\nGold Medal Analysis (Top 5 Countries):")
top_gold = df[['Country', 'Goldmedal']].sort_values(by='Goldmedal',
ascending=False).head(5) print(top_gold)
print("♦"*80)
print()
print("Press any key.......")
wait=input()

#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦
#3 # READ CSV EXCEL () #
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦♦♦ def read_csv_excel():
df = pd.read_csv("olymp_data.csv")
print(df)

#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦
# 4 TO PLOT LINE CHART --> TOP 10 COUNTRIES VS TOTAL MEDALS
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦♦♦♦ def line_chart1():
df=pd.read_csv('olymp_data.csv')
df.sort_values(by='TotalMedal', ascending=False, inplace=True)
df1=df.loc[:,['Country','TotalMedal']] df1=df1.head(10)
Countries=df1['Country'] Totalmedals=df1['TotalMedal']
plt.plot(Countries,Totalmedals,linestyle=':',color='green',marker='.')
x=np.arange(len(Countries)) plt.xticks(x,Countries,rotation=30)
plt.xlabel('Country~ ~ ~ ~ ~',fontsize=12,color='r')
plt.ylabel('Total Medals~ ~ ~ ~ ~',fontsize=12,color='r')
plt.title('TOTAL MEDALS WON BY TOP 10 COUNTRIES\n',color='blue',fontsize=18)
plt.show()

#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦
# 5 TO PLOT LINE CHART --> TOP 10 COUNTRIES VS TOTAL NO. OF TIMES PARTICIPATED
(IN SUMMER & WINTER)
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦

def line_chart2():
df=pd.read_csv('olymp_data.csv')
df.sort_values(by='TotalTimesPart', ascending=False, inplace=True)
df1=df.loc[:,['Country','SummerTimesPart','WinterTimesPart']]
df1=df1.head(10) Countries=df1['Country']
STotal=df1['SummerTimesPart'] Wtotal=df1['WinterTimesPart']
plt.plot(Countries,STotal,linestyle='dashed',color='orange',label='Summer',marker='+')
plt.plot(Countries,Wtotal,linestyle='dashed',color='dimgrey',label='Winter',marker='+')
x=np.arange(len(Countries)) plt.xticks(x,Countries,rotation=30)
plt.xlabel('Country~ ~ ~ ~ ~',fontsize=12,color='r')
plt.ylabel('No. of times participated~ ~ ~ ~ ~',fontsize=12,color='r')
plt.title('TOTAL NO. OF TIMES PARTICIPATED BY TOP 10
COUNTRIES\n',color='blue',fontsize=18)
plt.legend()
plt.show()

#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦♦♦♦
# 6 TO PLOT BAR CHART -->TOP 10 COUNTRIES vs TOTAL NO. OF GOLD MEDALS
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦♦♦♦ def bar_chart1():
df=pd.read_csv('olymp_data.csv')
df=df.sort_values('Tgoldmedal',ascending=False)
df1=df.head(10) x=np.arange(len(df1))
Countries=df1['Country']
totalgold=df1['Tgoldmedal']
plt.bar(x+0.25, totalgold,width=.6, label='Total No. of Gold Medals by Top 10
Countries',color='gold')
plt.xticks(x,Countries,rotation=45)
plt.title('Olympics Gold Medal Analysis of Top 10 Countries',color='blue',fontsize=16)
plt.xlabel('Countries~ ~ ~ ~ ~',fontsize=12,color='red') plt.ylabel('No. of Gold Medals~ ~ ~
~ ~',fontsize=12,color='red') plt.grid() plt.legend() plt.show()

#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦
#7 TO PLOT BAR CHART-->TOP 10 COUNTRIES VS TOTAL NO. OF SILVER MEDALS
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦♦♦♦♦ def bar_chart2(): df=pd.read_csv('olymp_data.csv')
df=df.sort_values('Tsilvermedal',ascending=False)
df1=df.head(n=10) x=np.arange(len(df1))
Countries=df1['Country']
totalsilver=df1['Tsilvermedal']
plt.bar(x+0.25,totalsilver,width=.6, label='Total No. of Silver Medals by Top 10
Countries',color='silver')
plt.xticks(x,Countries,rotation=30)
plt.title('Olympics Silver Medal Analysis of Top 10 Countries',color='blue',fontsize=16)
plt.xlabel('Countries ~ ~ ~ ~ ~',fontsize=12,color='red') plt.ylabel('No. of Silver Medals
~~~~~~~',fontsize=12,color='red') plt.grid() plt.legend() plt.show()

#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦
#8 TO PLOT BAR CHART --> TOP 10 COUNTRIES VS TOTAL NO. OF BRONZE MEDALS
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def bar_chart3():
df=pd.read_csv('olymp_data.csv')
df=df.sort_values(['Tbronzemedal'],ascending= False)
df1=df.head(n=10) x=np.arange(len(df1))
Countries=df1['Country']
totalbronze=df1['Tbronzemedal']
plt.bar(x+0.25,totalbronze,width=.6,label='Total No. of Bronze Medals by Top 10
Countries',color='peru')
plt.xticks(x,Countries,rotation=30)
plt.title('Olympics Bronze Medal Analysis of Top 10 Countries',color='blue',fontsize=16)
plt.xlabel('Countries~~~~~~',fontsize=12,color='red')
plt.ylabel('No. of Bronze Medals~~~ ~~~',fontsize=12,color='red')
plt.grid() plt.legend() plt.show()
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
#9 PIE CHART --> TOP 5 COUNTRIES BY TOTAL MEDALS
#♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦♦
♦♦♦♦♦♦♦♦

def pie_chart_top_countries():
# Sorting data to get the top 5 countries by total medals
df_sorted = df.sort_values(by='TotalMedal', ascending=False).head(5)

countries = df_sorted['Country']
total_medals = df_sorted['TotalMedal']

# Creating a pie chart


plt.figure(figsize=(8, 8))
plt.pie(total_medals, labels=countries, autopct='%1.1f%%', startangle=140,
colors=plt.cm.tab20.colors)
plt.title('Distribution of Total Medals Among Top 5 Countries')
plt.show()
# call your main menu menu()
HARDWARE REQUIREMENTS:

➢ OPERATING SYSTEM : Windows 11 ➢ PROCESSOR :


Intel Core i5 6th Generation ➢ MOTHERBOARD :
Dell Inc. 096JG8 A00 ➢ RAM : 16 GB DDR4 ➢ HARD
DISK : Crucial BX500 480GB ➢ CD/DVD or
PENDRIVE : SanDisk Ultra 64 GB Dual OTG ➢ MONITOR :
LG FLATRON L1752S

SOFTWARE REQUIREMENTS :

➢ IDLE (Python) latest version

LIBRARIES INSTALLED

➢ PANDAS ➢ NUMPY ➢ TIME ➢ MATPLOTLIB.PYPLOT

******************************

You might also like