library(readxl)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.2.0 ✔ readr 2.1.6
## ✔ forcats 1.0.1 ✔ stringr 1.6.0
## ✔ ggplot2 4.0.2 ✔ tibble 3.3.1
## ✔ lubridate 1.9.5 ✔ tidyr 1.3.2
## ✔ purrr 1.2.1
## ── 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
Animal_Control<-read_csv("Animal_Care_and_Control_Division_Annual_Statistics.csv")
## Rows: 22 Columns: 17
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (17): Year, Number of Employees, Number of Division Vehicles, Annual Bud...
##
## ℹ 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(Animal_Control$`Annual Budget`)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 760206 1145628 1290248 1410010 1749510 2224715
summary(Animal_Control$Strays)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1011 1338 1662 1883 2341 3257
summary(Animal_Control$Adoptions)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1737 1908 2224 2144 2293 2684
hist(Animal_Control$`Total Intake of Animals`)
hist(Animal_Control$`Annual Budget`)
plot(Animal_Control$Strays,Animal_Control$Adoptions)
plot(Animal_Control$`Annual Budget`,Animal_Control$Year)
cor(Animal_Control$`Annual Budget`,Animal_Control$Year)
## [1] 0.9596029
cor(Animal_Control$`Total Intake of Animals`,Animal_Control$`Return to Owner`)
## [1] 0.4697313
cor(Animal_Control$`Total Intake of Animals`,Animal_Control$Euthanized)
## [1] 0.9603543
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this: