<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:digitalearthafrica+DEA101+2021" data-init="VerticalStudentView" data-runtime-class="LmsRuntime" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:digitalearthafrica+DEA101+2021+type@vertical+block@f721363d110e454781f4f016ee564d19" data-request-token="9c1a535a4d0111f1b4d66b8c55c4de7e" data-graded="True" data-has-score="False">
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@27df3d8764cc4b9bae6264039f7edd7b">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:digitalearthafrica+DEA101+2021" data-init="XBlockToXModuleShim" data-runtime-class="LmsRuntime" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@27df3d8764cc4b9bae6264039f7edd7b" data-request-token="9c1a535a4d0111f1b4d66b8c55c4de7e" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>Finally, let’s use the <strong>STAC API</strong> with <span id="docs-internal-guid-0df9c768-7fff-137a-2ac6-516e73613224"><a href="https://docs.digitalearthafrica.org/en/latest/platform_tools/odc_stac.html" style="text-decoration-line: none;" target="_blank"><span style="font-size: 12pt; font-family: 'Roboto Mono', monospace; color: #1155cc; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; text-decoration-line: underline; text-decoration-skip-ink: none; vertical-align: baseline; white-space-collapse: preserve;">odc-stac</span></a></span> in Python to search and load data. We will perform a simple query and load. (You can do this in the DE Africa Sandbox or any Python environment with internet access.)</p>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@a4870dcc15154f1d8fcab22de16a3bf0">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:digitalearthafrica+DEA101+2021" data-init="XBlockToXModuleShim" data-runtime-class="LmsRuntime" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@a4870dcc15154f1d8fcab22de16a3bf0" data-request-token="9c1a535a4d0111f1b4d66b8c55c4de7e" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p><span id="docs-internal-guid-a3448a1e-7fff-938b-52dc-f288c004c32d"><span style="font-size: 12pt; font-family: Inter, sans-serif; color: #1c1c1c; background-color: transparent; font-weight: bold; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">1. Configure Python environment.</span><span style="font-size: 12pt; font-family: Inter, sans-serif; color: #1c1c1c; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> In your notebook or Python shell, install and import the necessary packages (for example, </span><span style="font-size: 12pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">pystac-client</span><span style="font-size: 12pt; font-family: Inter, sans-serif; color: #1c1c1c; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> and </span><span style="font-size: 12pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">odc-stac</span><span style="font-size: 12pt; font-family: Inter, sans-serif; color: #1c1c1c; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">). Then configure rasterio to use the Cape Town endpoint:<br />_________________________________________________<br /><br /></span></span><span style="background-color: transparent; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #1967d2; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">from</span><span style="background-color: transparent; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="background-color: transparent; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">odc.stac</span><span style="background-color: transparent; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="background-color: transparent; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #1967d2; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">import</span><span style="background-color: transparent; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="background-color: transparent; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">configure_rio,</span><span style="background-color: transparent; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="background-color: transparent; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">stac_load\</span></p>
<p><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #1967d2; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">from</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">pystac_client</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #1967d2; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">import</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">Client</span></p>
<p><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">configure_rio(</span></p>
<p style="padding-left: 30px;"><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">cloud_defaults=True,</span></p>
<p style="padding-left: 30px;"><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">aws={</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">"aws_unsigned"</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">:</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">True},</span></p>
<p style="padding-left: 30px;"><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">AWS_S3_ENDPOINT=</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">"s3.af-south-1.amazonaws.com"</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline; white-space-collapse: preserve;">)</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="background-color: transparent; color: #1c1c1c; font-family: Inter, sans-serif; font-size: 12pt; white-space-collapse: preserve;">_________________________________________________</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 12pt; margin-bottom: 12pt;"><span style="font-size: 12pt; font-family: Inter,sans-serif; color: #1c1c1c; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">This ensures Rasterio will access DE Africa S3 resources correctly.</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="background-color: transparent; color: #1c1c1c; font-family: Inter, sans-serif; font-size: 12pt; white-space-collapse: preserve;"><span id="docs-internal-guid-c9c08438-7fff-accc-a8b8-95ceec9f52ad"><span style="font-size: 12pt; background-color: transparent; font-weight: bold; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">2. Connect to the DE Africa STAC.</span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"> Use the </span><span style="font-size: 12pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">pystac_client</span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">:<br />_________________________________________________<br /><span id="docs-internal-guid-1b20271a-7fff-e508-1302-5bc92fdde731"><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">catalog</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">=</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">Client.</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #1967d2; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">open</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">(</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">"https://explorer.digitalearth.africa/stac"</span><span style="font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">)</span></span><br />_________________________________________________</span></span></span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 12pt; margin-bottom: 12pt;"><span style="font-size: 12pt; font-family: Inter,sans-serif; color: #1c1c1c; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">This opens the DE Africa STAC catalog.</span></p>
<p><span style="background-color: transparent; color: #1c1c1c; font-family: Inter, sans-serif; font-size: 12pt; white-space-collapse: preserve;"><span id="docs-internal-guid-78459432-7fff-5455-ba58-2341b0a03340"><span style="font-size: 12pt; background-color: transparent; font-weight: bold; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">3. Define and run a search query.</span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"> Set your area of interest and time range. For example, using a bounding box and year 2021:<br />_________________________________________________<br /></span></span></span></p>
<p dir="ltr" style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #b80672; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># Example bounding box (xmin, ymin, xmax, ymax) in lat/lon</span></p>
<p dir="ltr" style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">bbox</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #c5221f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">34</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #c5221f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">,</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #c5221f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">-2</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #c5221f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">,</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #c5221f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">35</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #c5221f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">,</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #c5221f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">-1</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">.</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #c5221f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">0</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">]</span></p>
<p dir="ltr" style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">start_date</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> "2021-01-01"</span></p>
<p dir="ltr" style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">end_date</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> "2021-12-31"</span></p>
<p dir="ltr" style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">collections</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"s2_l2a"</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">]</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #b80672; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"># Sentinel-2 L2A collection</span></p>
<p dir="ltr" style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">items</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">catalog.search(bbox=bbox,</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">collections=collections,</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">datetime=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">f"{start_date}/{end_date}"</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">)</span></p>
<p dir="ltr" style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">features</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #1967d2; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">list</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(items.get_items())</span><span style="background-color: transparent; white-space-collapse: preserve; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #1967d2; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">print</span><span style="background-color: transparent; white-space-collapse: preserve; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">(</span><span style="background-color: transparent; white-space-collapse: preserve; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #188038; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">f"Found {len(features)} STAC items."</span><span style="background-color: transparent; white-space-collapse: preserve; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">)</span></p>
<p><span style="background-color: transparent; color: #1c1c1c; font-family: Inter, sans-serif; font-size: 12pt; white-space-collapse: preserve;"><span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">_________________________________________________</span></span></span></p>
<p><span style="background-color: transparent; color: #1c1c1c; font-family: Inter, sans-serif; font-size: 12pt; white-space-collapse: preserve;"><span id="docs-internal-guid-3d13d46b-7fff-cb80-232f-0f233c447517"><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">You should see output like “Found X STAC items,” indicating how many scenes were found in that box and the time.<br /></span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"><br /></span><span style="font-size: 12pt; background-color: transparent; font-weight: bold; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">4. Load data with </span><span style="font-size: 12pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-weight: bold; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">odc-stac</span><span style="font-size: 12pt; background-color: transparent; font-weight: bold; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">.</span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"> Once you have STAC items (each item corresponds to a scene), you can load them into an xarray. For example, specify which bands to load and a CRS/resolution:<br />_________________________________________________<br /></span></span></span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">ds</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">stac_load(</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">features,</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">chunks={},</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">measurements=[</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"red"</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">,</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> "nir"</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">],</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">resolution=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #c5221f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">30</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">,</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">crs=</span><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #188038; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">"EPSG:6933"</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="font-size: 8pt; font-family: 'Roboto Mono',monospace; color: #37474f; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">)</span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 0pt; margin-bottom: 0pt;"><span style="background-color: transparent; white-space-collapse: preserve; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #1967d2; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">print</span><span style="background-color: transparent; white-space-collapse: preserve; font-size: 8pt; font-family: 'Roboto Mono', monospace; color: #37474f; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">(ds)</span></p>
<p><span style="background-color: transparent; color: #1c1c1c; font-family: Inter, sans-serif; font-size: 12pt; white-space-collapse: preserve;"><span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">_________________________________________________</span></span><span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"></span></span></span></p>
<p dir="ltr" style="line-height: 1.7999999999999998; margin-top: 12pt; margin-bottom: 12pt;"><span style="font-size: 12pt; font-family: Inter,sans-serif; color: #1c1c1c; background-color: transparent; font-weight: bold; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">5. </span><span style="font-size: 12pt; font-family: Inter,sans-serif; color: #1c1c1c; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">This will give you an xarray.Dataset with the selected bands (red and nir) combined across the found items. (It may download data lazily with Dask.)</span><span style="font-size: 12pt; font-family: Inter,sans-serif; color: #1c1c1c; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></p>
</div>
</div>
<div class="vert vert-2" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@8fe772e9db254e88be4034b9c6cab3ab">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-course-id="course-v1:digitalearthafrica+DEA101+2021" data-init="XBlockToXModuleShim" data-runtime-class="LmsRuntime" data-runtime-version="1" data-block-type="html" data-usage-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@8fe772e9db254e88be4034b9c6cab3ab" data-request-token="9c1a535a4d0111f1b4d66b8c55c4de7e" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p><span style="background-color: transparent; color: #1c1c1c; font-family: Inter, sans-serif; font-size: 12pt; white-space-collapse: preserve;"><span id="docs-internal-guid-e22212b1-7fff-77ff-dd79-24a0d246617f"><span style="font-size: 12pt; background-color: transparent; font-weight: bold; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">Conclusion:</span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"> In this ODC–STAC hands-on, we queried the DE Africa STAC API and loaded data via Python. We connected to the STAC catalog, performed a spatial–temporal search, and used </span><span style="font-size: 12pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">odc-stac</span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"> to retrieve the data into an xarray. The key takeaway is that STAC plus </span><span style="font-size: 12pt; font-family: 'Roboto Mono', monospace; color: #188038; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;">odc-stac</span><span style="font-size: 12pt; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-variant-position: normal; font-variant-emoji: normal; vertical-align: baseline;"> allows for powerful, code-based searches across space and time. You can script complex queries and analyses (e.g., finding all cloud-free scenes in an area) and load the results directly into your analytics workflow.</span></span></span></p>
</div>
</div>
</div>
<script type="text/javascript">
(function (require) {
require(['/static/js/dateutil_factory.be68acdff619.js?raw'], function () {
require(['js/dateutil_factory'], function (DateUtilFactory) {
DateUtilFactory.transform('.localized-datetime');
});
});
}).call(this, require || RequireJS.require);
</script>
<script>
function emit_event(message) {
parent.postMessage(message, '*');
}
</script>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-course-id="course-v1:digitalearthafrica+DEA101+2021" data-init="VerticalStudentView" data-runtime-class="LmsRuntime" data-runtime-version="1" data-block-type="vertical" data-usage-id="block-v1:digitalearthafrica+DEA101+2021+type@vertical+block@ceff866eb83446898d735ecc96453fe1" data-request-token="9c1a535a4d0111f1b4d66b8c55c4de7e" data-graded="True" data-has-score="False">
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:digitalearthafrica+DEA101+2021+type@problem+block@5ef9bc3b47f54cb1be4a2a8e1fca349b">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:digitalearthafrica+DEA101+2021" data-block-type="problem" data-usage-id="block-v1:digitalearthafrica+DEA101+2021+type@problem+block@5ef9bc3b47f54cb1be4a2a8e1fca349b" data-request-token="9c1a535a4d0111f1b4d66b8c55c4de7e" data-graded="True" data-has-score="True">
<div class="page-banner"><div class="alert alert-warning"><span class="icon icon-alert fa fa fa-warning" aria-hidden="true"></span><div class="message-content">Question 1 is only accessible to enrolled learners. Sign in or register, and enroll in this course to view it.</div></div></div>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:digitalearthafrica+DEA101+2021+type@problem+block@a5a4a8922f704d2b98b95cdb0635c4ff">
<div class="xblock xblock-public_view xblock-public_view-problem xmodule_display xmodule_ProblemBlock" data-course-id="course-v1:digitalearthafrica+DEA101+2021" data-block-type="problem" data-usage-id="block-v1:digitalearthafrica+DEA101+2021+type@problem+block@a5a4a8922f704d2b98b95cdb0635c4ff" data-request-token="9c1a535a4d0111f1b4d66b8c55c4de7e" data-graded="True" data-has-score="True">
<div class="page-banner"><div class="alert alert-warning"><span class="icon icon-alert fa fa fa-warning" aria-hidden="true"></span><div class="message-content">Question 2 is only accessible to enrolled learners. Sign in or register, and enroll in this course to view it.</div></div></div>
</div>
</div>
</div>
<script type="text/javascript">
(function (require) {
require(['/static/js/dateutil_factory.be68acdff619.js?raw'], function () {
require(['js/dateutil_factory'], function (DateUtilFactory) {
DateUtilFactory.transform('.localized-datetime');
});
});
}).call(this, require || RequireJS.require);
</script>
<script>
function emit_event(message) {
parent.postMessage(message, '*');
}
</script>
</div>