
Read 'Australian Agricultural and Grazing Industries Survey' (AAGIS) region mapping files
Source:R/read_aagis_regions.R
read_aagis_regions.Rd
Download, cache and import the Australian Agricultural and Grazing Industries Survey (AAGIS) regions geospatial shapefile.
Arguments
- cache
Cache the AAGIS regions' geospatial file after downloading using
tools::R_user_dir("read.abares", "cache")
to identify the proper directory for storing user data in a cache for this package. Defaults toTRUE
, caching the files locally as a GeoPackage. IfFALSE
, this function usestempdir()
and the files are deleted upon closing of the active R session.
Value
An sf object of the AAGIS regions and a cached geopackage file if requested.
Details
@note Upon import a few operations are carried out,
the geometries are automatically corrected to fix invalid geometries that are present in the original shapefile,
column names are set to start with an upper-case letter,
the original column named, "name", is set to "AAGIS_region" to align with column names that the
data.table::data.table()
provided byread_historical_regional_estimates()
to allow for easier merging of data for mapping, and,a new column, "State" is added to be used for mapping state estimates with data for mapping state historical estimate values found in the
data.table::data.table()
fromread_historical_state_estimates()
.
References
https://www.agriculture.gov.au/abares/research-topics/surveys/farm-definitions-methods#regions
Examples
if (FALSE) { # interactive()
aagis <- read_aagis_regions()
plot(aagis)
}