We do not know current trends to indicate attendance
rates throughout the years of NFL Games. If these
attendance rates are increasing, that could be
a problem for the future since we may not have enough seats to fit
everyone. If the amount of people attending decreases, then we
may have to allocate our funds to more online viewers.
This evaluation will show either an increase or
decrease of in person
attendance. From this information, we can be more
informed on our future choices related to the
National Football League.
If the amount of people attending these events are increasing, then we can advertise how limited these tickets are, and increase prices so that less people would buy them, which allows us to fit more people into these games. Although, if the amount of people attending are decreasing, then as said before, we may have to focus less on in-person maintenance and more on online viewing options and advertisements.
The package we have loaded in order to work with the dataset is
tidyverse. This package provides many functions that help
with altering, rearranging, and viewing
data.
In the original attendance.csv data file, there are 8
variables.
team - Which state each team represents.
team-name - The name the team chose for themselves,
like Cardinals or Falcons.
year - The year in which the game week
occurred.
total - The total amount of people that attended
that year.
home - The amount of viewers attending that support
the home team.
away - The amount of viewers attending that support
the away team.
week - A number range from 1-17 that displays which
week the game happened.
weekly_attendance - The number of viewers attending
that week.
First, we must upload our data from our files. We set the working
directory in order to find the file, and then assign the file to the
DataFrame named attendance.
setwd("C:/Users/taing/OneDrive/Documents/Math items/B Bus 301 A Au 23/Week_5")
attendance <- read.csv("C:/Users/taing/OneDrive/Documents/Math items/B Bus 301 A Au 23/Week_5/nfl/attendance.csv")
After uploading our data, we need to fix it to only focus on what
we’re interested in, which is team, year and
total attendance. So, we use the transmute
function to other gather certain variables from the original data frame.
Our new variable will be att_fix, being short for the fixed
attendance data frame.
att_fix <- transmute(attendance,
team = team,
team_name = team_name,
year = year,
total = total)
Now we see only the team, team_name,
year, and total attendance. Although, many of
these variables currectly are copies, so we need to get rid of them. We
use the distict function and re-assign the
att_fix so that the copies are deleted.
att_fix <- distinct(att_fix)
head(att_fix, 10)
## team team_name year total
## 1 Arizona Cardinals 2000 893926
## 2 Atlanta Falcons 2000 964579
## 3 Baltimore Ravens 2000 1062373
## 4 Buffalo Bills 2000 1098587
## 5 Carolina Panthers 2000 1095192
## 6 Chicago Bears 2000 1080684
## 7 Cincinnati Bengals 2000 967434
## 8 Cleveland Browns 2000 1057139
## 9 Dallas Cowboys 2000 1075470
## 10 Denver Broncos 2000 1140030
For our focus, we will only be looking at total,
year, and team or team-name.
total will be the total amount of people that attended
that year of the games made by that team.
year is the year it took place in.
And if we want to decrease the amount of variables we’re working
with, we can use team instead of team-name.
This will make it so that we look at the state rather than each separate
team, since some states have multiple teams.
One way to look at the data to answer our question would be to look
at each team & year as a separate data
point. Although, this might be too much data to work with, so we may
have to instead choose the first few teams or a random sample to work
with. If we want to work with very small amount of data points, we can
look at each team’s attendance throughout their years
to see if it increased or decreased.
If we want to work with large amounts of data points, then we would have to use the scatter plot. If we want to split the data into very small amount of points, then we can use a barplot or histogram.
Currently we don’t know how to select either only the first
teams to observe, or how to collect a sample of our
teams. After learning how to do this, the plots and
diagrams will be much more clean, since there will be fewer points.
I plan to incorporate Linear Regression into my model. This is because it will help display a line with a slope that represents if attendance is increasing or decreasing. If the line looks too horizontal, an equation can be pulled from the linear regression in order to see attendace trends are negative or positive.