Loading Data
How to load data
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
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 twoTimeScalars
or aTimeInterval
object. In case of a tuple the interval is interpreted as an half-open interval[start, end)
. In case of aTimeInterval
object, thestart_exclusive
andend_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 thestart
andend
time are inclusive. This is useful for using the output of a previousload
as input for a following one.
If True
, the response only contain the datapoint metadata without the actual dataset
specific fields. Defaults to False
.
If True
, a progress bar is displayed when pagination is required to complete the request. Defaults to False
.
Was this page helpful?