Skip to content

Commit

Permalink
Add workpackage-meta-indicator to workflow (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann authored Feb 19, 2024
1 parent 95c5902 commit ab23a8f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@ def main(df: pyam.IamDataFrame) -> pyam.IamDataFrame:
processor = RegionProcessor.from_directory(path=here / "mappings", dsd=dsd)
df = process(df, dsd, processor=processor)

# assign meta indicator for scenario "work package" category
for model, scenario in df.index:
if "DIAG" in scenario:
df.meta.loc[(model, scenario), "Work package"] = "Diagnostic"
elif scenario.startswith("WP"):
df.meta.loc[(model, scenario), "Work package"] = (
"Work Package " + scenario[2:4]
)

return df

0 comments on commit ab23a8f

Please sign in to comment.