R/interpolation.R
mapping_fn.Rd
At the time of an election, compute how much each electoral division intersects with the divisions in place at the time of the Census. This is to be used in interpolating Census information for electoral divisions in a year that a Census did not occur.
mapping_fn(aec_sF, abs_sF, area_thres = 0.995)
shapefile with boundaries at election time
shapefile with boundaries at census time
threshold for which mapping is sufficient (default is 99.5%)
data frame detailing how much Census divisions intersect with each electoral division at the time of the election.
if (FALSE) {
# Each 2013 electorate boundary's composition in terms of the
# boundaries in place for the 2016 Census
aec_sF_2013 <- loadShapeFile(path_to_aec_shapefile)
abs_sF_2016 <- loadShapeFile(path_to_abs_shapefile)
mapping_df <- mapping_fn(aec_sF = aec_sF_2013, abs_sF = abs_sF_2016, area_thres = 0.995)
}