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

Country name fix #40

Merged
merged 4 commits into from
Dec 7, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/osemosys2iamc/resultify.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,16 @@ def main(config: Dict, inputs_path: str, results_path: str) -> pyam.IamDataFrame
all_data = all_data.convert_unit("MEUR_2015/GW", to="EUR_2020/kW", factor=1.05)
all_data = all_data.convert_unit("kt CO2/yr", to="Mt CO2/yr")

dic_country_name_variants = {
"Netherlands": "The Netherlands",
"Czechia": "Czech Republic",
"United Kingdom of Great Britain and Northern Ireland": "United Kingdom",
}
for c in dic_country_name_variants:
all_data.data["region"] = all_data.data["region"].str.replace(
c, dic_country_name_variants[c]
)
willu47 marked this conversation as resolved.
Show resolved Hide resolved

all_data = pyam.IamDataFrame(all_data)
return all_data
else:
Expand Down
Loading