get_weekly_local.Rd
Extract and plot information of local and weekly estimates from simulation
get_weekly_local( sim, market.share, icu_percent, start_date, show_start_date, time_limit, sim_population, total_population )
sim | An |
---|---|
market.share | between 0 and 1, percentage of local hospital beds in the simulated unit (e.g. state) |
icu_percent | between 0 and 1, percentage of patients that should go to ICU among the ones that need hospitalization |
start_date | Epidemic start date. Default is 'na', if not provided will plot week numbers, if provided will plot the first day (Sunday) of the week. |
show_start_date | First date to show in plots. Use ymd format. If FALSE, shows from step 1. |
time_limit | Number of days to include. |
sim_population | Size of population simulated. Only needed if providing `total_population`. |
total_population | True population size, needed only if simulation size is smaller than the true population size due to computational cost etc. |
plot:
A ggplot
object, bar charts of count of patients
requiring hospitalization and ICU respectively
result:
A dataframe
hosp:
the number of patients that require hospitalization locally,
icu:
the number of patients that require ICU locally.