update recursive-refac with proportional_attribution#354
Merged
catherinebirney merged 143 commits intorecursive-refacfrom Jul 14, 2023
Merged
update recursive-refac with proportional_attribution#354catherinebirney merged 143 commits intorecursive-refacfrom
catherinebirney merged 143 commits intorecursive-refacfrom
Conversation
Contributor
catherinebirney
commented
Jul 14, 2023
- Major refactoring of attribution fxns - ability to have multiple non-recursive attribution methods, option to specify what columns to use to attribute primary data source with secondary data source, can split an FBS used as an attribution source into activity sets
- New attribution methods: multiplication, division, inheritence
- New attribution cleaning fxns: weighed_average, substitute_nonexistent_values
- new fxn to attribute national data to state data using employment
- new fxn to calculate flow per employee
- require use of "activity_schema" into source_config.yaml to determine if "sector-like_activities"
- ability to specify different NAICS sector years for different years of a data source
- generalized fxn to estimate suppressed sectors using equal attribution
- delete obsolete code (and comment out other fxns)
- update seeAvailableFlowByModels() so does not return yaml files that end in "summary" or "common"
… with original method
# Conflicts: # flowsa/flowby.py
…_schema to be dictionary
… FBS method yaml - move 'FlowByActivity' fxns to 'FlowBy' fxns
# Conflicts: # flowsa/data_source_scripts/EPA_REI.py # flowsa/methods/flowbysectormethods/REI_waste_national_2012.yaml
# Conflicts: # flowsa/flowby.py
… in the cleaning fxn
…tribution' parameter in the yaml and load employment data as 'clean_source' so can use load_prepare_clean_source() which will attribute employment data to target sectors
…here are hyphenated sectors - for now, dropping hyphenated sectors
Contributor
Author
|
@bl-young This code still needs some tweaks, but I think it is ready to be pulled into the recursive-refac branch. I did comment out most of the data vis fxns which need to be reworked |
bl-young
approved these changes
Jul 14, 2023
Contributor
bl-young
left a comment
There was a problem hiding this comment.
I expect we'll do some more editing and testing but I think fine to pull in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.