geo_estimate_down {geomander} | R Documentation |
Estimate Down Geography Levels
Description
Simple method for estimating data down to a lower level. This is most often useful for getting election data down from a precinct level to a block level in the case that a state or other jurisdiction split precincts when creating districts. Geographic partner to estimate_down.
Usage
geo_estimate_down(from, to, wts, value, method = "center", epsg = 3857)
Arguments
from |
Larger geography level |
to |
smaller geography level |
wts |
numeric vector of length nrow(to). Defaults to 1. Typically population or VAP, as a weight to give each precinct. |
value |
numeric vector of length nrow(from). Defaults to 1. Typically electoral outcomes, as a value to estimate down into blocks. |
method |
string from center, centroid, point, or area for matching levels |
epsg |
numeric EPSG code to planarize to. Default is 3857. |
Value
numeric vector with each value split by weight
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_down(from = counties, to = checkerboard, value = counties$pop)
[Package geomander version 2.3.0 Index]