#Choosing Us Contagious Diseases from the DS Labs. #Read in the file
library(tidyverse)
Warning: package 'tidyr' was built under R version 4.3.3
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.4.4 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.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
data(package="dslabs")
#breakdown data for graphing
US_Cont <-read_csv("us_contagious_diseases.csv")
Rows: 16065 Columns: 6
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): disease, state
dbl (4): year, weeks_reporting, count, population
ℹ 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.
US_Cont1 <- US_Cont|>filter(disease =="Measles", state =="Maryland")|>group_by(year)|>head(13)US_Cont1