-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add initial PE-based flat file #4
Conversation
Creating a PolicyEngine reform to add |
@martinholmer - I'm just adding the very basic flat-file variables (got the required MARS and RECID, just adding earnings) and Tax-Calculator seems to be saying something strange. Screenshot below- am I missing something? |
Worth noting the PolicyEngine US error I don't get locally, will refine the test environment until it's fixed |
@nikhilwoodruff, It's hard for me to say what's the problem without looking at the input data file you're using. Can you zip it up and send it to me as an email attachment? |
Thanks @martinholmer - just sent. |
@martinholmer seems to be a floating-point precision issue (Tax-Calculator has a zero-tolerance check I see). Probably not that big actually, I'll just add some manual adjustments in the code. |
OK, this PR now has the basic repo structure, plus one test which checks that we can generate a CSV file of PolicyEngine's Enhanced CPS dataset with some very basic variables (just marital status, tax unit ID and earnings for filer and spouse), and that Tax-Calculator can run the full routine off it. I think we should merge it in now to keep PRs small and get the basic repo structure in the main branch. |
@nikhilwoodruff, Thanks for sharing the preliminary flat file. You're absolutely correct to begin with a simple file. Here is what I did with the file, then below that I list a few things that could be improved.
Here is my list of suggestions:
|
Thanks @martinholmer! Will add those suggestions. Edit: actually, I think we should just post-hoc correct e00200 to equal e00200p + e00200s under Tax-Calculator's data type to minimise the changes to the record data. |
@nikhilwoodruff, The precision problems arise because PE-Core uses 32-bit floats while Tax-Calculator using 64-bit floats. |
Thanks for your help @martinholmer. This PR passes the test and I've added your suggestions, so merging now. |
Add initial PE-based flat file
This PR has my working progress for the PE-based flat file usable in Tax-Calculator. I'll try and keep closely in sync with local progress, and intend for it to be merged once we have Tax-Calculator's Python package successfully running off it within the repo.