Aggregate values from a smaller geography to a larger geography after matching
each row of from to a row of to. This is commonly used to roll block-level
counts up to precincts or districts.
Arguments
- from
Smaller geography level.
- to
Larger geography level.
- value
Numeric vector of length
nrow(from)to aggregate. Defaults to1.- method
Matching method passed to
geo_match().- epsg
numeric EPSG code to planarize to. Default is 3857.
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))
geo_estimate_up(from = checkerboard, to = counties, value = checkerboard$i)
#> Warning: Planarizing skipped. `x` missing CRS.
#> Warning: Planarizing skipped. `x` missing CRS.
#> [1] 176 48
