library(tidyverse)
## Warning: replacing previous import 'ellipsis::check_dots_unnamed' by
## 'rlang::check_dots_unnamed' when loading 'tibble'
## Warning: replacing previous import 'ellipsis::check_dots_used' by
## 'rlang::check_dots_used' when loading 'tibble'
## Warning: replacing previous import 'ellipsis::check_dots_empty' by
## 'rlang::check_dots_empty' when loading 'tibble'
## Warning: replacing previous import 'ellipsis::check_dots_unnamed' by
## 'rlang::check_dots_unnamed' when loading 'pillar'
## Warning: replacing previous import 'ellipsis::check_dots_used' by
## 'rlang::check_dots_used' when loading 'pillar'
## Warning: replacing previous import 'ellipsis::check_dots_empty' by
## 'rlang::check_dots_empty' when loading 'pillar'
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
## ✔ ggplot2 3.3.2     ✔ purrr   0.3.4
## ✔ tibble  3.0.4     ✔ dplyr   1.0.2
## ✔ tidyr   1.1.2     ✔ stringr 1.4.0
## ✔ readr   2.1.4     ✔ forcats 0.5.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(readxl)
library(readr)
JANI_Volunteer_data_set <- read_csv("JANI Volunteer data set.csv")
## Rows: 24034 Columns: 8
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (6): Program_Year, Company, School, Grade, Program, Class_ID
## dbl (1): Contact_hours
## num (1): Students
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
jani <- JANI_Volunteer_data_set 

jani <- jani %>%
  mutate(totalhrs = Contact_hours * Students)
jani
## # A tibble: 24,034 x 9
##    Program_Year Company School Grade Program Class_ID Contact_hours Students
##    <chr>        <chr>   <chr>  <chr> <chr>   <chr>            <dbl>    <dbl>
##  1 Program yea… #1 Adv… East … 12    JA Lau… CL-6038…             1       29
##  2 Program yea… #1 Adv… East … 12    JA Lau… CL-6038…             1       24
##  3 Program yea… 12 Cor… Bento… 10    JA Car… CL-1074…             7       17
##  4 Program yea… 12 Cor… Bento… 12    JA Car… CL-8034…             7       18
##  5 Program yea… 1st As… Lakew… 6     JA Biz… CL-7148…            26       20
##  6 Program yea… 1st As… Centr… 7     JA Eco… CL-1247…             6       28
##  7 Program yea… 1st As… Timot… 6     JA Eco… CL-1363…             6       22
##  8 Program yea… 1st As… East … 11    JA Lau… CL-6089…             1       26
##  9 Program yea… 1st As… East … 7     JA Eco… CL-6230…             6       26
## 10 Program yea… 1st As… Centr… 8     JA Eco… CL-7136…             6       25
## # … with 24,024 more rows, and 1 more variable: totalhrs <dbl>
yearone <- jani %>%
  filter(Program_Year == "Program year 2017-2018")

yearone %>%
  ggplot(aes(x = Students, y = Contact_hours)) + geom_point()

yearone %>%
  count(Company) %>%
  summarise(min(Company), max(Company))
## # A tibble: 1 x 2
##   `min(Company)`        `max(Company)`               
##   <chr>                 <chr>                        
## 1 #1 Advantage Realtors Zurcher's Best One Tire, Inc.

The company who contributed the most in 2017-2018 was Zurcher’s Best One Tire, Inc.

yeartwo <- jani %>%
  filter(Program_Year == "Program year 2018-2019")

yeartwo %>%
  count(Company) %>%
  summarise(min(Company), max(Company))
## # A tibble: 1 x 2
##   `min(Company)`            `max(Company)`               
##   <chr>                     <chr>                        
## 1 12 Corners Vineyards, LLC Zurcher's Best One Tire, Inc.

The top contributer in 2018-2019 was Zurcher’s Best One Tire, Inc.

yearthree <- jani %>%
  filter(Program_Year == "Program year 2019-2020")

yearthree %>%
  count(Company) %>%
  summarise(min(Company), max(Company))
## # A tibble: 1 x 2
##   `min(Company)`            `max(Company)`             
##   <chr>                     <chr>                      
## 1 12 Corners Vineyards, LLC Zimmer Biomet Holdings, Inc

The company that helped the most in 2019-2020 was Zimmer Biomet Holdings, Inc.

yearfour <- jani %>%
  filter(Program_Year == "Program year 2020-2021")

yearfour %>%
  count(Company) %>%
  summarise(min(Company), max(Company))
## # A tibble: 1 x 2
##   `min(Company)`                     `max(Company)`               
##   <chr>                              <chr>                        
## 1 1st Assurance Solutions Group, LLC Zurcher's Best One Tire, Inc.

The top contributor in 2020-2021 was Zurcher’s Best One Tire, Inc.

yearfive <- jani %>%
  filter(Program_Year == "Program year 2021-2022")

yearfive %>%
  count(Company) %>%
  summarise(min(Company), max(Company))
## # A tibble: 1 x 2
##   `min(Company)`                     `max(Company)`
##   <chr>                              <chr>         
## 1 1st Assurance Solutions Group, LLC Zoll Medical

The top contributer in 2021-2022 was Zoll Medical

progyear <- jani %>%
  group_by(Program_Year) %>%
  count(Program_Year) 
progyear
## # A tibble: 5 x 2
## # Groups:   Program_Year [5]
##   Program_Year               n
##   <chr>                  <int>
## 1 Program year 2017-2018  6384
## 2 Program year 2018-2019  6351
## 3 Program year 2019-2020  4406
## 4 Program year 2020-2021  1532
## 5 Program year 2021-2022  5361
jani %>%
  distinct(Company, totalhrs) %>%
  count(Company, totalhrs) %>%
  group_by(Company)
## # A tibble: 13,822 x 3
## # Groups:   Company [3,684]
##    Company                            totalhrs     n
##    <chr>                                 <dbl> <int>
##  1 #1 Advantage Realtors                    24     1
##  2 #1 Advantage Realtors                    29     1
##  3 12 Corners Vineyards, LLC               119     1
##  4 12 Corners Vineyards, LLC               126     1
##  5 1st Assembly of God                     520     1
##  6 1st Assurance Solutions Group, LLC       15     1
##  7 1st Assurance Solutions Group, LLC       26     1
##  8 1st Assurance Solutions Group, LLC      114     1
##  9 1st Assurance Solutions Group, LLC      126     1
## 10 1st Assurance Solutions Group, LLC      132     1
## # … with 13,812 more rows
jani %>%
  count(Company) %>%
  arrange(desc(n))
## # A tibble: 3,684 x 2
##    Company                          n
##    <chr>                        <int>
##  1 Purdue University Fort Wayne  1096
##  2 Lake City Bank                 797
##  3 1st Source Bank                571
##  4 Indiana Tech                   567
##  5 Lincoln Financial Group        445
##  6 3Rivers Federal Credit Union   308
##  7 Ivy Tech Community College     288
##  8 University of Saint Francis    186
##  9 First Merchants Bank           178
## 10 Zimmer Biomet                  169
## # … with 3,674 more rows

Purdue Fort Wayne n=1096

jani %>%
  filter(Company == "Purdue University Fort Wayne")%>%
  summarise(sum(Contact_hours))
## # A tibble: 1 x 1
##   `sum(Contact_hours)`
##                  <dbl>
## 1                 6768
jani%>%
  summarise(sum(Contact_hours))
## # A tibble: 1 x 1
##   `sum(Contact_hours)`
##                  <dbl>
## 1               317011

##PFW total contact hours = 6768 ##PFW makes up 2.13% of all JANI contact hours

jani %>%
  filter(Company == "Lake City Bank") %>%
  summarise(sum(Contact_hours))
## # A tibble: 1 x 1
##   `sum(Contact_hours)`
##                  <dbl>
## 1                 6216
jani%>%
  summarise(sum(Contact_hours))
## # A tibble: 1 x 1
##   `sum(Contact_hours)`
##                  <dbl>
## 1               317011

##Lake City Bank total contact hours = 6216 ##Lake City Bank makes up 1.96% of all JANI contact hours

jani %>%
  filter(Company == "1st Source Bank") %>%
  summarise(sum(Contact_hours))
## # A tibble: 1 x 1
##   `sum(Contact_hours)`
##                  <dbl>
## 1                 4607

##1st Source Bank total contact hours = 4607 ##1st Source Bank makes up 1.45% of all JANI contact hours

jani %>%
  filter(Company == "Indiana Tech") %>%
  summarise(sum(Contact_hours))
## # A tibble: 1 x 1
##   `sum(Contact_hours)`
##                  <dbl>
## 1                 3417

##Indiana Tech total contact hours = 3417 ##Indiana Tech makes up 1.08% of all JANI contact hours

jani %>%
  filter(Company == "Lincoln Financial Group") %>%
  summarise(sum(Contact_hours))
## # A tibble: 1 x 1
##   `sum(Contact_hours)`
##                  <dbl>
## 1                 3612

##Lincoln Financial Group total contact hours = 3612 ##Lincoln Financial Group makes up 1.14% of all JANI contact hours