aggregate_pop_weighted_score: Population-weighted scores

View source: R/aggregate.R

aggregate_pop_weighted_scoreR Documentation

Population-weighted scores

Description

Aggregate population-weighted scores within small areas.

Usage

aggregate_pop_weighted_score(data, x, higher_id, lower_pop)

Arguments

data

A dataframe containing a variable to be aggregated, lower level geography population estimates, and a higher level geographical grouping variable.

x

Name of the variable in the dataframe containing the variable to be aggregated (e.g., score) for the lower level geography.

higher_id

Name of the variable in the dataframe containing the higher level geography names/codes.

lower_pop

Name of the variable in the dataframe containing the population estimates of the lower level geography.

Examples

## Not run: 
aggregate_pop_weighted_score(
  example_aggregate_data,
  score,
  higher_geography_code,
  lower_geography_population
)

## End(Not run)

britishredcrosssociety/compositr documentation built on Nov. 4, 2024, 5:21 p.m.