Quickstart
1. Install with pip
Section titled “1. Install with pip”pip install -U "volue-insight-timeseries[pandas]~=3.0"~=3.0 keeps you on version 3.x, so a future major version with breaking
changes is not installed automatically. The pandas extra is needed for
step 4. See Installation for details.
2. Create a session
Section titled “2. Create a session”Create a config file, e.g. config.ini, with your
authentication credentials:
[common]urlbase = https://data-forecasts.volue.comauth_type = OAuth
[OAuth]id = client_idsecret = client_secretauth_urlbase = https://auth.volueinsight.comThen import the library and create a session from the config file:
import volue_insight_timeseriessession = volue_insight_timeseries.Session(config_file='config.ini')We recommend a config file over passing credentials in code. See Connection for all options.
3. Fetch data from a curve
Section titled “3. Fetch data from a curve”Get a curve object by name and fetch data. There are 4 main curve types:
TIME_SERIES, TAGGED, INSTANCES, and TAGGED_INSTANCES.
Each type has its own methods for fetching time series data, and each method
returns a TS object containing the curve data.
TIME_SERIES curve
Section titled “TIME_SERIES curve”curve = session.get_curve(name='tt de con °c cet min15 s')ts = curve.get_data(data_from="2018-06-01", data_to="2018-06-08")TAGGED curve
Section titled “TAGGED curve”curve = session.get_curve(name='name of tagged curve')# Get available tags with: tags = curve.get_tags()ts = curve.get_data(tag='Avg', data_from="2018-01-01", data_to="2018-01-05")INSTANCES curve
Section titled “INSTANCES curve”curve = session.get_curve(name='tt de con ec00 °c cet min15 f')# Search available instances:# curve.search_instances(issue_date_from='2018-01-01', issue_date_to='2018-01-01')ts = curve.get_instance(issue_date='2018-01-01T00:00')TAGGED_INSTANCES curve
Section titled “TAGGED_INSTANCES curve”curve = session.get_curve(name='tt de con ec00ens °c cet min15 f')# A combination of TAGGED and INSTANCES curvests = curve.get_instance(issue_date='2018-01-01T00:00', tag='Avg')4. Convert to pandas
Section titled “4. Convert to pandas”Convert the TS object to a
pandas.Series
or pandas.DataFrame:
pd_s = ts.to_pandas() # TS → pandas.Seriespd_df = pd_s.to_frame() # pandas.Series → pandas.DataFrameWas this page helpful?Thanks for your feedback!