I used st_join()
to combine t1
and t2
.
library(sf)
j <- st_join(
x = t1,
y = t2
)
t1
represents voting precincts boundaries and t2
, school zone boundaries. In some cases, the boundaries of t1
fit perfectly in one school zone but because the borders touch two other zones, st_join
lines up a precinct with three zones.
How can I make st_join
stricter so that if a precinct in t1
is mostly or seemingly entirely within a zone boundary of t2
, the precinct lines up with only that zone, no others?
?sf::st_relate
and DE-9IM. Moreover, can you share an example fort1
andt2
?st_intersection
, compute the respective area size withst_area
, and then select the combinations above a certain area size. If e.g. less than one percent of a voting precinct's area intersects with a certain school zone, you drop that combination.