Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What to do in case of update #174

Open
HughParsonage opened this issue Mar 8, 2019 · 2 comments
Open

What to do in case of update #174

HughParsonage opened this issue Mar 8, 2019 · 2 comments
Assignees

Comments

@HughParsonage
Copy link
Owner

No description provided.

@HughParsonage HughParsonage self-assigned this Mar 8, 2019
@HughParsonage
Copy link
Owner Author

HughParsonage commented Mar 8, 2019

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:

  • Source data-raw/put-data.R
  • Fix the documentation according to the unit tests (e.g. if the lf_trend is updated, the lf_inflator_fy documentation needs to be updated to indicate the date it was updated.

The data updated includes

  • Data relevant to tax modelling:
    • cpi_...
    • wages_trend
    • lf_trend
  • as well as
    • abs_key_aggregates (for GDP, GNI)
    • aus_pop_by_yearqtr etc
    • residential_property_prices

DSS data

ATO sample files

  • Add to the top of data-raw/put-data.R calls to read in the new sample file.
  • Change the assignment sample_files_all <- accordingly
  • Copy and modify generic_inflators_1516 to define a new generic_inflators_

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

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

  • Change the files that are read to produce the following tables:
    • lito_tbl,
    • tax_tbl,
    • medicare_tbl,
    • sapto_tbl,
    • hecs_tbl

@HughParsonage HughParsonage pinned this issue Mar 21, 2019
@MattCowgill
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants