library(sf)
precincts_sf <- st_sf(votes = c(40, 30, 60),
geometry = st_sfc(
st_polygon(list(rbind(c(0,1), c(1,1), c(.5,.5), c(0,1)))),
st_polygon(list(rbind(c(0,0), c(.5,0), c(.5,.5), c(0,1), c(0,0)))),
st_polygon(list(rbind(c(.5,0), c(1,0), c(1,1), c(.5,.5), c(.5,0))))),
crs = 3310)
districts_sf <- st_sf(district = c("North", "South"),
geometry = st_sfc(
st_polygon(list(rbind(c(0,.5), c(1,.5), c(1,1), c(0,1), c(0,.5)))),
st_polygon(list(rbind(c(0,0), c(1,0), c(1,.5), c(0,.5), c(0,0))))),
crs = 3310)