R/interpolation.R
allocate_electorate.Rd
Using the electoral boundaries at the time of an election and the centroids from the SA1 polygons from a neighbouring Census, allocate each SA1 to the electoral division that contains its centroid.
allocate_electorate(
centroids_ls,
electorates_sf,
census_year = NA,
election_year = NA
)
list containing centroids as SpatialPoints and a dataframe with basic data on each polygon (e.g. name)
shapefile with electoral boundaries
census year
election year
data frame detailing which electoral division each Census polygon is allocated to
if (FALSE) {
# Mapping each SA1 from the 2011 Census to the 2013 electoral boundaries
mapping_c11_e13 <- allocate_electorate(centroids_ls = centroids_sa1_2011, electorates_sf = sF_13,
census_year = "2011", election_year = "2013")
}