-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtests.py
More file actions
76 lines (64 loc) · 3.35 KB
/
Copy pathtests.py
File metadata and controls
76 lines (64 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from entsog import EntsogPandasClient
import pandas as pd
client = EntsogPandasClient()
start = pd.Timestamp('20220918', tz='Europe/Brussels')
end = pd.Timestamp('20220920', tz='Europe/Brussels')
country_code = 'NL' # Netherlands
#client.query_connection_points()
#client.query_operators(country_code)
#client.query_balancing_zones()
print(client.query_operator_point_directions())
#client.query_interconnections()
#client.query_aggregate_interconnections()
#client.query_urgent_market_messages()
#
#client.query_tariffs(start = start, end = end, country_code = country_code, melt = True, verbose = True)
#client.query_tariffs_sim(start = start, end = end, country_code = country_code, verbose = True)
#client.query_aggregated_data(start = start, end = end, country_code = country_code)
# TODO: Add interruptions...
#client.query_interruptions(start = start, end = end)
#client.query_CMP_auction_premiums(start = start, end = end)
#client.query_CMP_unavailable_firm_capacity(start = start, end = end)
#client.query_CMP_unsuccesful_requests(start = start, end = end)
operational_options = {
'interruption_capacity' : "Actual interruption of interruptible capacity",
'allocation' : "Allocation",
'firm_available' : "Firm Available",
'firm_booked' : "Firm Booked",
'firm_interruption_planned' : "Firm Interruption Planned - Interrupted",
'firm_interruption_unplanned' :"Firm Interruption Unplanned - Interrupted",
'firm_technical' : "Firm Technical",
'gcv' : "GCV",
'interruptible_available' : "Interruptible Available",
'interruptible_booked' : "Interruptible Booked",
'interruptible_interruption_actual' : "Interruptible Interruption Actual – Interrupted",
'interruptible_interruption_planned' : "Interruptible Interruption Planned - Interrupted",
'interruptible_total' : "Interruptible Total",
'nomination' : "Nomination",
'physical_flow' : "Physical Flow",
'firm_interruption_capacity_planned' : "Planned interruption of firm capacity",
'renomination' : "Renomination",
'firm_interruption_capacity_unplanned' : "Unplanned interruption of firm capacity",
'wobbe_index' : "Wobbe Index",
'oversubscription_available' : "Available through Oversubscription",
'surrender_available' : "Available through Surrender",
'uioli_available_lt' : "Available through UIOLI long-term",
'uioli_available_st' : "Available through UIOLI short-term"
}
#client.query_operational_data(start = start, end = end, country_code = country_code, indicators = ['renomination', 'physical_flow'])
# You should use this when you want to query operational data for the entirety of continental europe.
data = client.query_operational_data_all(start = start, end = end,period_type = 'hour', indicators = ['renomination', 'physical_flow', 'nomination'])
print(data)
print(data['url'])
data.to_csv("test.csv")
# # Example for if you would like to see Fluxys points.
# points = client.query_operator_point_directions()
# mask = points['connected_operators'].str.contains('Fluxys')
# masked_points = points[mask]
# print(masked_points)
# keys = []
# for idx, item in masked_points.iterrows():
# keys.append(f"{item['operator_key']}{item['point_key']}{item['direction_key']}")
# print(keys)
# data = client.query_operational_point_data(start = start, end = end, indicators = ['physical_flow'], point_directions = keys, verbose = False)
# print(data.head())