estimate_up: Estimate Up Levels

View source: R/estimate.R

estimate_upR Documentation

Estimate Up Levels

Description

Non-geographic partner function to geo_estimate_up. Allows users to aggregate up without the costly matching operation if they've already matched.

Usage

estimate_up(value, group)

Arguments

value

numeric vector. Defaults to 1. Typically population values.

group

matches of length(value) that correspond to row indices of value. Often, this input is the output of geo_match.

Value

numeric vector with each value aggregated by group

Examples

library(dplyr)
set.seed(1)
data(checkerboard)
counties <- checkerboard %>%
  group_by(id <= 32) %>%
  summarize(geometry = sf::st_union(geometry)) %>%
  mutate(pop = c(100, 200))
matches <- geo_match(checkerboard, counties)
estimate_up(value = checkerboard$i, group = matches)

geomander documentation built on April 16, 2023, 5:18 p.m.