aggregate_scores {IMD} | R Documentation |
Aggregate deprivation scores
Description
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
Usage
aggregate_scores(
data,
score_col,
rank_col,
decile_col,
higher_level_geography,
population
)
Arguments
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 |
Value
A tibble containing population-weighted average scores, proportions of highly deprived areas, and the extent for the higher-level geography.