Skip to content

Commit 78be8cb

Browse files
authored
Update data, CRAN release (#185)
Update data, CRAN release
2 parents b3fccfe + 4ba219c commit 78be8cb

File tree

154 files changed

+15445
-13345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+15445
-13345
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
^CRAN-RELEASE$
12
^Meta$
23
^doc$
34
^\.circleci$

CRAN-RELEASE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This package was submitted to CRAN on 2019-05-02.
2+
Once it is accepted, delete this file and tag the release (commit 3d114211b5).

DESCRIPTION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: grattan
22
Type: Package
33
Title: Australian Tax Policy Analysis
4-
Version: 1.7.1.901
5-
Date: 2019-03-21
4+
Version: 1.7.1.1
5+
Date: 2019-05-01
66
Authors@R: c(person("Hugh", "Parsonage", role = c("aut", "cre"), email = "hugh.parsonage@gmail.com"),
77
person("Tim", "Cameron", role = "aut"),
88
person("Brendan", "Coates", role = "aut"),
@@ -11,14 +11,14 @@ Authors@R: c(person("Hugh", "Parsonage", role = c("aut", "cre"), email = "hugh.p
1111
person("Ittima", "Cherastidtham", role = "dtc"),
1212
person("W.", "Karsten", role = "ctb"),
1313
person("M.", "Enrique Garcia", role = "ctb"),
14-
person("Matt", "Cowgill", role = "ctb"))
14+
person("Matt", "Cowgill", role = "aut"))
1515
Maintainer: Hugh Parsonage <hugh.parsonage@gmail.com>
1616
URL: https://github.com/HughParsonage/grattan, https://hughparsonage.github.io/grattan/
1717
BugReports: https://github.com/HughParsonage/grattan/issues
1818
Description: Utilities for costing and evaluating Australian tax policy, including high-performance tax and transfer calculators, a fast method of projecting tax collections, and an interface to common indices from the Australian Bureau of Statistics. Written to support Grattan Institute's Australian Perspectives program. For access to the 'taxstats' package, please run
1919
install.packages("taxstats", repos = "https://hughparsonage.github.io/tax-drat/", type = "source").
2020
N.B. The 'taxstats' package is approximately 50 MB.
21-
Depends: R (>= 3.3.0)
21+
Depends: R (>= 3.5.0)
2222
License: GPL-2
2323
Imports:
2424
data.table,

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.7.1.1
2+
* `grattan` now depends on R 3.5.0 due to serialization format version 3 becoming the default
3+
in R 3.6.0.
4+
* `cpi_inflator` fails more gracefully when the ABS's website is not available
5+
16
## 1.7.1.0
27

38
### Bug fixes

R/cpi_inflator.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#' If the SDMX connection fails, a message is emitted (not a warning) and
1313
#' the function contines as if \code{useABSConnection = FALSE}.
1414
#'
15-
#' The internal data was updated on 2019-03-23 to 2018-Q4.
15+
#' The internal data was updated on 2019-05-02 to 2019-Q1.
1616
#' If using \code{useABSConnection = TRUE}, ensure you have \code{rsdmx (>= 0.5-10)} up-to-date.
1717
#' @param allow.projection Should projections beyond the ABS's data be allowed?
1818
#' @param accelerate.above An integer setting the threshold for 'acceleration'.

R/cpi_inflator_quarters.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' @param to_qtr (date in quarters) the date to be inflated to, where nominal price = real price. Must be of the form "YYYY-Qq" e.g. "1066-Q2".
55
#' @param adjustment Should there be an adjustment made to the index? Adjustments include 'none' (no adjustment), 'seasonal', or 'trimmed' [referring to trimmed mean]. By default, \code{seasonal}.
66
#' @param useABSConnection Should the function connect with ABS.Stat via an SDMX connection? By default set to \code{FALSE} in which case a pre-prepared index table is used. This is much faster and more reliable (in terms of errors), though of course relies on the package maintainer to keep the tables up-to-date.
7-
#' The internal data was updated on 2019-03-23 to 2018-Q4.
7+
#' The internal data was updated on 2019-05-02 to 2019-Q1.
88
#' If using \code{useABSConnection = TRUE}, ensure you have \code{rsdmx (>= 0.5-10)} up-to-date.
99
#' @return A vector of real prices.
1010
#' @export

R/lf_inflator.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#' If the SDMX connection fails, a message is emitted (not a warning) and
1616
#' the function contines as if \code{useABSConnection = FALSE}.
1717
#'
18-
#' The internal data was updated on 2019-04-03 to 2019-02-01.
18+
#' The internal data was updated on 2019-05-02 to 2019-03-01.
1919
#' @param allow.projection Logical. Should projections be allowed?
2020
#' @param use.month An integer (corresponding to the output of \code{data.table::month}) representing the month of the series used for the inflation.
2121
#' @param forecast.series Whether to use the forecast mean, or the upper or lower boundaries of the prediction intervals.

R/project.R

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ project <- function(sample_file,
123123
# without updating the fy.year.of.sample.file
124124
if (is.null(fy.year.of.sample.file)) {
125125
fy.year.of.sample.file <-
126-
match(nrow(sample_file), c(254318L, 258774L, 263339L, 269639L))
126+
match(nrow(sample_file), c(254318L, 258774L, 263339L, 269639L, 277202L))
127127
if (is.na(fy.year.of.sample.file)) {
128128
stop("`fy.year.of.sample.file` was not provided, and its value could not be ",
129129
"inferred from nrow(sample_file) = ", nrow(sample_file), ". Either use ",
130130
"a 2% sample file of the years 2012-13, 2013-14, or 2014-15 or ",
131131
"supply `fy.year.of.sample.file` manually.")
132132
}
133133
fy.year.of.sample.file <-
134-
c("2012-13", "2013-14", "2014-15", "2015-16")[fy.year.of.sample.file]
134+
c("2012-13", "2013-14", "2014-15", "2015-16", "2016-17")[fy.year.of.sample.file]
135135
}
136136

137137

@@ -156,7 +156,12 @@ project <- function(sample_file,
156156
warning("nrow(sample_file) != 269639. Should you choose a different fy.year.of.sample.file?")
157157
}
158158
},
159-
stop("`fy.year.of.sample.file` must be '2012-13', '2013-14', or '2014-15'."))
159+
"2016-17" = {
160+
if (nrow(sample_file) != 277202) {
161+
warning("nrow(sample_file) != 277202. Should you choose a different fy.year.of.sample.file?")
162+
}
163+
},
164+
stop("`fy.year.of.sample.file` must be '2012-13', '2013-14', '2014-15', '2015-16', or '2016-17'."))
160165
}
161166

162167
if (h == 0) {
@@ -315,6 +320,7 @@ project <- function(sample_file,
315320
"2013-14" = generic_inflators_1314,
316321
"2014-15" = generic_inflators_1415,
317322
"2015-16" = generic_inflators_1516,
323+
"2016-17" = generic_inflators_1617,
318324
stop("Precalculated inflators only available when projecting from ",
319325
"2012-13, 2013-14, 2014-15, and 2015-16."))
320326
}

R/sysdata.rda

1.51 KB
Binary file not shown.

R/wage_inflator.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#' If the SDMX connection fails, a message is emitted (not a warning) and
1111
#' the function contines as if \code{useABSConnection = FALSE}.
1212
#'
13-
#' The internal data was updated on 2019-03-23 to 2018-Q4.
13+
#' The internal data was updated on 2019-05-02 to 2018-Q4.
1414
#' @param allow.projection If set to \code{TRUE} the \code{forecast} package is used to project forward, if required.
1515
#' @param forecast.series Whether to use the forecast mean, or the upper or lower boundaries of the prediction intervals. A fourth option \code{custom} allows manual forecasts to be set.
1616
#' @param forecast.level The prediction interval to be used if \code{forecast.series} is \code{upper} or \code{lower}.

0 commit comments

Comments
 (0)