View source: R/aggregate_scores.R
aggregate_scores | R Documentation |
Aggregate deprivation scores into higher-level geographies, calculating: - proportion of highly deprived areas - extent (proportion of the local population that live in the most deprived areas) - population-weighted average score
aggregate_scores( data, score_col, rank_col, decile_col, higher_level_geography, population )
data |
Data frame containing a variable to be aggregated, lower level geography population estimates, and a higher level geographical grouping variable |
score_col |
Variable containing deprivation scores |
rank_col |
Variable containing deprivation ranks |
decile_col |
Variable containing deprivation deciles |
higher_level_geography |
Name of the variable in the data frame containing the higher level geography names/codes |
population |
Name of the variable in the data frame containing the population estimates of the lower level geography |
A tibble containing population-weighted average scores, proportions of highly deprived areas, and the extent for the higher-level geography.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.