diff --git a/doc/release-notes.rst b/doc/release-notes.rst index c475a0af..44e0557c 100644 --- a/doc/release-notes.rst +++ b/doc/release-notes.rst @@ -5,7 +5,7 @@ History of Changes .. Upcoming Version .. ---------------- -* +* Update IRENASTAT to include data up to 2023. Version 0.5.12 (07.04.2024) --------------------------- diff --git a/powerplantmatching/data.py b/powerplantmatching/data.py index 5dfdc563..ec0b3102 100644 --- a/powerplantmatching/data.py +++ b/powerplantmatching/data.py @@ -1521,27 +1521,37 @@ def IRENASTAT(raw=False, update=False, config=None): fn = get_raw_file("IRENA", update=update, config=config) - df = pd.read_csv(fn, comment="#") + df = pd.read_csv(fn, comment="#", quotechar='"') if raw: return df RENAME_COLUMNS = { - "Installed electricity capacity by country/area (MW)": "Capacity", + "Electricity statistics": "Capacity", "Country/area": "Country", "Grid connection": "Grid", } df.rename(columns=RENAME_COLUMNS, inplace=True) + df.drop(columns="Data Type", inplace=True) + + # Rename all entries "Congo (the)" to "Congo" under the column + # "Country"; the former confuses country_converter. + df["Country"] = df["Country"].replace("Congo (the)", "Congo") + # Consistent country names for dataset df = convert_to_short_name(df) df.dropna(subset="Capacity", inplace=True) + # Remove all rows where Technology is just a Total + df = df[ + ~df.Technology.str.contains("Total Renewable|Total Non-Renewable", na=False) + ] + fueltype_dict = { - "On-grid Solar photovoltaic": "Solar", - "Off-grid Solar photovoltaic": "Solar", - "Concentrated solar power": "Solar", + "Solar photovoltaic": "Solar", + "Solar thermal energy": "Solar", "Onshore wind energy": "Wind", "Offshore wind energy": "Wind", "Renewable hydropower": "Hydro", @@ -1553,7 +1563,6 @@ def IRENASTAT(raw=False, update=False, config=None): "Biogas": "Bioenergy", "Geothermal energy": "Geothermal", "Marine energy": "Marine", - "Fossil fuels": "Other", "Coal and peat": "Hard Coal", "Oil": "Oil", "Natural gas": "Natural Gas", @@ -1563,9 +1572,8 @@ def IRENASTAT(raw=False, update=False, config=None): } technology_dict = { - "On-grid Solar photovoltaic": "PV", - "Off-grid Solar photovoltaic": "PV", - "Concentrated solar power": "CSP", + "Solar photovoltaic": "PV", + "Solar thermal energy": "CSP", "Onshore wind energy": "Onshore", "Offshore wind energy": "Offshore", "Pumped storage": "Pumped Storage", diff --git a/powerplantmatching/package_data/config.yaml b/powerplantmatching/package_data/config.yaml index 513248b0..6d62ba8a 100644 --- a/powerplantmatching/package_data/config.yaml +++ b/powerplantmatching/package_data/config.yaml @@ -60,8 +60,8 @@ BEYONDCOAL: IRENA: net_capacity: true aggregated_units: true - fn: IRENASTAT_capacities_2000-2020.csv - url: https://zenodo.org/record/6412255/files/IRENASTAT_capacities_2000-2020.csv + fn: IRENASTAT_capacities_2000-2023.csv + url: https://zenodo.org/records/10952917/files/IRENASTAT_capacities_2000-2023.csv CARMA: net_capacity: false reliability_score: 1