Aggregate the draws (rates) and the data (population and deaths) by a set of grouping identifiers
1 2 3 4 5 6 7 8 | aggregate_data_and_draws(
in_data,
num_field,
denom_field,
draw_fields,
group_fields = NULL,
summarize = TRUE
)
|
in_data |
Input data.table, including draws (in rate space), the numerator and denominator (in count space), and any grouping fields |
num_field |
Field containing the data numerator (e.g. deaths) |
denom_field |
Field containing the data denominator (e.g. population) |
draw_fields |
Character vector of fields containing predictive draws, in rate space (e.g. mortality rates) |
group_fields |
[optional, default NULL] Character vector containing all fields for grouping observations during the aggregation. If this field is empty, all data will be aggregated to a single row and returned with no identifiers |
summarize |
[bool, default TRUE] should summary columns be added for the aggregated draws? |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.