vortexasdk.endpoints.freight_pricing_timeseries

Try me out in your browser:

Binder

FreightPricingTimeseries

FreightPricingTimeseries(self)

search

FreightPricingTimeseries.search(self, time_min: datetime.datetime = datetime.datetime(2021, 9, 1, 0, 0), time_max: datetime.datetime = datetime.datetime(2021, 11, 1, 0, 0), routes: Union[List[str], str] = None, breakdown_frequency: str = None, breakdown_property: str = None) -> vortexasdk.endpoints.timeseries_result.TimeSeriesResult

Time series of the selected pricing information for given routes in the specified time range.

Arguments

  • time_min: The UTC start date of the time filter.

  • time_max: The UTC end date of the time filter.

  • breakdown_frequency: Must be one of: 'day', 'week', 'doe_week', 'month', 'quarter' or 'year'.

  • breakdown_property: Property used to build the value of the aggregation. Must be one of the following: route, cost, tce.

  • routes: Used to filter by specific routes. Must be one of the following:

    • Clean routes - TC1, TC2_37, TC5, TC6, TC7, TC8, TC9, TC10, TC11, TC12, TC14, TC15, TC16, TC17, TC18, TC19.
    • Dirty routes - TD1, TD2, TD3C, TD6, TD7, TD8, TD9, TD12, TD14, TD15, TD17, TD18, TD19, TD20, TD21, TD22, TD23, TD24, TD25, TD26.
    • BLPG routes - BLPG1, BLPG2, BLPG3.

Returns

TimeSeriesResult

Example

Time series for the WS rate of the TD3C route between 1st and 15th November 2021.

>>> from vortexasdk import FreightPricingTimeseries
>>> from datetime import datetime
>>> start = datetime(2021, 11, 1)
>>> end = datetime(2021, 11, 15)
>>> df = (FreightPricingTimeseries().search(
...     time_min=start,
...     time_max=end,
...     routes=['TD3C'],
...     breakdown_property='rate',
...     breakdown_frequency='day')
... .to_df()).head(2)

Gives the following:

key value count
0 2021-11-01 00:00:00+00:00 46.04999923706055 1
1 2021-11-02 00:00:00+00:00 45.13999938964844 1