HughParsonage / grattan

Common quantitative tasks for Australian policy analysts
25 stars 8 forks source link

What to do in case of update #174

Open HughParsonage opened 5 years ago

HughParsonage commented 5 years ago

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 in data-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:

The data updated includes

DSS data

ATO sample files

Check the diffs in data-raw/sysdata/ to verify the data has been updated.

On changes to the tax scales (typically Budget Night):

MattCowgill commented 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.