-
Notifications
You must be signed in to change notification settings - Fork 1
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
648 move pg conversion to imputation. #183
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the code looks good on a readthrough but I'm getting some errors when running. Can't seem to highlight specific lines in some files so I'm putting them here.
Line 11 of staging_main
:
from src.staging import pg_conversion as pg
This fails since it's been moved to imputation.
Line 289 of staging_main
:
# Map PG from SIC/PG numbers to column '201'.
full_responses = pg.run_pg_conversion(full_responses, pg_num_alpha, sic_pg_alpha_mapper, target_col="201")
This fails with got an unexpected keyword argument 'target_col'
since it looks like the argument should be pg_column
instead of target_col
.
When I fixed these I got it to run as far as Line 46 in pg_conversion
but that prompts what looks like an error in columns, not sure I know how to fix that.
Pull Request submission
Note: the code runs, and tests work, but I haven't checked the outputs
PG conversion now happens at the beginning of the imputation module. The PG column, 201, is initially numeric, and contains many nulls.
This means that in construction, col 201 can remain numeric as in spp.
Step 1 of TMI is no longer needed.
The approach to PG conversion is now:
The pg_numeric column will now have nulls filled for apportionment, and for the tau and sas outputs.
In outputs, the pg conversion is done for the NI data.
Closes or fixes
Closes #
Code
Documentation
Any new code includes all the following forms of documentation:
Args
andreturns
for all major functionsData
Testing
Peer Review Section
environment.yaml
Final approval (post-review)
The author has responded to my review and made changes to my satisfaction.
Review comments
Insert detailed comments here!
These might include, but not exclusively:
that it is likely to interact with?)
works correctly?)
Your suggestions should be tailored to the code that you are reviewing.
Be critical and clear, but not mean. Ask questions and set actions.