R/cdc_us_by_state.R
cdc_vac_us_by_state.Rd
This functions pulls vaccine data for US states from the CDC. No data is stored within the package, so the data should continuously update over time as long as the links do not change.
cdc_vac_us_by_state()
A dataframe/tibble
Website:
- CDC COVID Tracker: https://covid.cdc.gov/covid-data-tracker/#datatracker-home
- CDC State Site: https://data.cdc.gov/Vaccinations/COVID-19-Vaccination-Trends-in-the-United-States-N/rh2h-3yt2
- Data: https://data.cdc.gov/api/views/rh2h-3yt2/rows.csv?accessType=DOWNLOAD
vac_by_states <- R.COVID.19::cdc_vac_us_by_state()#>#> -- Column specification ------------------------------------------------------------------------- #> Delimiter: "," #> chr (3): Date, Location, date_type #> dbl (12): MMWR_week, Administered_Daily, Administered_Cumulative, Administer...#> #> #> i Use `spec()` to retrieve the full column specification for this data. #> i Specify the column types or set `show_col_types = FALSE` to quiet this message.head(vac_by_states)#> # A tibble: 6 x 15 #> Date MMWR_week State Administered_Da~ Administered_Cu~ Administered_7_~ #> <date> <dbl> <chr> <dbl> <dbl> <dbl> #> 1 2020-12-13 51 AK 0 0 0 #> 2 2020-12-13 51 AK 31 31 31 #> 3 2020-12-14 51 AK 1 32 16 #> 4 2020-12-14 51 AK 0 0 0 #> 5 2020-12-15 51 AK 128 160 53 #> 6 2020-12-15 51 AK 0 0 0 #> # ... with 9 more variables: Admin_Dose_1_Daily <dbl>, #> # Admin_Dose_1_Cumulative <dbl>, Admin_Dose_1_Day_Rolling_Average <dbl>, #> # date_type <chr>, Administered_daily_change_report <dbl>, #> # Administered_daily_change_report_7dayroll <dbl>, #> # Series_Complete_Daily <dbl>, Series_Complete_Cumulative <dbl>, #> # Series_Complete_Day_Rolling_Average <dbl>