library(tidyverse)
## Warning: replacing previous import 'lifecycle::last_warnings' by
## 'rlang::last_warnings' when loading 'tibble'
## 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 'lifecycle::last_warnings' by
## 'rlang::last_warnings' when loading 'pillar'
## 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 1.4.0 ✓ forcats 0.5.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(janitor)
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
library(dplyr)
JANI_Base <- read_csv("JANI Volunteer data set.csv")
##
## ── Column specification ────────────────────────────────────────────────────────
## cols(
## Program_Year = col_character(),
## Company = col_character(),
## School = col_character(),
## Grade = col_character(),
## Program = col_character(),
## Class_ID = col_character(),
## Contact_Hours = col_double(),
## Students = col_double()
## )
## Warning: 374 parsing failures.
## row col expected actual file
## 1402 Students no trailing characters 3,763 'JANI Volunteer data set.csv'
## 1425 Students no trailing characters 3,763 'JANI Volunteer data set.csv'
## 1617 Students no trailing characters 2,729 'JANI Volunteer data set.csv'
## 1618 Students no trailing characters 2,729 'JANI Volunteer data set.csv'
## 1619 Students no trailing characters 2,729 'JANI Volunteer data set.csv'
## .... ........ ...................... ...... .............................
## See problems(...) for more details.
tibble(JANI_Base)
## # A tibble: 24,034 x 8
## Program_Year Company School Grade Program Class_ID Contact_Hours Students
## <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl>
## 1 Program year… #1 Adva… East A… 12 JA Laun… CL-6038… 1 29
## 2 Program year… #1 Adva… East A… 12 JA Laun… CL-6038… 1 24
## 3 Program year… 12 Corn… Benton… 10 JA Care… CL-1074… 7 17
## 4 Program year… 12 Corn… Benton… 12 JA Care… CL-8034… 7 18
## 5 Program year… 1st Ass… Lakewo… 6 JA BizT… CL-7148… 26 20
## 6 Program year… 1st Ass… Centra… 7 JA Econ… CL-1247… 6 28
## 7 Program year… 1st Ass… Timoth… 6 JA Econ… CL-1363… 6 22
## 8 Program year… 1st Ass… East N… 11 JA Laun… CL-6089… 1 26
## 9 Program year… 1st Ass… East N… 7 JA Econ… CL-6230… 6 26
## 10 Program year… 1st Ass… Centra… 8 JA Econ… CL-7136… 6 25
## # … with 24,024 more rows
ggplot(data = JANI_Base,
mapping = aes(x = Students,
y = Program_Year)) +
geom_point()
## Warning: Removed 374 rows containing missing values (geom_point).

JANI_Hours <- JANI_Base %>%
mutate(total_hours = `Contact_Hours` * `Students`) %>%
arrange(desc(total_hours))
tibble(JANI_Hours)
## # 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… Midwes… Tippe… 12 JA Eco… CL-5818… 72 53
## 2 Program yea… Allen … Wabas… 9 JA Ins… CL-1424… 6 611
## 3 Program yea… Chase Wabas… 9 JA Ins… CL-1424… 6 611
## 4 Program yea… Coldwe… Wabas… 9 JA Ins… CL-1424… 6 611
## 5 Program yea… Conten… Wabas… 9 JA Ins… CL-1424… 6 611
## 6 Program yea… Fort F… Wabas… 9 JA Ins… CL-1424… 6 611
## 7 Program yea… Indian… Wabas… 9 JA Ins… CL-1424… 6 611
## 8 Program yea… Indian… Wabas… 9 JA Ins… CL-1424… 6 611
## 9 Program yea… Nation… Wabas… 9 JA Ins… CL-1424… 6 611
## 10 Program yea… Nation… Wabas… 9 JA Ins… CL-1424… 6 611
## # … with 24,024 more rows, and 1 more variable: total_hours <dbl>
Lil_JANI_Hours <- JANI_Hours %>%
count(Company)%>%
filter(n>100)%>%
arrange(desc(n))
tibble(Lil_JANI_Hours)
## # A tibble: 27 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 17 more rows
ggplot(data = Lil_JANI_Hours,
aes(x = n, y = Company)) +
geom_point()+
labs(title = "Top 30 Companies",
subtitle = "In JA Northeast Indiana",
x = "Count")
