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

Compute Studio Start Year Values #176

Closed
jdebacker opened this issue Apr 1, 2021 · 2 comments · Fixed by #177
Closed

Compute Studio Start Year Values #176

jdebacker opened this issue Apr 1, 2021 · 2 comments · Fixed by #177

Comments

@jdebacker
Copy link
Member

Tax-Calculator has tax logic back to 2013, but the CPS data are from 2014. This means that when one tries to run Tax-Brain with start year 2013 selected and selects the CPS as the data source, an error is thrown:

Screen Shot 2021-03-31 at 9 52 13 PM

I don't know of a way to allow Tax-Calculator to start in a year before the year of the data. In the long-run, maybe this issue can be resolved in the TaxData package (e.g., allowing one to set the start year of the data), but for now, it would be worth limiting the start year options as a function of the data selected.

cc @hdoupe @andersonfrailey

@hdoupe
Copy link
Collaborator

hdoupe commented Apr 1, 2021

Thanks for opening this @jdebacker. It seems like we should add a check to the taxbrain package that gives more information about what years are available for a given data source.

For the Compute Studio app, we should update get_inputs to only return 2014 and up when the CPS is selected and have a check in validate_inputs to make sure the start year and data source are consistent.

This would be a good place to use the ParamTools when validator (i.e. when data source is CPS start year must be greater than 2014 otherwise must be greater than 2013), but I don't have support for that validator in C/S yet. However, this is good motivation to pick this project back up (PSLmodels/ParamTools#88) to make it easier to keep the JavaScript and Python versions of ParamTools in sync.

@jdebacker
Copy link
Member Author

Here's my attempt at a solution over in CCC: https://github.com/PSLmodels/Cost-of-Capital-Calculator/pull/344/files

Tests pass locally, but start years are explicitly tested.

@hdoupe Thoughts?

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

Successfully merging a pull request may close this issue.

2 participants