vortexasdk.endpoints.onshore_inventories_timeseries

Try me out in your browser:

Binder

OnshoreInventoriesTimeseries

OnshoreInventoriesTimeseries(self)

Please note: you will require a subscription to our Crude Onshore Inventories module to access this endpoint.

search

OnshoreInventoriesTimeseries.search(
  corporate_entity_ids:
    typing.Union[str, typing.List[str], NoneType] = None,
  crude_confidence: typing.Optional[typing.List[str]] = None,
  location_ids: typing.Union[str, typing.List[str], NoneType] = None,
  storage_types: typing.Optional[typing.List[str]] = None,
  asset_tank_ids: typing.Union[str, typing.List[str], NoneType] = None,
  time_max: typing.Optional[datetime.datetime] = None,
  time_min: typing.Optional[datetime.datetime] = None,
  timeseries_frequency: typing.Optional[str] = None,
  timeseries_split_property: typing.Optional[str] = None,
  timeseries_unit: typing.Optional[str] = None,
  timeseries_unit_operator: typing.Optional[str] = None,
  exclude_corporate_entity_ids: typing.Optional[typing.List[str]] = None,
  exclude_crude_confidence: typing.Optional[typing.List[str]] = None,
  exclude_location_ids:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_storage_types: typing.Optional[typing.List[str]] = None)

Sum of crude onshore inventories storage and total capacity updated weekly. For frequencies other than 'week', the values returned are calculated by returning the final weekly onshore inventories 'quantity' bucket for the specified period.

Arguments

corporate_entity_ids: An array of owner ID(s) to filter on.
crude_confidence: An array of confidence metrics to filter on. Possible values are: `'confirmed’`, `‘probable’`, `‘unlikely’`
location_ids: An array of geography ID(s) to filter on.
storage_types: An array of storage types to filter on. Possible values are: `'refinery'`, `'commercial'`, `'spr'`
asset_tank_ids: An array of unique Asset Tanks ID(s) to filter on - linked to the Asset Tank Reference data.
time_min: The UTC start date of the time filter.
time_max: The UTC end date of the time filter.
timeseries_frequency: Frequency denoting the granularity of the time series. Must be one of the following: `'day'`, `'week'`, `'doe_week'`, `'month'`, `'year'`.
timeseries_split_property: Property used to breakdown the aggregation. By default 'quantity' is used which returns only the total, but aggregations can be broken down
by either `'crude_confidence'`, `'storage_type'`, `'location_country'`, `'location_port'`, `'location_region'`, `'location_shipping_region'`, `'location_trading_region'`,
`'location_trading_subregion'`

timeseries_unit: A numeric metric to be calculated for each time bucket. Must be either `'b'`, `'t'`, `'cbm'` corresponding to barrels, metric tonnes, cubic meters.
timeseries_unit_operator: Argument must be either 'fill' (total in storage) or 'capacity' (total capacity).

exclude_corporate_entity_ids: An array of owner ID(s) to exclude from the results,
exclude_crude_confidence: An array of confidence metrics to exclude from the results
exclude_location_ids: An array of geography ID(s) to exclude from the results
exclude_storage_types: An array of storage types to exclude from the results

Returns

BreakdownResult

Example

Total storage capacity across Europe for the first week of January 2021.

>>> from vortexasdk import OnshoreInventoriesTimeseries
>>> from datetime import datetime
>>> search_result = OnshoreInventoriesTimeseries().search(
...    location_ids=["f39d455f5d38907394d6da3a91da4e391f9a34bd6a17e826d6042761067e88f4"],
...    time_min=datetime(2021, 1, 5),
...    time_max=datetime(2021, 1, 12),
...    timeseries_frequency="week",
...    timeseries_split_property="location_country",
...    timeseries_unit="b",
...    timeseries_unit_operator="capacity",
...    ).to_list()

Gives the following result:

[
    BreakdownItem(key='2021-09-09T14:00:00.000Z',
    count=3769,
    value=994621677,
    breakdown=[
        {
            'id': 'ee1de4914cc26e8f1326b49793b089131870d478714c07e0c99c56cb307704c5',
            'label': 'Italy',
            'value': 204482432,
            'count': 762
        },
        {
            'id': '2aaad41b89dfad19e5668918018ae02695d7710bcbe5f2dc689234e8da492de3',
            'label': 'UnitedKingdom',
            'value': 113001186,
            'count': 415
        },
        {
            'id': '284c8d9831e1ac59c0cb714468856d561af722c8a2432c13a001f909b97e6b71',
            'label': 'Germany',
            'value': 93583672,
            'count': 405
        },
        {
            'id': 'e9e556620469f46a4dc171aef71073f5286a288da35c5883cac760446b0ceb46',
            'label': 'France',
            'value': 86652291,
            'count': 327
        },
        ...
    ])
]