Skip to content

Commit d1167cb

Browse files
committed
change inflation rate source
1 parent 97c18f8 commit d1167cb

5 files changed

+9
-10
lines changed

Snakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ configfile: "config.yaml"
44

55
rule compile_cost_assumptions:
66
input:
7-
inflation_rate = "inputs/prc_hicp_aind_page_spreadsheet.xlsx",
7+
inflation_rate = "inputs/prc_hicp_aind__custom_9928419_spreadsheet.xlsx",
88
pypsa_costs = "inputs/costs_PyPSA.csv",
99
fraunhofer_costs = "inputs/Fraunhofer_ISE_costs.csv",
1010
fraunhofer_energy_prices = "inputs/Fraunhofer_ISE_energy_prices.csv",

docs/release_notes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Release Notes
55
.. Upcoming Release
66
.. ================
77
8-
* Update currency year from 2015 to 2020. Add a currency year for each data input
8+
* Update currency year from 2015 to 2020. Add a currency year for each data input. The inflation rate is taken `Eurostat HICP - annual data (average index and rate of change) <https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/dataflow/ESTAT/prc_hicp_aind/1.0?references=descendants&detail=referencepartial&format=sdmx_2.1_generic&compressed=true>`_.
99

1010
Technology-Data 0.7.0 (7 February 2024)
1111
=======================================
Binary file not shown.
-13.4 KB
Binary file not shown.

scripts/compile_cost_assumptions.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -2119,19 +2119,18 @@ def geometric_series(nominator, denominator=1, number_of_terms=1, start=1):
21192119

21202120
def prepare_inflation_rate(fn):
21212121
"""read in annual inflation rate from Eurostat
2122-
https://ec.europa.eu/eurostat/databrowser/view/teicp000/default/table?lang=en
2122+
https://ec.europa.eu/eurostat/api/dissemination/sdmx/2.1/dataflow/ESTAT/prc_hicp_aind/1.0?references=descendants&detail=referencepartial&format=sdmx_2.1_generic&compressed=true
21232123
"""
21242124
inflation_rate = pd.read_excel(fn,
2125-
sheet_name="Blatt 1", index_col=0,
2126-
header=[8]).dropna(axis=0)
2125+
sheet_name="Sheet 1", index_col=0,
2126+
header=[8])
2127+
inflation_rate = (inflation_rate.loc["European Union - 27 countries (from 2020)"]
2128+
.dropna()).loc["2001"::]
21272129
inflation_rate.rename(index=lambda x: int(x), inplace=True)
21282130
inflation_rate = inflation_rate.astype(float)
21292131

2130-
inflation_rate = inflation_rate.iloc[:,0]/100
2131-
2132-
# add inflation for 2023
2133-
inflation_rate.loc[2023] = 0.064
2134-
2132+
inflation_rate /= 100
2133+
21352134
return inflation_rate
21362135

21372136
# %% *************************************************************************

0 commit comments

Comments
 (0)