Vault #2: Illini Football Since 1892
In this DISCOVERY Data Science Project, you will do real data science in less than an hour and you will earn this project's card to your collection when you fully complete this project! 🎉
Dataset: Illini Football Scores since 1892
The University of Illinois' Fighting Illini Historical Football Scores Dataset is a dataset maintained on GitHub as part of the @wadefagen/datasets repository. This dataset contains a "collection of final scores of every known Fighting Illini football game since 1892, with data on location, homecoming, and national bowl games," and it a live dataset updated every season always containing the latest games.
The URL for the CSV dataset is:
https://raw.githubusercontent.com/wadefagen/datasets/main/illini-football/illini-football-scores.csv
Load the dataset into a DataFrame called df:
Part 1: The Best and Worst Games in Illini History
Since 1892, The University of Illinois has played over 1,200 games of football against 130 different schools! This dataset reports the final score of the game, with a column for the score of the Illini and a column for score of the Opponent.
In the first puzzle, let's find a few interesting games!
The Worst Game of Illini Football
Let's consider the "worst" game to be the game where the Illini lost by the most points.
Note: This is not the game where the opponent scored the most points, but the game where their score had the biggest difference.
Create a DataFrame df_worst that contains the rows of the greatest score difference. There might be more than one row with the same score difference, so you should use df.nlargest() or df.nsmallest() to get the rows with the largest score difference. To not drop the duplicates, you can use keep='all' as an argument to df.nlargest() or df.nsmallest()
The Craziest Game of Illini Football
Let's consider the "craziest" game of Illini Football to be the game where the most total points were scored.
Create a DataFrame df_craziest that contains just one row of the very craziest game:
The Best Homecoming Game
In football, the "homecoming game" is a football game played at the team's home stadium and is often accompanied with celebrations all week ("Homecoming Week"). In this dataset, homecoming games are denoted by the "Note" column containing the string "Homecoming".
Find the "best" homecoming game, where the Illini won by the most points. Create a DataFrame df_homecoming_best that contains just one row of the best homecoming game:
🔬 Project Checkpoint Tests 🔬
⚙️ Test Case: Part 1: The Best and Worst Games in History
Part 2: Are More Points Scored in Modern Football Games?
In the Part 1 analysis, most of games you found were recent. One hypothesis I have is that "football games have a higher score recently than they did historically". Let's see if we have data to support this!
Since this data goes all the way back to 1892, let's consider:
- "Recent Games" to be all games played in the 2000 season to today,
- "Historic Games" to be all other games (1999 and earlier)
Create two DataFrames, df_recent and df_historic, to store the recent and historic games:
Average Points Scored
Using your two datasets, find the average total points scored in recent games and historic games.
🔬 Project Checkpoint Tests 🔬
⚙️ Test Case: Part 2: Are Football Scores Higher in Recent Years?
Part 3: Create a Data Visualization (Bar Chart)
Finally, let's create a bar chart of the total number of points per year!
To do this, set up a DataFrame in the following way:
- In your DataFrame
df, create a column calledTotalScorefor every game. - Each row must be a season of football -- not just a single game.
- Store the DataFrame, that is ready to be graphed, as
df_points_per_season.
Create the Graph
Once you have a DataFrame all set up, the plot is the easy part!
🔬 Project Checkpoint Tests 🔬
⚙️ Test Case: Part 3: Create a Bar Chart
Validate and Complete This Project!
Congratulations on finishing this DISCOVERY Data Science Project! 🎉🎉
To validate your entire project, your entire code will run from top-to-bottom on this page and each test case will be validated one final time. If everything looks good, you'll earn the card for completing this project: