You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api-reference/python/tilebox.datasets/Collection.query.mdx
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ If no data exists for the requested time or interval, an empty `xarray.Dataset`
32
32
</ParamField>
33
33
34
34
<ParamFieldpath="skip_data"type="bool">
35
-
If `True`, the response contains only the [required fields for the dataset type](/datasets/types/timeseries) without the actual dataset-specific fields. Defaults to `False`.
35
+
If `True`, the response contains only the ID and the timestamp for each datapoint. Defaults to `False`.
36
36
</ParamField>
37
37
38
38
<ParamFieldpath="show_progress"type="bool">
@@ -54,7 +54,13 @@ data = collection.query(temporal_extent=time)
54
54
55
55
# querying a time interval
56
56
interval = ("2023-05-01", "2023-08-01")
57
-
data = collection.query(temporal_extent=interval, show_progress=True)
57
+
data = collection.query(temporal_extent=interval)
58
+
59
+
# displaying a progress bar while querying
60
+
data = collection.query(
61
+
temporal_extent=interval,
62
+
show_progress=True,
63
+
)
58
64
59
65
# querying a time interval with TimeInterval
60
66
interval = TimeInterval(
@@ -63,11 +69,13 @@ interval = TimeInterval(
63
69
start_exclusive=False,
64
70
end_inclusive=False,
65
71
)
66
-
data = collection.query(temporal_extent=interval, show_progress=True)
Sometimes, it may be useful to load only dataset metadata fields without the actual data fields. This can be done by setting the `skip_data` parameter to `True`.
429
-
For example, when only checking if a datapoint exists, you may want to use `skip_data=True` to avoid loading the data fields.
430
-
If this flag is set, the response will only include the required fields for the given dataset type, but no custom data fields.
428
+
Sometimes, only the ID or timestamp associated with a datapoint is required. In this case, loading the full data fields for each datapoint is not necessary and can be avoided by
429
+
setting the `skip_data` parameter to `True`.
430
+
431
+
For example, when only checking how many datapoints exist in a given time interval, you can use `skip_data=True` to avoid loading the data fields.
431
432
432
433
<CodeGroup>
433
434
```python Python
434
-
data = collection.query(temporal_extent="2024-08-01 00:00:01.362", skip_data=True)
435
-
print(data)
435
+
interval = ("2023-01-01", "2023-02-01")
436
+
data = collection.query(temporal_extent=interval, skip_data=True)
0 commit comments