#Load Packages
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.1     ✔ readr     2.2.0
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ ggplot2   4.0.3     ✔ tibble    3.3.1
## ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
## ✔ purrr     1.2.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(readxl)
# Load in Data
hotline_data <- read_csv("hotline_data.csv")
## Rows: 2184 Columns: 11
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (5): State, Timeframe, Call Average Time to Answer, Text Average Time to...
## dbl (6): Number of Routed Calls, Call Answer Rate, Number of Routed Texts, T...
## 
## ℹ 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.
# Summary of 988 Call Answer Rates
summary(hotline_data$`Call Answer Rate`)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.8000  0.8724  0.8232  0.9062  1.0000
#Distribution of 988 Call Answer Times
hist(hotline_data$`Number of Routed Calls`) 

# Relationship Between Routed Texts and Text Answer Rate
plot(hotline_data$`Number of Routed Texts`,hotline_data$`Text Answer Rate`)

# Correlation Between Routed Calls and Call Answer Rate
cor(hotline_data$`Number of Routed Calls`,hotline_data$`Call Answer Rate`)
## [1] 0.1161137