vortexasdk.endpoints.asset_tanks

Try me out in your browser:

Binder

AssetTanks

AssetTanks(self)

Asset Tanks endpoint.

An Asset Tank is a reference value that corresponds to an ID associated with other entities.

For example, an Asset Tank object may have the following keys:

{
    "name": "AAM001",
    "storage_type": "tdb"
    "crude_confidence": "confirmed"
    ...
}

IDs represent asset tanks which can be found via the Asset Tank reference endpoint.

When the asset tanks endpoint is searched with those ids as parameters:

    >>> from vortexasdk import AssetTanks
    >>> df = AssetTanks().search(ids=["6114b93026e61993797db33a46a5d2acbeacdbd63238a4271efaeafcee94b1d2"]).to_df()

Returns

id capacity_bbl crude_confidence location_id name storage_type lat lon
0 6114b93026e61993797d... 645201 confirmed b839dc5fee39ff7efd5e1cf2494... AAM001 tbd 90 180

load_all

AssetTanks.load_all()

Load all asset tanks.

search

AssetTanks.search(
  ids: typing.Union[str, typing.List[str], NoneType] = None,
  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_type: typing.Optional[typing.List[str]] = None,
  term: typing.Union[str, typing.List[str], NoneType] = None)

Find all asset tanks matching given type.

Arguments

ids: An array of unique Asset Tanks ID(s) to filter on.
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'`

Returns

List of asset tanks matching type

Examples

Find all asset tanks with a storage_type of refinery.

>>> from vortexasdk import AssetTanks
>>> df = AssetTanks().search(storage_type=["refinery"]).to_df()

Returns

id capacity_bbl crude_confidence location_id name storage_type lat lon
0 0a736a1816c0fea49a88... 104815 probable f726416f49adcac6d5d296c49a00... HOM009 refinery -60 24
1 b96adfb025a719b66927... 139279 unlikely f726416f49adcac6d5d296c49a00... HOM022 refinery 100 -90

vortexasdk.endpoints.asset_tanks_result

AssetTankResult

AssetTankResult(*, records: typing.List,
                reference: typing.Dict[str, typing.Any])

Container class that holds the result obtained from calling the Asset Tanks endpoint.

model_config

to_list

AssetTankResult.to_list()

Represent asset tanks as a list.

to_df

AssetTankResult.to_df(
    columns:
    typing.Union[typing_extensions.Literal['all'], typing.List[str], NoneType] = ['id', 'capacity_bbl', 'crude_confidence', 'location_id', 'name', 'storage_type', 'lat', 'lon']
)

Represent asset tanks as a pd.DataFrame.

Arguments

  • columns: The asset tanks features we want in the dataframe. Enter columns='all' to include all features. Defaults to columns = ['id', 'capacity_bbl', 'crude_confidence', 'location_id', 'name', 'storage_type', 'lat', 'lon'].

Returns

pd.DataFrame of asset tanks.