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

Inconsistent facility IDs when applying secondary contexts #149

Open
bl-young opened this issue Nov 3, 2023 · 0 comments
Open

Inconsistent facility IDs when applying secondary contexts #149

bl-young opened this issue Nov 3, 2023 · 0 comments
Assignees

Comments

@bl-young
Copy link
Collaborator

bl-young commented Nov 3, 2023

Comparing results by FacilityID shows a number of differences for individual facilities.

import stewicombo
sc1 = stewicombo.getInventory('NEI_TRI_air_2017_v1.1.1_ff2903a')
sc2 = stewicombo.getInventory('NEI_TRI_air_seccntx_2017_v1.1.1_ff2903a')
sc1 = sc1.groupby(['FacilityID']).agg({'FlowAmount':'sum'})
sc2 = sc2.groupby(['FacilityID']).agg({'FlowAmount':'sum'})
s = (pd.merge(sc1, sc2, on='FacilityID')
     .rename(columns=rename_flow_cols)
     .assign(Rel=lambda x: x['m1'] / x['m2'])
     .query('Rel >= 1.01 or Rel <= 0.99')
     )

However the same review by FlowName does not.

import stewicombo
sc1 = stewicombo.getInventory('NEI_TRI_air_2017_v1.1.1_ff2903a')
sc2 = stewicombo.getInventory('NEI_TRI_air_seccntx_2017_v1.1.1_ff2903a')
sc1 = sc1.groupby(['FlowName']).agg({'FlowAmount':'sum'})
sc2 = sc2.groupby(['FlowName']).agg({'FlowAmount':'sum'})
s = (pd.merge(sc1, sc2, on='FlowName')
     .rename(columns=rename_flow_cols)
     .assign(Rel=lambda x: x['m1'] / x['m2'])
     .query('Rel >= 1.01 or Rel <= 0.99')
     )

This suggests to me that a different approach is being taken to handle the reported FacilityID. This has downstream ramifications for assigning sectors/NAICS in flowsa/USEEIO

@a-w-beck a-w-beck self-assigned this Dec 20, 2023
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