vortexasdk.endpoints.freight_pricing_timeseries
Try me out in your browser:
FreightPricingTimeseries
FreightPricingTimeseries(self)
search
FreightPricingTimeseries.search(
time_min: datetime = datetime.datetime(2021, 9, 1, 0, 0),
time_max: datetime = datetime.datetime(2021, 11, 1, 0, 0),
routes: typing.Union[str, typing.List[str], NoneType] = None,
breakdown_frequency: typing.Optional[str] = None,
breakdown_property: typing.Optional[str] = None)
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` (not available for LNG routes), `tce` (not available for LNG routes).
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`.
- BLNG routes - `BLNG1g`, `BLNG2g`, `BLNG3g`, `BLNG1-174`, `BLNG2-174`, `BLNG3-174`.
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 |