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(self) -> vortexasdk.endpoints.asset_tanks_result.AssetTankResult

Load all asset tanks.

search

AssetTanks.search(self, ids: Union[str, List[str]] = None, corporate_entity_ids: Union[str, List[str]] = None, crude_confidence: List[str] = None, location_ids: Union[str, List[str]] = None, storage_type: List[str] = None, term: Union[str, List[str]] = None) -> vortexasdk.endpoints.asset_tanks_result.AssetTankResult

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(__pydantic_self__, **data: Any) -> None

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

to_list

AssetTankResult.to_list(self) -> List[vortexasdk.api.asset_tank.AssetTank]

Represent asset tanks as a list.

to_df

AssetTankResult.to_df(self, columns=['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.