aggregate_data_with_meta | R Documentation |
maturing
Aggregate census data up, assumes data is grouped for aggregation Uses data from meta to determine how to aggregate up
aggregate_data_with_meta(data, meta, geo = FALSE, na.rm = TRUE, quiet = FALSE)
data |
census data as obtained from get_census call, grouped by TongfenID |
meta |
list with variables and aggregation information as obtained from meta_for_vectors |
geo |
logical, should also aggregate geographic data |
na.rm |
logical, should NA values be ignored or carried through. |
quiet |
logical, don't emit messages if set to 'TRUE' |
data frame with variables aggregated to new common geography
# Aggregate population from DA level to grouped by CT_UID
## Not run:
geo <- cancensus::get_census("CA06",regions=list(CSD="5915022"),level='DA')
meta <- meta_for_additive_variables("CA06","Population")
result <- aggregate_data_with_meta(geo %>% group_by(CT_UID),meta)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.