forked from runapp-aus/strayr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wfmackey
committed
Sep 17, 2021
1 parent
7174ec7
commit 16c180f
Showing
2 changed files
with
28 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,58 +75,30 @@ Current structures stored in `strayr` are: | |
Classification of Education (ASCED), 2001. Cat. | ||
1272.0](https://www.abs.gov.au/ausstats/[email protected]/mf/1272.0). | ||
|
||
The `strayr` package also loads | ||
[`absmapsdata`](https://github.com/wfmackey/absmapsdata), which contains | ||
the following structures *and their geometry* as `sf` objects: | ||
|
||
**ASGS Main Structures** | ||
|
||
- `sa12011`: Statistical Area 1 2011 | ||
- `sa12016`: Statistical Area 1 2016 | ||
- `sa22011`: Statistical Area 2 2011 | ||
- `sa22016`: Statistical Area 2 2016 | ||
- `sa32011`: Statistical Area 3 2011 | ||
- `sa32016`: Statistical Area 3 2016 | ||
- `sa42011`: Statistical Area 4 2011 | ||
- `sa42016`: Statistical Area 4 2016 | ||
- `gcc2011`: Greater Capital Cities 2011 | ||
- `gcc2016`: Greater Capital Cities 2016 | ||
- `ra2011`: Remoteness Areas 2011 | ||
- `ra2016`: Remoteness Areas 2016 | ||
- `state2011`: State 2011 | ||
- `state2016`: State 2016 | ||
|
||
**ASGS Non-ABS Structures** | ||
|
||
- `ced2018`: Commonwealth Electoral Divisions 2018 | ||
- `sed2018`: State Electoral Divisions 2018 | ||
- `lga2016`: Local Government Areas 2016 | ||
- `lga2018`: Local Government Areas 2018 | ||
- `regional_ivi2008`: Regions for the Internet Vacancy Index 2008 | ||
- `postcodes2016`: Postcodes 2016 | ||
- `dz2011`: Census of Population and Housing Destination Zones 2011 | ||
- `dz2016`: Census of Population and Housing Destination Zones 2016 | ||
|
||
|
||
|
||
## Converting state names and abbreviations | ||
|
||
The `clean_state()` function makes it easy to wrangle vectors of State names and abbreviations - which might be in different forms and possibly | ||
misspelled. | ||
|
||
## Australian public holidays | ||
This package includes the `auholidays` dataset from the [Australian Public Holidays Dates Machine Readable Dataset](https://data.gov.au/data/dataset/australian-holidays-machine-readable-dataset) as well as a helper function `is_holiday`: | ||
|
||
This package includes the `auholidays` dataset from the [Australian Public Holidays Dates Machine Readable Dataset](https://data.gov.au/data/dataset/australian-holidays-machine-readable-dataset) as well as a helper function `is_holiday`. | ||
|
||
|
||
## Parsing income ranges | ||
|
||
The `parse_income_range` function provides some tools for extracting numbers from income ranges commonly used in Australian data. For example: | ||
|
||
```{r} | ||
parse_income_range("$1-$199 ($1-$10,399)", limit = "lower") | ||
``` | ||
|
||
## Accessing ABS mapping structures | ||
|
||
The `strayr` package also loads provides tools to access `sf` objects contained | ||
in [`absmapsdata`](https://github.com/wfmackey/absmapsdata). See `?strayr::read_absmaps`. | ||
|
||
```{r, eval=FALSE} | ||
read_absmaps("sa42021") | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,12 @@ status](https://github.com/runapp-aus/strayr/workflows/R-CMD-check/badge.svg)](h | |
The `strayr` package provides tools to make working with Australian data | ||
easier. This includes: | ||
|
||
- tidy versions of common structures used by the Australian Bureau of | ||
- tidy versions of common structures used by the Australian Bureau of | ||
Statistics (ABS), like ANZSIC and ANZSCO: | ||
|
||
- a function to tidy up state names (`clean_states()`); and | ||
- a function to tidy up state names (`clean_states()`); and | ||
|
||
- a function that knows whether particular dates are public holidays | ||
- a function that knows whether particular dates are public holidays | ||
(`is_holiday()`). | ||
|
||
This package is currently **in development** and subject to change. The | ||
|
@@ -42,53 +42,21 @@ remotes::install_github("runapp-aus/strayr") | |
|
||
Current structures stored in `strayr` are: | ||
|
||
- `anzsco2009`: occupation levels of the [Australian and New Zealand | ||
- `anzsco2009`: occupation levels of the [Australian and New Zealand | ||
Standard Classification of Occupations (ANZSCO), First Edition, | ||
Revision 1, 2009. Cat. | ||
1220.0](https://www.abs.gov.au/AUSSTATS/[email protected]/DetailsPage/1220.0First%20Edition,%20Revision%201?OpenDocument). | ||
- `anzsic2006`: industry levels of the [Australian and New Zealand | ||
- `anzsic2006`: industry levels of the [Australian and New Zealand | ||
Standard Industrial Classification (ANZSIC), 2006 (Revision 1.0). | ||
Cat. | ||
1292.0](https://www.abs.gov.au/ausstats/[email protected]/0/20C5B5A4F46DF95BCA25711F00146D75?opendocument). | ||
- `asced_foe2001`: field of education levels of the [Australian Standard | ||
Classification of Education (ASCED), 2001. Cat. | ||
- `asced_foe2001`: field of education levels of the [Australian | ||
Standard Classification of Education (ASCED), 2001. Cat. | ||
1272.0](https://www.abs.gov.au/ausstats/[email protected]/mf/1272.0). | ||
- `asced_qual2001`: qualification levels of the [Australian Standard | ||
- `asced_qual2001`: qualification levels of the [Australian Standard | ||
Classification of Education (ASCED), 2001. Cat. | ||
1272.0](https://www.abs.gov.au/ausstats/[email protected]/mf/1272.0). | ||
|
||
The `strayr` package also loads | ||
[`absmapsdata`](https://github.com/wfmackey/absmapsdata), which contains | ||
the following structures *and their geometry* as `sf` objects: | ||
|
||
**ASGS Main Structures** | ||
|
||
- `sa12011`: Statistical Area 1 2011 | ||
- `sa12016`: Statistical Area 1 2016 | ||
- `sa22011`: Statistical Area 2 2011 | ||
- `sa22016`: Statistical Area 2 2016 | ||
- `sa32011`: Statistical Area 3 2011 | ||
- `sa32016`: Statistical Area 3 2016 | ||
- `sa42011`: Statistical Area 4 2011 | ||
- `sa42016`: Statistical Area 4 2016 | ||
- `gcc2011`: Greater Capital Cities 2011 | ||
- `gcc2016`: Greater Capital Cities 2016 | ||
- `ra2011`: Remoteness Areas 2011 | ||
- `ra2016`: Remoteness Areas 2016 | ||
- `state2011`: State 2011 | ||
- `state2016`: State 2016 | ||
|
||
**ASGS Non-ABS Structures** | ||
|
||
- `ced2018`: Commonwealth Electoral Divisions 2018 | ||
- `sed2018`: State Electoral Divisions 2018 | ||
- `lga2016`: Local Government Areas 2016 | ||
- `lga2018`: Local Government Areas 2018 | ||
- `regional_ivi2008`: Regions for the Internet Vacancy Index 2008 | ||
- `postcodes2016`: Postcodes 2016 | ||
- `dz2011`: Census of Population and Housing Destination Zones 2011 | ||
- `dz2016`: Census of Population and Housing Destination Zones 2016 | ||
|
||
## Converting state names and abbreviations | ||
|
||
The `clean_state()` function makes it easy to wrangle vectors of State | ||
|
@@ -100,7 +68,7 @@ misspelled. | |
This package includes the `auholidays` dataset from the [Australian | ||
Public Holidays Dates Machine Readable | ||
Dataset](https://data.gov.au/data/dataset/australian-holidays-machine-readable-dataset) | ||
as well as a helper function `is_holiday`: | ||
as well as a helper function `is_holiday`. | ||
|
||
## Parsing income ranges | ||
|
||
|
@@ -109,7 +77,16 @@ numbers from income ranges commonly used in Australian data. For | |
example: | ||
|
||
``` r | ||
|
||
parse_income_range("$1-$199 ($1-$10,399)", limit = "lower") | ||
#> [1] 1 | ||
``` | ||
|
||
## Accessing ABS mapping structures | ||
|
||
The `strayr` package also loads provides tools to access `sf` objects | ||
contained in [`absmapsdata`](https://github.com/wfmackey/absmapsdata). | ||
See `?strayr::read_absmaps`. | ||
|
||
``` r | ||
read_absmaps("sa42021") | ||
``` |