View source: R/calc_aggregate_counts.R
calc_aggregate_counts | R Documentation |
Reads the UCLA and MP/AP dataset aggregates counts for states for most recent data after a given date cutoff and reports either state level data or national data. States include values for the 50 state DOCs, Federal for BOP prisons, ICE detention centers, and incarcerated individuals under the administration of the District of Columbia DOC. If both UCLA and MP report a value for a state the larger value for is taken.
calc_aggregate_counts( date_cutoff = DATE_CUTOFF, window = 31, ucla_only = FALSE, state = FALSE, sub_vax = TRUE, all_dates = FALSE, week_grouping = TRUE, only_prison = TRUE )
date_cutoff |
date, the earliest date of acceptable data to pull from if all_dates is FALSE for .Confirmed and .Deaths variables |
window |
integer, the day range of acceptable UCLA data to pull from if all_dates is FALSE for all variables EXCEPT .Confirmed and .Deaths |
ucla_only |
logical, only consider data from UCLA |
state |
logical, return state level data |
sub_vax |
logical, add variable for Residents.Initiated, equal to Residents.Completed, where Resident.Initiated is missing, by state, measure, and date when all_dates == T |
all_dates |
logical, get time series data rather than just latest counts |
week_grouping |
logical, use weekly grouping for past data? else monthly |
only_prison |
logical, whether to only include Prison, Federal, and ICE web groups (state prisons, federal prisons, and ICE detention) |
data frame with aggregated counts at state or national level
## Not run: calc_aggregate_counts() ## End(Not run) calc_aggregate_counts(state = TRUE, all_dates = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.