Description Usage Arguments Value Examples
Extract polygon information and demographics for each of Australia's electorates. The map and data corresponding to the shapefiles of the 2013 Australian electorates (available at https://www.aec.gov.au/Electorates/gis/gis_datadownload.htm) are part of this package as nat_map.rda and nat_data.rda in the data folder. The function will take several minutes to complete.
1 2 3 4 5 6 7 | get_electorate_shapes(
path_to_shapeFile = NULL,
sF = NULL,
mapinfo = TRUE,
layer = NULL,
tolerance = 0.005
)
|
path_to_shapeFile |
path to object in local machine (only if shapefile has not already loaded) |
sF |
Shapefile object loaded to environment using load_shapefile |
mapinfo |
Is the data mapInfo format, rather than ESRI? default=TRUE |
layer |
If the format is mapInfo, the layer name also needs to be provided, default is NULL |
tolerance |
Numerical tolerance value to be used by the Douglas-Peuker algorithm (only if shapefile has not already loaded) |
list with two data frames: map and data; 'map' is a data set with geographic latitude and longitude, and a grouping variable to define each entity. The 'data' data set consists of demographic or geographic information for each electorate, such as size in square kilometers or corresponding state. Additionally, geographic latitude and longitude of the electorate's centroid are added.
1 2 3 4 5 6 7 8 9 | ## Not run:
# Get electorate shapes in data.frame format
# Path to your shapefile
fl <- "local/path/to/shapefile.shp"
map_and_data16 <- get_electorate_shapes(path_to_shapefile = fl)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.