allocate_electorate: Determine which electoral division contains the centroid from...

View source: R/interpolation.R

allocate_electorateR Documentation

Determine which electoral division contains the centroid from each of the Census polygons.

Description

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.

Usage

allocate_electorate(
  centroids_ls,
  electorates_sf,
  census_year = NA,
  election_year = NA
)

Arguments

centroids_ls

list containing centroids as SpatialPoints and a dataframe with basic data on each polygon (e.g. name)

electorates_sf

shapefile with electoral boundaries

census_year

census year

election_year

election year

Value

data frame detailing which electoral division each Census polygon is allocated to

Examples

## Not run: 
# 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")

## End(Not run)

ropenscilabs/eechidna documentation built on May 4, 2023, 6:51 a.m.