## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(sdc.redistribute)

## -----------------------------------------------------------------------------
library(sdc.redistribute)
data(sdc_example)

# Area-weighted: split tract population onto neighborhoods.
redistribute_direct(sdc_example$source, sdc_example$target, extensive = "pop")

# Dasymetric: weight the split by parcels (here, by unit count).
redistribute_parcels(
  sdc_example$source, sdc_example$target, sdc_example$parcels,
  extensive = "pop", weights = "units")

