Skip to content

Commit

Permalink
Merge pull request #42 from runapp-aus/change-package-name
Browse files Browse the repository at this point in the history
update name to strayr
  • Loading branch information
Will Mackey authored May 31, 2021
2 parents 64a8fa6 + 9d4ca2e commit dddb067
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 34 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: abscorr
Package: strayr
Type: Package
Title: Ready-to-use Australian common structures and classifications and tools for working with them
Version: 0.1.1
Version: 0.1.2
Authors@R: c(person("Will", "Mackey", email = "wfmackey@gmail.com",
role = c("aut", "cre")),
person(given = "Matt", family = "Johnson",
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# strayr 0.1.2
* Package renamed from `abscorr` to `strayr`.

# abscorr 0.1.1
* Functions from `strayr` package to wrangle state names + public holidays added

Expand Down
4 changes: 2 additions & 2 deletions R/is_holiday.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ do_is_holiday <- function(date, jurisdictions = c()) {
}

if (length(jurisdictions) == 0) {
ret <- abscorr::auholidays[abscorr::auholidays$Date == new_date, ]
ret <- strayr::auholidays[strayr::auholidays$Date == new_date, ]
} else {
ret <- abscorr::auholidays[abscorr::auholidays$Date == new_date & (abscorr::auholidays$Jurisdiction %in% jurisdictions | abscorr::auholidays$Jurisdiction == "NAT"), ]
ret <- strayr::auholidays[strayr::auholidays$Date == new_date & (strayr::auholidays$Jurisdiction %in% jurisdictions | strayr::auholidays$Jurisdiction == "NAT"), ]
}

return(nrow(ret) > 0)
Expand Down
File renamed without changes.
22 changes: 11 additions & 11 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ knitr::opts_chunk$set(
)
```

# abscorr <img src="man/figures/apple-touch-icon-152x152.png" align="right" style="height:150px"/>
# strayr <img src="man/figures/apple-touch-icon-152x152.png" align="right" style="height:150px"/>

<!-- badges: start -->

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![R build
status](https://github.com/runapp-aus/abscorr/workflows/R-CMD-check/badge.svg)](https://github.com/runapp-aus/abscorr/actions)
status](https://github.com/runapp-aus/strayr/workflows/R-CMD-check/badge.svg)](https://github.com/runapp-aus/strayr/actions)

<!-- badges: end -->

The `abscorr` package provides tools to make working with Australian
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
Expand All @@ -47,15 +47,15 @@ contribute to this package.

## Installation

You can install the current version of `abscorr` with:
You can install the current version of `strayr` with:

``` r
remotes::install_github("runapp-aus/abscorr")
remotes::install_github("runapp-aus/strayr")
```

## Structures

Current structures stored in `abscorr` are:
Current structures stored in `strayr` are:

- `anzsco`: occupation levels of the [Australian and New Zealand
Standard Classification of Occupations (ANZSCO), First Edition,
Expand All @@ -72,7 +72,7 @@ Current structures stored in `abscorr` are:
Classification of Education (ASCED), 2001. Cat.
1272.0](https://www.abs.gov.au/ausstats/abs@.nsf/mf/1272.0).

The `abscorr` package also loads
The `strayr` package also loads
[`absmapsdata`](https://github.com/wfmackey/absmapsdata), which contains
the following structures *and their geometry* as `sf` objects:

Expand Down Expand Up @@ -117,7 +117,7 @@ library(dplyr, warn.conflicts = FALSE)
```

```{r fake-load, eval=FALSE}
library(abscorr)
library(strayr)
#> Loading required package: absmapsdata
library(dplyr)
```
Expand Down Expand Up @@ -150,14 +150,14 @@ x <- c("western Straya", "w. A ", "new soth wailes", "SA", "tazz", "Victoria",
To convert this character vector to a vector of abbreviations for State names,
use `clean_state()`:

```{r strayr1}
```{r state}
clean_state(x)
```

If you want full names for the states rather than abbreviations:

```{r strayr-fullnames}
```{r state-fullnames}
clean_state(x, to = "state_name")
Expand All @@ -169,7 +169,7 @@ to permit exact matching, you can disable fuzzy matching. This means you will
never get false matches, but you will also fail to match misspelled state names
or malformed abbreviations; you'll get an `NA` if no match can be found.

```{r strayr-exact}
```{r state-exact}
clean_state(x, fuzzy_match = FALSE)
```
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# abscorr <img src="man/figures/apple-touch-icon-152x152.png" align="right" style="height:150px"/>
# strayr <img src="man/figures/apple-touch-icon-152x152.png" align="right" style="height:150px"/>

<!-- badges: start -->

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![R build
status](https://github.com/runapp-aus/abscorr/workflows/R-CMD-check/badge.svg)](https://github.com/runapp-aus/abscorr/actions)
status](https://github.com/runapp-aus/strayr/workflows/R-CMD-check/badge.svg)](https://github.com/runapp-aus/strayr/actions)

<!-- badges: end -->

The `abscorr` package provides tools to make working with Australian
data easier. This includes:
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
Statistics (ABS), like ANZSIC and ANZSCO:
Expand All @@ -32,15 +32,15 @@ contribute to this package.

## Installation

You can install the current version of `abscorr` with:
You can install the current version of `strayr` with:

``` r
remotes::install_github("runapp-aus/abscorr")
remotes::install_github("runapp-aus/strayr")
```

## Structures

Current structures stored in `abscorr` are:
Current structures stored in `strayr` are:

- `anzsco`: occupation levels of the [Australian and New Zealand
Standard Classification of Occupations (ANZSCO), First Edition,
Expand All @@ -57,7 +57,7 @@ Current structures stored in `abscorr` are:
Classification of Education (ASCED), 2001. Cat.
1272.0](https://www.abs.gov.au/ausstats/abs@.nsf/mf/1272.0).

The `abscorr` package also loads
The `strayr` package also loads
[`absmapsdata`](https://github.com/wfmackey/absmapsdata), which contains
the following structures *and their geometry* as `sf` objects:

Expand Down Expand Up @@ -95,7 +95,7 @@ Loading the package will lazily load the structures listed above. Call
them with their name:

``` r
library(abscorr)
library(strayr)
#> Loading required package: absmapsdata
library(dplyr)
```
Expand Down
10 changes: 5 additions & 5 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
URL: https://runapp-aus.github.io/abscorr/
URL: https://runapp-aus.github.io/strayr/

navbar:
type: default
Expand All @@ -11,9 +11,9 @@ navbar:

repo:
url:
home: https://github.com/runapp-aus/abscorr/
source: https://github.com/runapp-aus/abscorr/blob/master/
issue: https://github.com/runapp-aus/abscorr/issues/
home: https://github.com/runapp-aus/strayr/
source: https://github.com/runapp-aus/strayr/blob/master/
issue: https://github.com/runapp-aus/strayr/issues/
user: https://github.com/runapp-aus/

development:
Expand All @@ -27,7 +27,7 @@ home:
strip_header: false

reference:
- title: "Runapp-aus abscorr Package"
- title: "Runapp-aus strayr Package"
desc: "Internal Data Structures."
contents:
- starts_with("anz")
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
library(testthat)
library(abscorr)
library(strayr)
library(dplyr)
library(here)

test_check("abscorr")
test_check("strayr")
2 changes: 1 addition & 1 deletion tests/testthat/test-anzsco.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
library(testthat)
library(abscorr)
library(strayr)
library(dplyr)


Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-asced.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
library(testthat)
library(abscorr)
library(strayr)
library(dplyr)


Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-seifa.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test_that("can Import SEIFA LGA scores", {
test_that('sa1 spreadsheet can be parsed', {
df <- get_seifa_index_sheet(system.file('extdata',
'sa1_seifa_indexes_test.xls',
package = 'abscorr',
package = 'strayr',
mustWork = TRUE),
'Table 2',
'sa1')
Expand Down

0 comments on commit dddb067

Please sign in to comment.