Passed
Pull Request — dev (#1226)
by
unknown
01:59
created

cost_data   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 54
dl 0
loc 72
rs 10
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A energy_prices() 0 24 1
A investment_costs() 0 41 1
1
import pandas as pd
2
3
4
def energy_prices() -> pd.DataFrame:
5
6
    print("Data is taken from at doi: https://doi.org/10.52202/077185-0033")
7
8
    years = [2025, 2030, 2035, 2040, 2045]
9
    return pd.DataFrame(
10
        {
11
            "gas_prices [Eur/Wh]": [
12
                0.116 / 1000,
13
                0.106 / 1000,
14
                0.133 / 1000,
15
                0.116 / 1000,
16
                0.118 / 1000,
17
            ],
18
            "electricity_prices [Eur/Wh]": [
19
                0.386 / 1000,
20
                0.303 / 1000,
21
                0.290 / 1000,
22
                0.294 / 1000,
23
                0.286 / 1000,
24
            ],
25
            "pv_feed_in [Eur/Wh]": [-0.081 / 1000] * 5,
26
        },
27
        index=pd.Index(years, name="year"),
28
    )
29
30
31
def investment_costs() -> pd.DataFrame:
32
    print("Data is taken from doi: https://doi.org/10.52202/077185-0033")
33
34
    years = [2025, 2030, 2035, 2040, 2045]
35
    idx = pd.Index(years, name="year")
36
37
    df = pd.DataFrame(
38
        {
39
            ("gas boiler", "specific_costs [Eur/W]"): [61 / 1000] * 5,
40
            ("gas boiler", "fixed_costs [Eur]"): [4794] * 5,
41
            ("heat pump", "specific_costs [Eur/W]"): [
42
                1680 / 1000,
43
                1318 / 1000,
44
                1182 / 1000,
45
                1101 / 1000,
46
                1048 / 1000,
47
            ],
48
            ("heat pump", "fixed_costs [Eur]"): [3860, 3030, 2716, 2530, 2410],
49
            ("heat storage", "specific_costs [Eur/m3]"): [1120] * 5,
50
            ("heat storage", "fixed_costs [Eur]"): [806] * 5,
51
            ("pv", "specific_costs [Eur/W]"): [
52
                1200 / 1000,
53
                1017 / 1000,
54
                927 / 1000,
55
                864 / 1000,
56
                828 / 1000,
57
            ],
58
            ("pv", "fixed_costs [Eur]"): [3038, 2575, 2347, 2188, 2096],
59
            ("battery", "specific_costs [Eur/Wh]"): [
60
                850 / 1000,
61
                544 / 1000,
62
                453 / 1000,
63
                420 / 1000,
64
                409 / 1000,
65
            ],
66
            ("battery", "fixed_costs [Eur]"): [0] * 5,
67
        },
68
        index=idx,
69
    )
70
71
    return df
72