R/interpolation.R
extract_centroids.Rd
Extract centroids from the polygons within a shapefile.
extract_centroids(shapefile)
SpatialPolygonsDataFrame containing polygons
list containing centroids as SpatialPoints and a dataframe with basic data on each polygon (e.g. name)
if (FALSE) {
sF_download(year = 2016)
electorate_centroids_2016 <- extract_centroids(sF_16)
}