Open HughParsonage opened 5 years ago
Note: after updating medicare-tables.xlsx
and running put-data.R
, you will also need to update the hard-coded values for the thresholds in src/MedicareLevySingle.cpp
. If this is not done, a test in tests/testthat/test_income_tax_cpp.R
will fail.
All internal data is defined and saved via
data-raw/put-data.R
.The script is very complicated. While some simplification is possible, care should be taken not to change too much because it's important to have a fairly clean record of each change. Experience has shown that if the changes are too large when viewed in git it's quite difficult to detect breaking changes.
The most difficult update will be that associated with a new ATO sample file. The internal data supporting
project
includes tables with inflators for each variable. Some of these variables have a considerable chunk of code indata-raw/put-data.R
just to create their inflators.One annoyance is that the ABS changes historical data (even as early 1980s), so nearly every time you run the script there will be spurious changes.
Before each update to sysdata, review open pull requests, take note of https://cran.r-project.org/web/checks/check_results_grattan.html (i.e. fix any problems there).
ABS data From time to time or whenever there are updates to the relevant series:
data-raw/put-data.R
lf_trend
is updated, thelf_inflator_fy
documentation needs to be updated to indicate the date it was updated.The data updated includes
cpi_...
wages_trend
lf_trend
abs_key_aggregates
(for GDP, GNI)aus_pop_by_yearqtr
etcresidential_property_prices
DSS data
On windows with
wget64
capabilities, run https://github.com/HughParsonage/grattan/blob/master/data-raw/put-guides-dss-gov-au.ROther platforms may be able to use just
wget
.data-raw/put-data.R
.ATO sample files
data-raw/put-data.R
calls to read in the new sample file.sample_files_all <-
accordinglygeneric_inflators_1516
to define a newgeneric_inflators_
Check the diffs in
data-raw/sysdata/
to verify the data has been updated.On changes to the tax scales (typically Budget Night):