In [ ]:
import datetime as dt
from opengrid.library.belpex import get_belpex
In [ ]:
%matplotlib inline
Two methods available: get_belpex and get_belpex_day.
The first can be used to request multiple days and takes start and end (end is optional and will default to 'tomorrow', because Belpex values are known 24h in advance (the next day gets published somewhere during the day))
The second takes a date and will return a series for that day.
Let's demo get_belpex, by grabbing data starting 2 days ago.
In [ ]:
start = dt.date.today() - dt.timedelta(days=2)
In [ ]:
ts = get_belpex(start=start)
In [ ]:
ts.tail()
In [ ]:
ts.plot()
In [ ]: