QuickstartΒΆ
Here, we compute monthly median composites of Sentinel-2 imagery, and retrieve them as a NumPy array:
>>> import descarteslabs as dl
>>> import descarteslabs.workflows as wf
>>>
>>> s2 = wf.ImageCollection.from_id("sentinel-2:L1C", start_datetime="2020-04-01", end_datetime="2020-07-01")
>>> monthly = s2.groupby(dates="month").median(axis="images")
>>> monthly_rgb = monthly.pick_bands("red green blue")
>>>
>>> santa_fe_ctx = dl.scenes.DLTile.from_latlon(35.67, -105.93, resolution=100, tilesize=512, pad=0)
>>> result = monthly_rgb.inspect(santa_fe_ctx)
>>> result
ImageCollectionResult of length 3:
* ndarray: MaskedArray<shape=(3, 3, 512, 512), dtype=float64>
* properties: 3 items
* bandinfo: 'red', 'green', 'blue'
* geocontext: 'geometry', 'key', 'resolution', 'tilesize', ...
>>> dl.scenes.display(*result.ndarray, title=[f"Month: {p['group']}" for p in result.properties], ncols=2)

For more examples, check out the example_notebooks
folder on Workbench (read more here).