To load data from a collection for a specific time or time interval, use the load method on a collection object. Automatically handles pagination if the requested time interval requires it.

If no data exists for the requested time or time interval, an empty xarray.Dataset is returned.

Time or time intervals are specified as a TimeScalar. A time scalar is any scalar value that can be interpreted by Tilebox as time. Currently this includes either strings in ISO 8601 format or python datetime objects.

Parameters

time_or_interval
TimeScalar | TimeInterval | Iterable[TimeScalar]

The time or time interval for which to load data. Can be a single time scalar, a tuple of two time scalars or an array of time scalars.

Behaviour for each input type:

  • TimeScalar: If a single time scalar is provided, load return all data points for that exact millisecond.

  • TimeInterval: if a time interval is provided, load return all data points in that interval. Can either be a tuple of two TimeScalars or a TimeInterval object. In case of a tuple the interval is interpreted as an half-open interval [start, end). In case of a TimeInterval object, the start_exclusive and end_inclusive parameters can be used to control whether the start and end time are inclusive or exclusive.

  • Iterable[TimeScalar]: if an array of time scalars is provided, load construct a time interval from the first and last time scalar in the array. In this case both the start and end time are inclusive. This is useful for using the output of a previous load as input for a following one.

skip_data
bool

If True, the response only contain the datapoint metadata without the actual dataset specific fields. Defaults to False.

show_progress
bool

If True, a progress bar is displayed when pagination is required to complete the request. Defaults to False.