btd-python 0.1.2__py3-none-any.whl → 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- btd_client/source.py +294 -14
- {btd_python-0.1.2.dist-info → btd_python-0.2.0.dist-info}/METADATA +6 -4
- btd_python-0.2.0.dist-info/RECORD +6 -0
- {btd_python-0.1.2.dist-info → btd_python-0.2.0.dist-info}/WHEEL +1 -1
- btd_python-0.1.2.dist-info/RECORD +0 -6
- {btd_python-0.1.2.dist-info → btd_python-0.2.0.dist-info}/top_level.txt +0 -0
btd_client/source.py
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import io
|
|
2
2
|
import json
|
|
3
|
-
import
|
|
3
|
+
import zipfile
|
|
4
4
|
from datetime import datetime
|
|
5
|
+
from typing import Dict, List, Optional
|
|
6
|
+
|
|
7
|
+
import pandas as pd
|
|
8
|
+
import requests
|
|
5
9
|
|
|
6
10
|
class BalticTransparencyClient:
|
|
7
11
|
"""
|
|
@@ -25,10 +29,10 @@ class BalticTransparencyClient:
|
|
|
25
29
|
self.start_date = start_date + 'T00:00'
|
|
26
30
|
self.end_date = end_date + 'T00:00'
|
|
27
31
|
|
|
28
|
-
|
|
29
|
-
"""Send API request with GET method."""
|
|
30
|
-
api_url = 'https://api-baltic.transparency-dashboard.eu/api/v1/export'
|
|
32
|
+
API_BASE_URL = 'https://api-baltic.transparency-dashboard.eu/api/v1'
|
|
31
33
|
|
|
34
|
+
def _request(self, endpoint: str, api_id: str) -> requests.Response:
|
|
35
|
+
"""Send API request with GET method."""
|
|
32
36
|
params = {
|
|
33
37
|
"id": api_id,
|
|
34
38
|
"start_date": self.start_date,
|
|
@@ -37,12 +41,36 @@ class BalticTransparencyClient:
|
|
|
37
41
|
"output_format": 'json'
|
|
38
42
|
}
|
|
39
43
|
|
|
40
|
-
response = requests.get(
|
|
44
|
+
response = requests.get(f"{self.API_BASE_URL}/{endpoint}", params=params)
|
|
41
45
|
if response.status_code == 200:
|
|
42
|
-
return response
|
|
46
|
+
return response
|
|
43
47
|
else:
|
|
44
48
|
raise TimeoutError(f"Could not retrieve data. API status code {response.status_code}")
|
|
45
49
|
|
|
50
|
+
def _get_data(self, api_id: str) -> str:
|
|
51
|
+
"""Retrieve a single report via the /export endpoint."""
|
|
52
|
+
return self._request('export', api_id).text
|
|
53
|
+
|
|
54
|
+
def _get_multiple_data(self, api_ids: List[str]) -> Dict[str, dict]:
|
|
55
|
+
"""Retrieve several reports via the /export-multiple endpoint (returned as a zip of JSON files)."""
|
|
56
|
+
response = self._request('export-multiple', ','.join(api_ids))
|
|
57
|
+
reports = {}
|
|
58
|
+
with zipfile.ZipFile(io.BytesIO(response.content)) as archive:
|
|
59
|
+
for name in archive.namelist():
|
|
60
|
+
report = json.loads(archive.read(name))
|
|
61
|
+
reports[report['id']] = report
|
|
62
|
+
return reports
|
|
63
|
+
|
|
64
|
+
@staticmethod
|
|
65
|
+
def _infer_levels(columns_info: list) -> int:
|
|
66
|
+
"""Pick the smallest number of group levels that yields unique column names."""
|
|
67
|
+
if any(col.get('group_level_1') for col in columns_info):
|
|
68
|
+
return 3
|
|
69
|
+
groups = [col['group_level_0'] for col in columns_info]
|
|
70
|
+
if all(col.get('label') is None for col in columns_info) or len(set(groups)) == len(groups):
|
|
71
|
+
return 1
|
|
72
|
+
return 2
|
|
73
|
+
|
|
46
74
|
def _unravel_response(self, response: str, levels: int = 1) -> pd.DataFrame:
|
|
47
75
|
"""
|
|
48
76
|
Parse and convert the JSON response to a pandas DataFrame.
|
|
@@ -60,9 +88,12 @@ class BalticTransparencyClient:
|
|
|
60
88
|
Formatted time-indexed DataFrame.
|
|
61
89
|
"""
|
|
62
90
|
response_json = json.loads(response)
|
|
91
|
+
return self._data_to_df(response_json['data'], levels)
|
|
63
92
|
|
|
93
|
+
def _data_to_df(self, data: dict, levels: int = 1) -> pd.DataFrame:
|
|
94
|
+
"""Convert the 'data' object of a report to a time-indexed DataFrame."""
|
|
64
95
|
# Generate column names based on level depth
|
|
65
|
-
columns_info =
|
|
96
|
+
columns_info = data['columns']
|
|
66
97
|
if levels == 3:
|
|
67
98
|
columns_map = {
|
|
68
99
|
col['index']: f"{col['group_level_0']} {col['group_level_1']} {col['label']}" for col in columns_info
|
|
@@ -78,7 +109,7 @@ class BalticTransparencyClient:
|
|
|
78
109
|
|
|
79
110
|
# Build records
|
|
80
111
|
data_records = []
|
|
81
|
-
for entry in
|
|
112
|
+
for entry in data['timeseries']:
|
|
82
113
|
record = {'datetime': entry['from']}
|
|
83
114
|
for idx, value in enumerate(entry['values']):
|
|
84
115
|
if idx in columns_map:
|
|
@@ -86,12 +117,36 @@ class BalticTransparencyClient:
|
|
|
86
117
|
data_records.append(record)
|
|
87
118
|
|
|
88
119
|
# Create DataFrame
|
|
89
|
-
df = pd.DataFrame(data_records)
|
|
90
|
-
df['datetime'] = pd.to_datetime(df['datetime']).dt.tz_convert('Europe/Vilnius').dt.tz_localize(None)
|
|
120
|
+
df = pd.DataFrame(data_records, columns=['datetime', *dict.fromkeys(columns_map.values())])
|
|
121
|
+
df['datetime'] = pd.to_datetime(df['datetime'], utc=True).dt.tz_convert('Europe/Vilnius').dt.tz_localize(None)
|
|
91
122
|
df.set_index('datetime', inplace=True)
|
|
92
123
|
|
|
93
124
|
return df
|
|
94
125
|
|
|
126
|
+
def multiple_reports_df(self, api_ids: List[str], levels: Optional[Dict[str, int]] = None) -> Dict[str, pd.DataFrame]:
|
|
127
|
+
"""
|
|
128
|
+
Get several reports in one request (/export-multiple endpoint).
|
|
129
|
+
|
|
130
|
+
Parameters
|
|
131
|
+
----------
|
|
132
|
+
api_ids : list of str
|
|
133
|
+
Report IDs, e.g. ['imbalance_prices', 'activations_afrr'].
|
|
134
|
+
levels : dict, optional
|
|
135
|
+
Mapping of report ID to number of group levels used in column names (1, 2, or 3).
|
|
136
|
+
Levels are inferred from the report columns for IDs not in the mapping.
|
|
137
|
+
|
|
138
|
+
Returns
|
|
139
|
+
-------
|
|
140
|
+
dict of str to pd.DataFrame
|
|
141
|
+
DataFrame per report ID.
|
|
142
|
+
"""
|
|
143
|
+
levels = levels or {}
|
|
144
|
+
reports = self._get_multiple_data(api_ids)
|
|
145
|
+
return {
|
|
146
|
+
api_id: self._data_to_df(data, levels.get(api_id, self._infer_levels(data['columns'])))
|
|
147
|
+
for api_id, data in reports.items()
|
|
148
|
+
}
|
|
149
|
+
|
|
95
150
|
def procured_balancing_reserve_prices_df(self) -> pd.DataFrame:
|
|
96
151
|
"""Get df of TSO procured balancing reserve prices (EUR/MW)."""
|
|
97
152
|
response = self._get_data(api_id='price_procured_reserves')
|
|
@@ -160,7 +215,7 @@ class BalticTransparencyClient:
|
|
|
160
215
|
def imbalance_prices_df(self) -> pd.DataFrame:
|
|
161
216
|
"""Get df of imabalnce prices calculated by each Baltics TSO."""
|
|
162
217
|
response = self._get_data(api_id='imbalance_prices')
|
|
163
|
-
return self._unravel_response(response, levels=
|
|
218
|
+
return self._unravel_response(response, levels=1)
|
|
164
219
|
|
|
165
220
|
def neutrality_component_df(self) -> pd.DataFrame:
|
|
166
221
|
"""Get df the neutrality components."""
|
|
@@ -168,8 +223,13 @@ class BalticTransparencyClient:
|
|
|
168
223
|
return self._unravel_response(response, levels=1)
|
|
169
224
|
|
|
170
225
|
def local_marginal_prices_df(self) -> pd.DataFrame:
|
|
171
|
-
"""Get df of local marginal prices.
|
|
172
|
-
|
|
226
|
+
"""Get df of local marginal mFRR prices (EUR/MWh). Kept for backwards compatibility,
|
|
227
|
+
the 'local_marginal_price' report was replaced by 'local_marginal_price_mfrr'."""
|
|
228
|
+
return self.local_marginal_mfrr_prices_df()
|
|
229
|
+
|
|
230
|
+
def local_marginal_mfrr_prices_df(self) -> pd.DataFrame:
|
|
231
|
+
"""Get df of local marginal mFRR prices (EUR/MWh)."""
|
|
232
|
+
response = self._get_data(api_id='local_marginal_price_mfrr')
|
|
173
233
|
return self._unravel_response(response, levels=2)
|
|
174
234
|
|
|
175
235
|
def local_marginal_afrr_prices_df(self) -> pd.DataFrame:
|
|
@@ -192,6 +252,226 @@ class BalticTransparencyClient:
|
|
|
192
252
|
response = self._get_data(api_id='normal_activations_total')
|
|
193
253
|
return self._unravel_response(response, levels=2)
|
|
194
254
|
|
|
255
|
+
def afrr_bid_volumes_df(self) -> pd.DataFrame:
|
|
256
|
+
"""Get df of offered afrr bid volumes (MW)."""
|
|
257
|
+
response = self._get_data(api_id='volumes_afrr')
|
|
258
|
+
return self._unravel_response(response, levels=2)
|
|
259
|
+
|
|
260
|
+
def unavailable_afrr_bid_volumes_df(self) -> pd.DataFrame:
|
|
261
|
+
"""Get df of unavailable afrr bid volumes (MW)."""
|
|
262
|
+
response = self._get_data(api_id='unavailable_afrr_bid_volumes')
|
|
263
|
+
return self._unravel_response(response, levels=2)
|
|
264
|
+
|
|
265
|
+
def afrr_satisfied_demand_prices_df(self) -> pd.DataFrame:
|
|
266
|
+
"""Get df of afrr satisfied demand prices (EUR/MWh)."""
|
|
267
|
+
response = self._get_data(api_id='afrr_satisfied_demand_price')
|
|
268
|
+
return self._unravel_response(response, levels=2)
|
|
269
|
+
|
|
270
|
+
def satisfied_demand_afrr_df(self) -> pd.DataFrame:
|
|
271
|
+
"""Get df of total satisfied demand for balancing purposes from afrr (MWh)."""
|
|
272
|
+
response = self._get_data(api_id='satisfied_demand_afrr')
|
|
273
|
+
return self._unravel_response(response, levels=2)
|
|
274
|
+
|
|
275
|
+
def netted_exchanged_afrr_volumes_df(self) -> pd.DataFrame:
|
|
276
|
+
"""Get df of netted and exchanged afrr volumes (MWh)."""
|
|
277
|
+
response = self._get_data(api_id='netted_exchanged_volumes_afrr')
|
|
278
|
+
return self._unravel_response(response, levels=1)
|
|
279
|
+
|
|
280
|
+
def mfrr_bid_prices_df(self) -> pd.DataFrame:
|
|
281
|
+
"""Get df of offered min/max mfrr prices (EUR/MWh)."""
|
|
282
|
+
response = self._get_data(api_id='mfrr_bid_prices')
|
|
283
|
+
return self._unravel_response(response, levels=3)
|
|
284
|
+
|
|
285
|
+
def mfrr_bid_volumes_df(self) -> pd.DataFrame:
|
|
286
|
+
"""Get df of offered mfrr volumes (MW), 1 hour resolution."""
|
|
287
|
+
response = self._get_data(api_id='mfrr_bid_volumes')
|
|
288
|
+
return self._unravel_response(response, levels=2)
|
|
289
|
+
|
|
290
|
+
def er_mfrr_bid_prices_df(self) -> pd.DataFrame:
|
|
291
|
+
"""Get df of offered min/max ER mfrr prices (EUR/MWh)."""
|
|
292
|
+
response = self._get_data(api_id='er_mfrr_bid_prices')
|
|
293
|
+
return self._unravel_response(response, levels=3)
|
|
294
|
+
|
|
295
|
+
def er_mfrr_bid_volumes_df(self) -> pd.DataFrame:
|
|
296
|
+
"""Get df of offered ER mfrr volumes (MW)."""
|
|
297
|
+
response = self._get_data(api_id='er_mfrr_bid_volumes')
|
|
298
|
+
return self._unravel_response(response, levels=2)
|
|
299
|
+
|
|
300
|
+
def local_mfrr_er_bid_volumes_df(self) -> pd.DataFrame:
|
|
301
|
+
"""Get df of offered local mfrr (ER) volumes (MW)."""
|
|
302
|
+
response = self._get_data(api_id='local_mfrr_er_bid_volumes')
|
|
303
|
+
return self._unravel_response(response, levels=2)
|
|
304
|
+
|
|
305
|
+
def unavailable_mfrr_bid_volumes_df(self) -> pd.DataFrame:
|
|
306
|
+
"""Get df of unavailable mfrr bid volumes (MW)."""
|
|
307
|
+
response = self._get_data(api_id='unavailable_mfrr_bid_volumes_v2')
|
|
308
|
+
return self._unravel_response(response, levels=2)
|
|
309
|
+
|
|
310
|
+
def unavailable_mfrr_bid_volumes_legacy_df(self) -> pd.DataFrame:
|
|
311
|
+
"""Get df of unavailable mfrr bid volumes (MW), legacy report."""
|
|
312
|
+
response = self._get_data(api_id='unavailable_mfrr_bid_volumes')
|
|
313
|
+
return self._unravel_response(response, levels=2)
|
|
314
|
+
|
|
315
|
+
def mfrr_satisfied_demand_prices_df(self) -> pd.DataFrame:
|
|
316
|
+
"""Get df of mfrr satisfied demand prices (EUR/MWh)."""
|
|
317
|
+
response = self._get_data(api_id='mfrr_satisfied_demand_price')
|
|
318
|
+
return self._unravel_response(response, levels=2)
|
|
319
|
+
|
|
320
|
+
def netted_exchanged_mfrr_volumes_df(self) -> pd.DataFrame:
|
|
321
|
+
"""Get df of netted and exchanged mfrr volumes (MWh)."""
|
|
322
|
+
response = self._get_data(api_id='netted_exchanged_volumes')
|
|
323
|
+
return self._unravel_response(response, levels=1)
|
|
324
|
+
|
|
325
|
+
def normal_activations_er_volumes_df(self) -> pd.DataFrame:
|
|
326
|
+
"""Get df of ER mFRR normal activation volumes (MWh)."""
|
|
327
|
+
response = self._get_data(api_id='normal_activations_er_mfrr')
|
|
328
|
+
return self._unravel_response(response, levels=2)
|
|
329
|
+
|
|
330
|
+
def normal_activations_local_volumes_df(self) -> pd.DataFrame:
|
|
331
|
+
"""Get df of local mFRR normal activation volumes (MWh)."""
|
|
332
|
+
response = self._get_data(api_id='normal_activations_local_mfrr')
|
|
333
|
+
return self._unravel_response(response, levels=2)
|
|
334
|
+
|
|
335
|
+
def normal_activations_mfrr_volumes_df(self) -> pd.DataFrame:
|
|
336
|
+
"""Get df of mFRR normal activation volumes (MWh)."""
|
|
337
|
+
response = self._get_data(api_id='normal_activations_mfrr')
|
|
338
|
+
return self._unravel_response(response, levels=2)
|
|
339
|
+
|
|
340
|
+
def special_activations_total_volumes_df(self) -> pd.DataFrame:
|
|
341
|
+
"""Get df of total special activation volumes (MWh)."""
|
|
342
|
+
response = self._get_data(api_id='special_activations_total')
|
|
343
|
+
return self._unravel_response(response, levels=2)
|
|
344
|
+
|
|
345
|
+
def special_activations_mfrr_volumes_df(self) -> pd.DataFrame:
|
|
346
|
+
"""Get df of total mFRR special activation volumes (MWh)."""
|
|
347
|
+
response = self._get_data(api_id='special_activations_total_mfrr')
|
|
348
|
+
return self._unravel_response(response, levels=2)
|
|
349
|
+
|
|
350
|
+
def system_services_volumes_df(self) -> pd.DataFrame:
|
|
351
|
+
"""Get df of balancing energy volumes activated for system services (MWh)."""
|
|
352
|
+
response = self._get_data(api_id='system_services')
|
|
353
|
+
return self._unravel_response(response, levels=2)
|
|
354
|
+
|
|
355
|
+
def countertrade_volumes_df(self) -> pd.DataFrame:
|
|
356
|
+
"""Get df of balancing energy volumes activated for countertrade (MWh)."""
|
|
357
|
+
response = self._get_data(api_id='countertrade')
|
|
358
|
+
return self._unravel_response(response, levels=2)
|
|
359
|
+
|
|
360
|
+
def baltic_tso_tso_exchange_df(self) -> pd.DataFrame:
|
|
361
|
+
"""Get df of Baltic TSO-TSO exchanged volumes (MWh)."""
|
|
362
|
+
response = self._get_data(api_id='baltic_tso_tso_exchange')
|
|
363
|
+
return self._unravel_response(response, levels=1)
|
|
364
|
+
|
|
365
|
+
def total_satisfied_demand_from_nonbaltic_tsos_df(self) -> pd.DataFrame:
|
|
366
|
+
"""Get df of total satisfied demand from non-Baltic TSOs (MWh)."""
|
|
367
|
+
response = self._get_data(api_id='total_satisfied_demand_from_nonbaltic_tsos')
|
|
368
|
+
return self._unravel_response(response, levels=2)
|
|
369
|
+
|
|
370
|
+
def procured_balancing_reserve_prices_legacy_df(self) -> pd.DataFrame:
|
|
371
|
+
"""Get df of TSO procured balancing reserve prices (EUR/MW/h), 1 hour resolution legacy report."""
|
|
372
|
+
response = self._get_data(api_id='price_procured_reserves_legacy')
|
|
373
|
+
return self._unravel_response(response, levels=3)
|
|
374
|
+
|
|
375
|
+
def procured_balancing_reserve_volumes_legacy_df(self) -> pd.DataFrame:
|
|
376
|
+
"""Get df of TSO procured balancing reserve volumes (MW), 1 hour resolution legacy report."""
|
|
377
|
+
response = self._get_data(api_id='procured_reserves_legacy')
|
|
378
|
+
return self._unravel_response(response, levels=3)
|
|
379
|
+
|
|
380
|
+
def balancing_reserves_demand_df(self) -> pd.DataFrame:
|
|
381
|
+
"""Get df of demand for balancing reserves (MW)."""
|
|
382
|
+
response = self._get_data(api_id='reserves_demand')
|
|
383
|
+
return self._unravel_response(response, levels=3)
|
|
384
|
+
|
|
385
|
+
def balancing_reserves_demand_legacy_df(self) -> pd.DataFrame:
|
|
386
|
+
"""Get df of demand for balancing reserves (MW), 1 hour resolution legacy report."""
|
|
387
|
+
response = self._get_data(api_id='reserves_demand_legacy')
|
|
388
|
+
return self._unravel_response(response, levels=3)
|
|
389
|
+
|
|
390
|
+
def increased_demands_df(self) -> pd.DataFrame:
|
|
391
|
+
"""Get df of increased demands for balancing reserves (MW)."""
|
|
392
|
+
response = self._get_data(api_id='increased_demands')
|
|
393
|
+
return self._unravel_response(response, levels=3)
|
|
394
|
+
|
|
395
|
+
def fcr_reserve_bid_prices_df(self) -> pd.DataFrame:
|
|
396
|
+
"""Get df of offered min/max FCR reserve bid prices (EUR/MWh)."""
|
|
397
|
+
response = self._get_data(api_id='fcr_reserve_bid_price')
|
|
398
|
+
return self._unravel_response(response, levels=3)
|
|
399
|
+
|
|
400
|
+
def afrr_reserve_bid_prices_df(self) -> pd.DataFrame:
|
|
401
|
+
"""Get df of offered min/max aFRR reserve bid prices (EUR/MWh)."""
|
|
402
|
+
response = self._get_data(api_id='price_afrr_reserve_bids')
|
|
403
|
+
return self._unravel_response(response, levels=3)
|
|
404
|
+
|
|
405
|
+
def mfrr_reserve_bid_prices_df(self) -> pd.DataFrame:
|
|
406
|
+
"""Get df of offered min/max mFRR reserve bid prices (EUR/MWh)."""
|
|
407
|
+
response = self._get_data(api_id='price_mfrr_reserve_bids')
|
|
408
|
+
return self._unravel_response(response, levels=3)
|
|
409
|
+
|
|
410
|
+
def reserve_bid_volumes_df(self) -> pd.DataFrame:
|
|
411
|
+
"""Get df of offered reserve bid volumes (MW)."""
|
|
412
|
+
response = self._get_data(api_id='volume_of_reserve_bids')
|
|
413
|
+
return self._unravel_response(response, levels=3)
|
|
414
|
+
|
|
415
|
+
def back_up_reserve_bid_volumes_df(self) -> pd.DataFrame:
|
|
416
|
+
"""Get df of offered back-up reserve bid volumes (MW)."""
|
|
417
|
+
response = self._get_data(api_id='volume_of_back_up_reserve_bids')
|
|
418
|
+
return self._unravel_response(response, levels=3)
|
|
419
|
+
|
|
420
|
+
def demand_reduction_reserve_bid_volumes_df(self) -> pd.DataFrame:
|
|
421
|
+
"""Get df of offered demand reduction reserve bid volumes (MW)."""
|
|
422
|
+
response = self._get_data(api_id='volume_of_demand_reduction_reserve_bids')
|
|
423
|
+
return self._unravel_response(response, levels=3)
|
|
424
|
+
|
|
425
|
+
def allocated_cb_capacity_df(self) -> pd.DataFrame:
|
|
426
|
+
"""Get df of allocated cross-border capacity for balancing reserves (MW)."""
|
|
427
|
+
response = self._get_data(api_id='allocated_cb_capacity')
|
|
428
|
+
return self._unravel_response(response, levels=2)
|
|
429
|
+
|
|
430
|
+
def allocated_cb_capacity_legacy_df(self) -> pd.DataFrame:
|
|
431
|
+
"""Get df of allocated cross-border capacity for balancing reserves (MW), 1 hour resolution legacy report."""
|
|
432
|
+
response = self._get_data(api_id='allocated_cb_capacity_legacy')
|
|
433
|
+
return self._unravel_response(response, levels=2)
|
|
434
|
+
|
|
435
|
+
def allocated_capacity_limits_df(self) -> pd.DataFrame:
|
|
436
|
+
"""Get df of allocated capacity limits (%)."""
|
|
437
|
+
response = self._get_data(api_id='allocated_capacity_limit')
|
|
438
|
+
return self._unravel_response(response, levels=2)
|
|
439
|
+
|
|
440
|
+
def cross_border_capacity_limits_df(self) -> pd.DataFrame:
|
|
441
|
+
"""Get df of cross-border capacity limits (MW)."""
|
|
442
|
+
response = self._get_data(api_id='cross_border_capacity_limits_v2')
|
|
443
|
+
return self._unravel_response(response, levels=2)
|
|
444
|
+
|
|
445
|
+
def cross_zonal_capacities_df(self) -> pd.DataFrame:
|
|
446
|
+
"""Get df of cross-zonal capacities within the balancing timeframe (MW)."""
|
|
447
|
+
response = self._get_data(api_id='cross_zonal_capacities')
|
|
448
|
+
return self._unravel_response(response, levels=2)
|
|
449
|
+
|
|
450
|
+
def applied_mark_up_df(self) -> pd.DataFrame:
|
|
451
|
+
"""Get df of applied mark-ups (EUR/MWh)."""
|
|
452
|
+
response = self._get_data(api_id='applied_mark_up')
|
|
453
|
+
return self._unravel_response(response, levels=1)
|
|
454
|
+
|
|
455
|
+
def imbalance_volumes_legacy_df(self) -> pd.DataFrame:
|
|
456
|
+
"""Get df of imbalance volumes (MWh), legacy report incl. Baltics total."""
|
|
457
|
+
response = self._get_data(api_id='imbalance_volumes')
|
|
458
|
+
return self._unravel_response(response, levels=1)
|
|
459
|
+
|
|
460
|
+
def current_balancing_state_legacy_df(self) -> pd.DataFrame:
|
|
461
|
+
"""Get df of imbalance volumes (MW) with 1 minute resolution, legacy report incl. Baltics total."""
|
|
462
|
+
response = self._get_data(api_id='current_balancing_state')
|
|
463
|
+
return self._unravel_response(response, levels=1)
|
|
464
|
+
|
|
465
|
+
def direction_of_system_balancing_legacy_df(self) -> pd.DataFrame:
|
|
466
|
+
"""Get df of the Baltics direction of system balancing (-1/+1), legacy report."""
|
|
467
|
+
response = self._get_data(api_id='direction_of_balancing')
|
|
468
|
+
return self._unravel_response(response, levels=1)
|
|
469
|
+
|
|
470
|
+
def neutrality_component_legacy_df(self) -> pd.DataFrame:
|
|
471
|
+
"""Get df of the Baltics neutrality component (EUR/MWh), legacy report."""
|
|
472
|
+
response = self._get_data(api_id='neutrality')
|
|
473
|
+
return self._unravel_response(response, levels=1)
|
|
474
|
+
|
|
195
475
|
def total_satisfied_demand_for_balancing_purposes_df(self) -> pd.DataFrame:
|
|
196
476
|
"""Get df total satisfied demands for balancing purposes (MWh)."""
|
|
197
477
|
response = self._get_data(api_id='total_satisfied_demand_for_balancing_purposes')
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: btd-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A python client for Baltic Transparency Data
|
|
5
|
-
Author
|
|
5
|
+
Author: Sarunas Jurgilas
|
|
6
6
|
License: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/sarunasign/btd-python
|
|
8
8
|
Project-URL: Repository, https://github.com/sarunasign/btd-python
|
|
9
9
|
Requires-Python: >=3.7
|
|
10
|
-
|
|
10
|
+
Requires-Dist: requests
|
|
11
|
+
Requires-Dist: pandas
|
|
12
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
btd_client/__init__.py,sha256=BCuk_dQV9WGPzJ_Uj8B0G1bRLb8FFaW5A0nNQpwvepk,45
|
|
2
|
+
btd_client/source.py,sha256=6yjYMbq7UXS-S9FLretsiKgfZTygZobOV0MhhTbCJiw,24120
|
|
3
|
+
btd_python-0.2.0.dist-info/METADATA,sha256=h49AOSqbEI-D9tZPmz01Gek0IYevnOrZtszarl0mntg,358
|
|
4
|
+
btd_python-0.2.0.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
|
5
|
+
btd_python-0.2.0.dist-info/top_level.txt,sha256=qKWvKwOewTDImdWKs3C9gIBptkGylL2yyzsptxJH0IQ,11
|
|
6
|
+
btd_python-0.2.0.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
btd_client/__init__.py,sha256=BCuk_dQV9WGPzJ_Uj8B0G1bRLb8FFaW5A0nNQpwvepk,45
|
|
2
|
-
btd_client/source.py,sha256=4PjYjkahEQTSbo6PFuADHk4JxiMegBAh93PUsEI73zQ,9407
|
|
3
|
-
btd_python-0.1.2.dist-info/METADATA,sha256=o7FuLvCHPb6gnOsLCROMS6bdX8R60PM5nsaaKZG-1Dg,383
|
|
4
|
-
btd_python-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
5
|
-
btd_python-0.1.2.dist-info/top_level.txt,sha256=qKWvKwOewTDImdWKs3C9gIBptkGylL2yyzsptxJH0IQ,11
|
|
6
|
-
btd_python-0.1.2.dist-info/RECORD,,
|
|
File without changes
|