SREE
SREE
NO.3 KOCHI
ACADEMIC YEAR:2024-25
PROJECT REPORT
INFORMATICS PRACTICES
MEMBERS:
VALLEPU RAKESH
V M SREEPRIYA
CERTIFICATE
This is to certify that the contents of this project file
submitted by V M Sreepriya, Roll No of
class XII D Commerce for the subject of informatics
practices is her bonafide work submitted to KENDRIYA
VIDYALAYA NO.3 PORT TRUST under the active
guidance of Ms.Vrinda S for partial fulfillment of
requirements for CBSE examination of class XII for the
academic year 2024-25
INTRODUCTION
The Indian Premier League (IPL) stands as one of the most exhilarating cricket
tournaments globally, attracting millions of fans and sports analysts alike. With its
rich history, dynamic teams, and intense matches, the IPL generates a wealth of
data that can be leveraged for insightful analysis.
This project aims to create a comprehensive data analysis system for IPL statistics,
enabling users to insert, update, and delete records seamlessly. Whether you’re
looking to track player performance, team rankings, or match outcomes, this
system will facilitate a robust exploration of the data.
OBJECTIVE
*To find the team that won the most number of matches in a season.
*To find the team that lost the most number of matches in a season. Does winning
toss increases the chances of victory.
*To find the player with the most player of the match awards.
PROBLEMS
*Teams and players finds it difficult to analise their performance,without knowing
how well they performed it becomes difficult for them to further improve it.
*People finds it difficult to know which team has won the most,lost the most in the
season.
SOLUTION
*User can enter their choices according to the menu given to get the results.User
can insert,update or delete the data according to their wish by choosing the option
as per the menu.
*User can also see the visualization of the data as data visualiszation has been
used in this program.
SOFTWARE LOGO
SOURCE CODE
# Importing required libraries
import pandas as pd
import matplotlib.pyplot as plt
print("**********************************************
******")
print("* IPL Data Analysis *")
print("**********************************************
******")
print("1. Display Data")
print("2. Insert Data")
print("3. Update Data")
print("4. Delete Data")
print("5. Plot Winners")
print("6. Plot Player of the Match Awards")
print("7. Plot Match Duration Distribution")
print("8. Plot Toss Decision vs Match Result")
print("9. Provide Feedback")
print("10. Exit")
print("**********************************************
******")
print("\n############################################
########")
print(" Displaying IPL Data")
print("##############################################
######")
print(df)
print("\n")
print("\n############################################
########")
print(" Insert New Data")
print("##############################################
######")
match_id = int(input("Enter MatchID: "))
team1 = input("Enter Team1: ")
team2 = input("Enter Team2: ")
winner = input("Enter Winner: ")
team1_score = input("Enter Team1 Score: ")
team2_score = input("Enter Team2 Score: ")
player_of_match = input("Enter Player of the Match: ")
venue = input("Enter Venue: ")
date = input("Enter Date (YYYY-MM-DD): ")
match_duration = float(input("Enter Match Duration
(Hours): "))
team1_wickets = int(input("Enter Team1 Wickets: "))
team2_wickets = int(input("Enter Team2 Wickets: "))
team1_overs = float(input("Enter Team1 Overs: "))
team2_overs = float(input("Enter Team2 Overs: "))
toss_winner = input("Enter Toss Winner: ")
toss_decision = input("Enter Toss Decision (Bat/Bowl): ")
match_type = input("Enter Match Type
(League/Playoff/Final): ")
umpires = input("Enter Umpires (comma-separated): ")
new_row = {
'MatchID': match_id,
'Team1': team1,
'Team2': team2,
'Winner': winner,
'Team1 Score': team1_score,
'Team2 Score': team2_score,
'Player of the Match': player_of_match,
'Venue': venue,
'Date': date,
'Match Duration (Hours)': match_duration,
'Team1 Wickets': team1_wickets,
'Team2 Wickets': team2_wickets,
'Team1 Overs': team1_overs,
'Team2 Overs': team2_overs,
'Toss Winner': toss_winner,
'Toss Decision': toss_decision,
'Match Type': match_type,
'Umpires': umpires
}
print("\n############################################
########")
print(" Update Data")
print("##############################################
######")
match_id = int(input("Enter MatchID to update: "))
column_name = input("Enter the column name to update
(Team1, Team2, Winner, Team1 Score, Team2 Score, Player of
the Match, Venue, Date, Match Duration (Hours), Team1
Wickets, Team2 Wickets, Team1 Overs, Team2 Overs, Toss
Winner, Toss Decision, Match Type, Umpires): ")
new_value = input("Enter the new value: ")
print("\n############################################
########")
print(" Delete Data")
print("##############################################
######")
match_id = int(input("Enter MatchID to delete: "))
print("\n############################################
########")
print(" Plotting Winners")
print("##############################################
######")
winner_counts = df['Winner'].value_counts()
plt.figure(figsize=(10, 6))
plt.bar(winner_counts.index, winner_counts.values)
plt.xticks(rotation=90)
plt.title('Number of Wins by Each Team')
plt.xlabel('Teams')
plt.ylabel('Number of Wins')
plt.show()
print("\n############################################
########")
print(" Plotting Player of the Match Awards")
print("##############################################
######")
player_counts = df['Player of the Match'].value_counts()
plt.figure(figsize=(10, 6))
plt.bar(player_counts.index, player_counts.values)
plt.xticks(rotation=90)
plt.title('Number of Player of the Match Awards')
plt.xlabel('Player')
plt.ylabel('Number of Awards')
plt.show()
print("\n############################################
########")
print(" Plotting Match Duration Distribution")
print("##############################################
######")
plt.figure(figsize=(10, 6))
plt.hist(df['Match Duration (Hours)'], bins=10, color='blue',
edgecolor='black')
plt.title('Distribution of Match Durations')
plt.xlabel('Match Duration (Hours)')
plt.ylabel('Frequency')
plt.show()
print("##############################################
######")
toss_wins = pd.crosstab(df['Toss Decision'], df['Winner'])
toss_wins.plot(kind='bar', stacked=True, figsize=(10, 6))
plt.title('Match Outcomes Based on Toss Decision')
plt.xlabel('Toss Decision')
plt.ylabel('Number of Matches Won')
plt.xticks(rotation=0)
plt.show()
print("\n############################################
########")
print(" Collecting User Feedback")
print("##############################################
######")
print("\nWe value your feedback! Please rate your
experience with the program:")
print("1. Excellent")
print("2. Good")
print("3. Average")
print("4. Poor")
print("5. Very Poor")
rating = input("\nPlease enter the emoji that best describes
your experience: ")
additional_feedback = input("\nAny additional feedback or
suggestions (optional): ")
BACKEND
OUTPUT
MENU
DISPLAY DATA
INSERT DATA
UPDATE DATA
DELETE DATA
PLOT WINNER
PLOT PLAYER OF THE MATCH AWARDS
PLOT MATCH DURATION DISTRIBUTOIN
PLOT TOSS DECISION VS MATCH RESULT
PROVIDE FEEDBACK
EXIT
BACKEND UPDATED
REFERENCES
https://datasportsgroup.com/news-article/74282/the-rise-of-sports- analytics/
https://seleritysas.com/blog/2021/03/27/how-is-big-data-analytics- changing-sports/
https://wicky.ai/content/analytics/story-of-one-of-crickets-first-analytics- pioneers/