| pd_boundaries | R Documentation |
A boundary layer as an sf object
pd_boundaries(layer, cache = NULL)
layer |
A layer's key, such as '"lga"', '"sa2"', '"suburb"', '"postcode"', '"state_electorate"' or '"federal_electorate"', or its slug or code field. [pd_boundary_layers()] lists them. |
cache |
Keep the file in [pd_cache_dir()] and reuse it next time. Versions never change, so a kept file never goes stale. Off unless 'options(publicdataau.cache = TRUE)' is set. |
An 'sf' tibble with a row per area: its code, name and the other fields of the layer, in GDA2020 (EPSG:7844).
Other maps:
pd_boundary_layers(),
pd_join_boundaries(),
pd_sf()
# A boundary file is tens of megabytes, so this runs only when asked.
electorates <- pd_boundaries("federal_electorate")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.