table_10mostcases | R Documentation |
All table functions provide an interface to produce gt tables for CDC Reports.
These tables are computed using a standard data.frame of cases and deaths provided from get_covid_df()
or get_combined_table()
table_10mostcases
displays a table with the top-10 countries by total cases reported in the time period specified
table_10incidence
displays a table with the top-10 countries by average incidence in the time period specified
table_10percentchange
displays a table with the top-10 countries by percent change in the time period specified
table_10mostcases(df, time_step = 7, region = NULL, data_as_of = NULL)
table_10incidence(df, time_step = 7, region = NULL, data_as_of = NULL)
table_10percentchange(
df,
time_step = 7,
second_time_step = 28,
region = NULL,
data_as_of = NULL
)
df |
A data.frame with at least the following columns: id, date, new_cases |
time_step |
(numeric, default: 7) time step in days to compute values over |
region |
(optional) a character string specifying a DoS or WHO region for title, or NULL if none |
data_as_of |
(optional) a character string for the data-as-of date. If NULL, inferred from latest date in data. |
second_time_step |
(numeric, default: 28) for table_10percentchange, time in days to compute percent change over for second column |
A pretty gt table
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.