Conditions | 1 |
Total Lines | 28 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """Create a basic scenario from the internal data structure. |
||
12 | def scenario_storages(regions, year, name): |
||
13 | """ |
||
14 | Fetch storage, pump and turbine capacity and their efficiency of |
||
15 | hydroelectric storages for each deflex region. |
||
16 | |||
17 | Parameters |
||
18 | ---------- |
||
19 | regions |
||
20 | year |
||
21 | name |
||
22 | |||
23 | Returns |
||
24 | ------- |
||
25 | |||
26 | Examples |
||
27 | -------- |
||
28 | >>> from reegis import geometries |
||
29 | >>> fs=geometries.get_federal_states_polygon() |
||
30 | >>> deflex_storages=scenario_storages(fs, 2012, "de17") |
||
31 | >>> list(deflex_storages.index.get_level_values(0)) |
||
32 | ['BW', 'BY', 'HE', 'NI', 'NW', 'SH', 'SN', 'ST', 'TH'] |
||
33 | >>> int(deflex_storages.loc[("TH", "phes"), "turbine"]) |
||
34 | 1522 |
||
35 | >>> int(deflex_storages.loc[("TH", "phes"), "energy"]) |
||
36 | 12115 |
||
37 | """ |
||
38 | stor = storages.pumped_hydroelectric_storage_by_region(regions, year, name) |
||
39 | return pd.concat([stor], keys=["phes"]).swaplevel(0, 1) |
||
40 |