Version: | 0.3.3 |
Title: | Interface to the Australian Statistical Geography Standard |
Description: | The Australian Statistical Geography Standard ('ASGS') is a set of shapefiles by the Australian Bureau of Statistics. This package provides an interface to those shapefiles, as well as methods for converting coordinates to shapefiles. |
License: | MPL version 1.0 | MPL version 1.1 | MPL version 2.0 [expanded from: MPL] |
Depends: | R (≥ 3.4.0) |
Imports: | sp, methods, utils |
Encoding: | UTF-8 |
LazyData: | true |
ByteCompile: | true |
RoxygenNote: | 7.2.0 |
Suggests: | testthat, spdep, codetools |
NeedsCompilation: | no |
Packaged: | 2023-12-08 05:38:17 UTC; hughp |
Author: | Hugh Parsonage [aut, cre] |
Maintainer: | Hugh Parsonage <hugh.parsonage@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2023-12-08 06:00:02 UTC |
State shapefile
Description
State shapefile
Usage
STE_2016_simple
Format
An object of class SpatialPolygonsDataFrame
with 9 rows and 4 columns.
Install a (nearly) complete package of the Australian Statistical Geography Standard
Description
The ASGS package provides a nearly comprehensive set of shapefiles, both unmodified and simplified from the Australian Bureau of Statistics. The ASGS package is over 700 MB, so cannot be hosted on CRAN. This function allows the package to be distributed almost as conveniently as through CRAN.
Should you find ASGS lacks some shapefile that you require, please file an issue requesting it be added.
Note that the package is quite large and provides no limits on access, so it is preferred that distribution occur as far as possible via other channels to ensure the method of access provided here is sustainable.
Usage
install_ASGS(
temp.tar.gz = tempfile(fileext = ".tar.gz"),
overwrite = FALSE,
lib = .libPaths()[1],
repos = getOption("repos"),
type = getOption("pkgType", "source"),
...,
.reinstalls = 4L,
url.tar.gz = NULL,
verbose = FALSE
)
Arguments
temp.tar.gz |
A file to save the ASGS tarball after download. Since the package is quite large, it may be prudent to set this to a non-temporary file so that subsequent attempts to reinstall do not require additional downloads. |
overwrite |
(logical, default: |
lib , repos , type |
Passed to |
... |
Other arguments passed to |
.reinstalls |
Number of times to attempt to install any (absent) dependencies of |
url.tar.gz |
The URL of the tarball to be downloaded. Not normally needed by users, but may be in case the link becomes fallow, and a new one becomes available before the release of a new package entirely. If set to special value |
verbose |
(logical, default: |
Value
temp.tar.gz
, invisibly.
Determine whether coordinates lie in a given statistical area.
Description
Determine whether coordinates lie in a given statistical area.
Usage
latlon2SA(
lat,
lon,
to = c("STE", "SA2", "SA1", "SA3", "SA4"),
yr = c("2016", "2011"),
return = c("v", "sp"),
NAME = TRUE,
.shapefile = NULL
)
Arguments
lat , lon |
Numeric vector representing coordinates in decimal degrees. Coordinates south of the equator have |
to |
The statistical area to convert to. |
yr |
The year of the statistical area. |
return |
Whether to return an atomic vector |
NAME |
(logical, default: |
.shapefile |
If specified, an arbitrary shapefile containing the statistical areas to locate. |
Value
The statistical area that contains each point.
Examples
latlon2SA(-35.3, 149.2, to = "STE", yr = "2016")