Description Usage Arguments Value Examples
View source: R/plotting_functions.R
This function prepares the subset of data that will be fed to the base plotting function
1 2 3 4 5 6 7 8 9 | get_plot_data(
dt,
outcome,
geo_level,
state = NULL,
cumulative = F,
per100K = F,
popsize = NULL
)
|
dt |
dataframe prepared using the prepare_plot_datasets() function |
outcome |
character string, one of "Cases" or "Deaths" |
geo_level |
character string, one of "us", "state", "county" |
state |
defaults to NULL, but if geo_level is "state", should be two-character state abbreviation |
cumulative |
defaults to FALSE (and daily outcome is plotted), but can be TRUE for cumulative results |
per100K |
currently not implemented (FALSE) |
popsize |
currenlty not implemented (NULL) |
Returns a list including the subset of data (plot_data), the location (location), the outcome, and whether or not the data are cumulative or not
1 2 | get_plot_data(dt=prepared_data_frame, outcome="Cases", geo_level="us", state=NULL, cumulative=F)
get_plot_data(dt=prepared_data_frame, outcome="Deaths", geo_level="state", state="TX", cumulative=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.