| aggregate_geography | R Documentation |
Aggregates data to higher geography levels.
aggregate_geography(data, to_type, value_col = "OBS_VALUE", fun = sum)
data |
Data frame with geography codes |
to_type |
Target geography TYPE code |
value_col |
Column containing values to aggregate (default: "OBS_VALUE") |
fun |
Aggregation function (default: sum) |
A tibble with aggregated data grouped by specified variables.
data(jsa_sample)
aggregated <- aggregate_geography(jsa_sample, "TYPE499", "OBS_VALUE")
head(aggregated)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.