Import data

# excel file
data <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-03-29/sports.csv')
data
## # A tibble: 132,327 × 28
##     year unitid instit…¹ city_…² state…³ zip_t…⁴ class…⁵ class…⁶ class…⁷ ef_ma…⁸
##    <dbl>  <dbl> <chr>    <chr>   <chr>   <chr>     <dbl> <chr>   <chr>     <dbl>
##  1  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
##  2  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
##  3  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
##  4  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
##  5  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
##  6  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
##  7  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
##  8  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
##  9  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
## 10  2015 100654 Alabama… Normal  AL      35762         2 NCAA D… <NA>       1923
## # … with 132,317 more rows, 18 more variables: ef_female_count <dbl>,
## #   ef_total_count <dbl>, sector_cd <dbl>, sector_name <chr>, sportscode <dbl>,
## #   partic_men <dbl>, partic_women <dbl>, partic_coed_men <dbl>,
## #   partic_coed_women <dbl>, sum_partic_men <dbl>, sum_partic_women <dbl>,
## #   rev_men <dbl>, rev_women <dbl>, total_rev_menwomen <dbl>, exp_men <dbl>,
## #   exp_women <dbl>, total_exp_menwomen <dbl>, sports <chr>, and abbreviated
## #   variable names ¹​institution_name, ²​city_txt, ³​state_cd, ⁴​zip_text, …

State one question

# Does not having football program impact a schools basketball revenue in Division I in 2015 in the state of New York

Plot data without football

data <- data %>%
    filter(year == 2015, classification_name == "NCAA Division I without football", sports == "Basketball", state_cd == "NY")

ggplot(data = data) +
        geom_point(mapping = aes(x = institution_name, y = total_rev_menwomen))+
    scale_x_discrete(guide = guide_axis(n.dodge = 3))

#Plot data with football (FBS)

FBS <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-03-29/sports.csv')

FBS <- FBS %>%
    filter(year == 2015, classification_name == "NCAA Division I-FBS", sports == "Basketball", state_cd == "NY")

FBS
## # A tibble: 2 × 28
##    year unitid institu…¹ city_…² state…³ zip_t…⁴ class…⁵ class…⁶ class…⁷ ef_ma…⁸
##   <dbl>  <dbl> <chr>     <chr>   <chr>   <chr>     <dbl> <chr>   <chr>     <dbl>
## 1  2015 196088 Universi… Buffalo NY      142601…       1 NCAA D… <NA>      10372
## 2  2015 196413 Syracuse… Syracu… NY      13244         1 NCAA D… <NA>       6391
## # … with 18 more variables: ef_female_count <dbl>, ef_total_count <dbl>,
## #   sector_cd <dbl>, sector_name <chr>, sportscode <dbl>, partic_men <dbl>,
## #   partic_women <dbl>, partic_coed_men <dbl>, partic_coed_women <dbl>,
## #   sum_partic_men <dbl>, sum_partic_women <dbl>, rev_men <dbl>,
## #   rev_women <dbl>, total_rev_menwomen <dbl>, exp_men <dbl>, exp_women <dbl>,
## #   total_exp_menwomen <dbl>, sports <chr>, and abbreviated variable names
## #   ¹​institution_name, ²​city_txt, ³​state_cd, ⁴​zip_text, ⁵​classification_code, …
ggplot(data = FBS) +
        geom_point(mapping = aes(x = institution_name, y = total_rev_menwomen))+
    scale_x_discrete(guide = guide_axis(n.dodge = 3))

#Plot data with football (FCS)

FCS <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-03-29/sports.csv')

FCS <- FCS %>%
    filter(year == 2015, classification_name == "NCAA Division I-FCS", sports == "Basketball", state_cd == "NY")

FCS
## # A tibble: 9 × 28
##    year unitid institu…¹ city_…² state…³ zip_t…⁴ class…⁵ class…⁶ class…⁷ ef_ma…⁸
##   <dbl>  <dbl> <chr>     <chr>   <chr>   <chr>     <dbl> <chr>   <chr>     <dbl>
## 1  2015 190099 Colgate … Hamilt… NY      133461…       2 NCAA D… <NA>       1263
## 2  2015 190150 Columbia… New Yo… NY      10027         2 NCAA D… <NA>       3990
## 3  2015 190415 Cornell … Ithaca  NY      14853         2 NCAA D… <NA>       6893
## 4  2015 191241 Fordham … Bronx   NY      10458         2 NCAA D… <NA>       3622
## 5  2015 191931 Iona Col… New Ro… NY      108011…       2 NCAA D… <NA>       1422
## 6  2015 192819 Marist C… Poughk… NY      12601         2 NCAA D… <NA>       2000
## 7  2015 196060 SUNY at … Albany  NY      12222         2 NCAA D… <NA>       6163
## 8  2015 196097 Stony Br… Stony … NY      11794         2 NCAA D… <NA>       8475
## 9  2015 197197 Wagner C… Staten… NY      103014…       2 NCAA D… <NA>        630
## # … with 18 more variables: ef_female_count <dbl>, ef_total_count <dbl>,
## #   sector_cd <dbl>, sector_name <chr>, sportscode <dbl>, partic_men <dbl>,
## #   partic_women <dbl>, partic_coed_men <dbl>, partic_coed_women <dbl>,
## #   sum_partic_men <dbl>, sum_partic_women <dbl>, rev_men <dbl>,
## #   rev_women <dbl>, total_rev_menwomen <dbl>, exp_men <dbl>, exp_women <dbl>,
## #   total_exp_menwomen <dbl>, sports <chr>, and abbreviated variable names
## #   ¹​institution_name, ²​city_txt, ³​state_cd, ⁴​zip_text, ⁵​classification_code, …
ggplot(data = FCS) +
        geom_point(mapping = aes(x = institution_name, y = total_rev_menwomen))+
    scale_x_discrete(guide = guide_axis(n.dodge = 3))

Interpret

# The highest total revenue for NCAA Division I without football was near $12.5 million in 2015 in the state of NY. Although the remaining schools were all under $5 million in revenue.

#For colleges with football; the FCS' highest school only produced a little over $7 million, but the FBS easy made the most revenue that year because Syracuse University had nearly $40 million that year.

#It is safe to say that football makes a vast difference the amount of fans that tune into watch the basketball; having a football program adds an extra fanbase that will have to tune in while the football season has ended.