Aggregates block table values up to a higher level, normally precincts, hence the name block2prec.

block2prec(block_table, matches, geometry = FALSE)

Arguments

block_table

Required. Block table output from create_block_table

matches

Required. Grouping variable to aggregate up by, typically made with geo_match

geometry

Boolean. Whether to keep geometry or not.

Value

dataframe with length(unique(matches)) rows

Examples

if (FALSE) { data(towns) # block <- create_block_table('NY', 'Rockland') data(rockland) matches <- geo_match(block, towns) block2prec(block, matches) }