<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@2f902adbb86247d3977d28cd6c7a29fb" data-request-token="0e7ebad8881611efa85e837f534d2eba" 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@b1f4c0e09e7f45b8ba1db1db5cd5c7c2">
<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@b1f4c0e09e7f45b8ba1db1db5cd5c7c2" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<section id="Overview" style="box-sizing: border-box; display: block; color: #000000; font-family: Arial, sans-serif; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></section>
<p style="text-align: left;">Now that you have learned to open and close notebooks, this section will teach you how to run an analysis using one of the existing Jupyter notebooks.</p>
<p> </p>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@94b7cdaba3904893a29276453eb84dbc">
<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@94b7cdaba3904893a29276453eb84dbc" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<section id="Video:-Working-with-notebooks" style="box-sizing: border-box; display: block; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"></section>
<h3 style="text-align: left;">Overview</h3>
<p style="text-align: left;">Jupyter is an interactive coding environment compatible with the programming language Python. Digital Earth Africa is based on a Python library called the<span> </span><a class="reference external" href="https://www.opendatacube.org/" target="_blank" style="box-sizing: border-box; color: #2980b9; text-decoration: none; cursor: pointer;">Open Data Cube</a>, so the Sandbox contains Python-based notebooks. </p>
<p style="text-align: left;">It is helpful, but not required, to be familiar with Python programming.</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@0d31f704c2074f82a642e4c2d880423a" data-request-token="0e7ebad8881611efa85e837f534d2eba" 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@4b4dbc17a72742b19a156caa676717fb">
<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@4b4dbc17a72742b19a156caa676717fb" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p style="text-align: left;"><span style="color: #000000;">This video gives an overview of the notebook we will be working with. Watch the video, and then follow the written instructions in the next unit to complete the exercise.</span></p>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:digitalearthafrica+DEA101+2021+type@video+block@9023193c5ab3420c871c97a2acfeceef">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-course-id="course-v1:digitalearthafrica+DEA101+2021" data-init="XBlockToXModuleShim" data-runtime-class="LmsRuntime" data-runtime-version="1" data-block-type="video" data-usage-id="block-v1:digitalearthafrica+DEA101+2021+type@video+block@9023193c5ab3420c871c97a2acfeceef" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Video: Working with notebooks</h3>
<div
id="video_9023193c5ab3420c871c97a2acfeceef"
class="video closed"
data-metadata='{"autoAdvance": false, "autohideHtml5": false, "autoplay": false, "captionDataDir": null, "completionEnabled": false, "completionPercentage": 0.95, "duration": null, "end": 0.0, "generalSpeed": 1.0, "lmsRootURL": "https://learn.digitalearthafrica.org", "poster": null, "prioritizeHls": false, "publishCompletionUrl": "/courses/course-v1:digitalearthafrica+DEA101+2021/xblock/block-v1:digitalearthafrica+DEA101+2021+type@video+block@9023193c5ab3420c871c97a2acfeceef/handler/publish_completion", "recordedYoutubeIsAvailable": true, "savedVideoPosition": 0.0, "saveStateEnabled": false, "saveStateUrl": "/courses/course-v1:digitalearthafrica+DEA101+2021/xblock/block-v1:digitalearthafrica+DEA101+2021+type@video+block@9023193c5ab3420c871c97a2acfeceef/handler/xmodule_handler/save_user_state", "showCaptions": "true", "sources": [], "speed": null, "start": 0.0, "streams": "1.00:ecVjImPy2_A", "transcriptAvailableTranslationsUrl": "/courses/course-v1:digitalearthafrica+DEA101+2021/xblock/block-v1:digitalearthafrica+DEA101+2021+type@video+block@9023193c5ab3420c871c97a2acfeceef/handler/transcript/available_translations", "transcriptLanguage": "en", "transcriptLanguages": {"en": "English"}, "transcriptTranslationUrl": "/courses/course-v1:digitalearthafrica+DEA101+2021/xblock/block-v1:digitalearthafrica+DEA101+2021+type@video+block@9023193c5ab3420c871c97a2acfeceef/handler/transcript/translation/__lang__", "ytApiUrl": "https://www.youtube.com/iframe_api", "ytMetadataEndpoint": "", "ytTestTimeout": 1500}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="9023193c5ab3420c871c97a2acfeceef"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></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>
<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@e42d02bfcd4b40f495c69ad733375ee3" data-request-token="0e7ebad8881611efa85e837f534d2eba" 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@d2d53f0316414a0d9990230a9f7122dc">
<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@d2d53f0316414a0d9990230a9f7122dc" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<section id="Exercise:-Run-the-Crop-Health-notebook" style="box-sizing: border-box; color: #000000;">
<p style="box-sizing: border-box; line-height: 24px; margin: 0px 0px 24px; font-size: 16px; text-align: left;">This activity will demonstrate how to run one of the Digital Earth Africa Sandbox notebooks. The notebook is a real world example showing how to measure crop health. Follow the instructions below to create your own copy of the notebook. The next unit will cover how to run the notebook.</p>
</section>
<section id="Run-the-Crop-Health-App" style="box-sizing: border-box;"></section>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@9bfd762f48f542739fbd829f7a571fc5">
<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@9bfd762f48f542739fbd829f7a571fc5" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<h3 style="text-align: left;">Make a "Training" folder</h3>
<p style="text-align: left;">The Sandbox comes with a large number of existing notebooks, which you can use as reference material. To keep these in their original format, we recommend making a copy of a notebook when you want to run it. For the rest of this training material, we will ask you to make copies of notebooks and store them in a new <strong style="box-sizing: border-box;">Training</strong> folder. Follow the instructions below to set up this folder and add a copy of the notebook for this session.</p>
<p style="text-align: left;">1. Click the <strong style="box-sizing: border-box;">Folder icon</strong> in the folder path to make sure you’re in the <strong style="box-sizing: border-box;">Home</strong> folder.</p>
<p style="text-align: left;"><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth1.png" /></p>
<p style="text-align: left;">2. Click the <strong style="box-sizing: border-box;">New Folder icon</strong> and name the new folder <strong style="box-sizing: border-box;">Training</strong>. Press <strong style="box-sizing: border-box;">Enter</strong> to finish creating the folder.</p>
<p><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth2.png" style="float: left;" /></p>
</div>
</div>
<div class="vert vert-2" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@f6296fc3c9dc470a95607a7b8a7782ca">
<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@f6296fc3c9dc470a95607a7b8a7782ca" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<h3 style="text-align: left;">Copy the Crop Health notebook</h3>
<p style="text-align: left;">The next step is to identify and copy the notebook you want to work on. For this exercise, this will be the <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Crop_health.ipynb</span></code> notebook, which is in the <strong style="box-sizing: border-box;">Real_world_examples</strong> folder. Follow the steps below to copy it.</p>
<p style="text-align: left;">1. Double-click the <strong style="box-sizing: border-box;">Real_world_examples</strong> folder to open it. The <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Crop_health.ipynb</span></code> notebook is selected in the image below.</p>
<ol class="arabic simple" start="3" style="text-align: left;"></ol>
<p style="text-align: left;"><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth3.png" /></p>
<p style="text-align: left;">2. Next, right-click on the notebook and click <strong style="box-sizing: border-box;">Duplicate</strong> to create a copy. By default, this will be called <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Crop_health-Copy1.ipynb</span></code>.</p>
<ol class="arabic simple" start="4" style="text-align: left;"></ol>
<p style="text-align: left;"><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth4.png" style="box-sizing: border-box; border: 0px; vertical-align: middle; width: 800px;" /></p>
<p style="text-align: left;">3. Click and drag <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Crop_health-Copy1.ipynb</span></code> to the <strong style="box-sizing: border-box;">Folder icon</strong> to move it to the <strong style="box-sizing: border-box;">Home</strong> folder.</p>
<p style="text-align: left;"><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth5.png" style="box-sizing: border-box; border: 0px; vertical-align: middle; width: 800px;" /></p>
<p style="text-align: left;">4. Return to the <strong style="box-sizing: border-box;">Home</strong> folder by clicking the <strong style="box-sizing: border-box;">Folder icon</strong>. You should see the <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Crop_health-Copy1.ipynb</span></code> notebook. Click and drag this file to the <strong style="box-sizing: border-box;">Training</strong> folder you created.</p>
<p style="text-align: left;"><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth6.png" style="box-sizing: border-box; border: 0px; vertical-align: middle; width: 800px;" /></p>
<p style="text-align: left;">5. Double-click the <strong style="box-sizing: border-box;">Training</strong> folder. Right-click the copied notebook and click <strong style="box-sizing: border-box;">Rename</strong>. Rename the notebook to <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Crop_health.ipynb</span></code>.</p>
<p style="text-align: left;"><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth7.png" /> <img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth8.png" style="box-sizing: border-box; border: 0px; vertical-align: middle; width: 800px;" /></p>
<p style="text-align: left;">In the next unit, you will learn how to run the copied notebook.</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@ca982030fa464b3daf0498374acf21da" data-request-token="0e7ebad8881611efa85e837f534d2eba" 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@410c0d0bf8574d9bbff85312aef4d03d">
<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@410c0d0bf8574d9bbff85312aef4d03d" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<h3 style="text-align: left;">Clearing the notebook</h3>
<p style="text-align: left;">Notebooks on the Sandbox come pre-run. This means some of the outputs will already be visible, but some will not. It is best practice to restart and clear the notebook before running.</p>
<p style="text-align: left;">Double-click your copied <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Crop_health.ipynb</span></code> notebook to open it.</p>
<ol>
<li>In the main menu, click <strong style="box-sizing: border-box;">Kernel -> Restart Kernel and Clear All Outputs</strong>. When asked whether you want to restart the kernel, click <strong style="box-sizing: border-box;">Restart</strong>.</li>
</ol>
<p style="text-align: left;"><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth9.png" style="box-sizing: border-box; border: 0px; vertical-align: middle; width: 800px;" /></p>
<ol class="arabic simple" start="2" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px; text-align: left;">
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">Read the <strong style="box-sizing: border-box;">Background</strong> and <strong style="box-sizing: border-box;">Description</strong> sections to learn more about the notebook.</li>
</ol>
<p style="text-align: left;"></p>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@aafafdb1e4064cbba47365ce4aa95cb1">
<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@aafafdb1e4064cbba47365ce4aa95cb1" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<h3 style="box-sizing: border-box;">Loading packages and functions</h3>
<section id="Loading-packages-and-functions" style="box-sizing: border-box;">This notebook uses Python packages and functions to conduct the analysis. These are contained in the first code cell, which looks like:<img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth10.PNG" style="box-sizing: border-box; border: 0px; vertical-align: middle; width: 800px;" /></section>
<section style="box-sizing: border-box;"></section>
<section style="box-sizing: border-box;">To load the necessary packages and functions:<ol class="arabic simple" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px;">
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">In the <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Crop_health.ipynb</span></code> notebook, click on the code cell that matches the one above.</li>
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">Press <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Shift</span> <span class="pre" style="box-sizing: border-box;">+</span> <span class="pre" style="box-sizing: border-box;">Enter</span></code> on your keyboard to run the cell.</li>
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">When the cell has finished running, the <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">[</span> <span class="pre" style="box-sizing: border-box;">]</span></code> icon to the left of the cell should change to <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">[1]</span></code>, as shown below. This indicates that the cell has finished running. The number <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">1</span></code> indicates that this was the first cell run in the notebook.</li>
</ol><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth11.PNG" style="box-sizing: border-box; border: 0px; vertical-align: middle; width: 800px;" /></section>
<section id="Run-the-Crop-Health-App" style="box-sizing: border-box;"></section>
</div>
</div>
<div class="vert vert-2" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@79b354a1b5f84e11868d9224ccd583a7">
<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@79b354a1b5f84e11868d9224ccd583a7" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<h3 style="text-align: left;">Picking a study site</h3>
<p style="text-align: left;">Next, we have to provide the area of interest using latitude, longitude, and a buffer, which describes how many square degrees to load around the set latitude and longitude values. We also set a date. Data from two years up to this date will be loaded.</p>
<p style="text-align: left;">For now, keep the values that have been set. The notebook will turn this into a bounding box, which will be used to load the data.</p>
<ol class="arabic simple" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px; text-align: left;">
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">Click on the cell corresponding to the image below in the notebook.</li>
</ol>
<p style="text-align: left;"><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth12.png" style="box-sizing: border-box; border: 0px; vertical-align: middle; width: 800px;" /></p>
<ol class="arabic simple" start="2" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px; text-align: left;">
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">Press <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Shift</span> <span class="pre" style="box-sizing: border-box;">+</span> <span class="pre" style="box-sizing: border-box;">Enter</span></code> on your keyboard to run the cell.</li>
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">When the cell has finished running, the <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">[</span> <span class="pre" style="box-sizing: border-box;">]</span></code> icon to the left of the cell should change to <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">[2]</span></code>.</li>
</ol>
<section id="Run-the-Crop-Health-App" style="box-sizing: border-box;"></section>
</div>
</div>
<div class="vert vert-3" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@f98a8e36b3dc4042baa8b1658adfd4fa">
<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@f98a8e36b3dc4042baa8b1658adfd4fa" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<h3 style="box-sizing: border-box; text-align: left;">Loading the data</h3>
<p id="Loading-the-data" style="box-sizing: border-box; text-align: left;">This notebook uses a special function called <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">load_crophealth_data</span></code> to load the required data. Later in this training course, you will learn how to write your own data loading commands.</p>
<p style="box-sizing: border-box; text-align: left;">The cell containing this function is shown in the image below:</p>
<p style="box-sizing: border-box; line-height: 24px; margin: 0px 0px 24px; font-size: 16px; text-align: left;"><img alt="The DE Africa Sandbox Jupyterlab tutorial image." class="no-scaled-link" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth13.png" style="box-sizing: border-box; border: 0px; vertical-align: middle; width: 800px;" /></p>
<p style="box-sizing: border-box; text-align: left;">The <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">load_crophealth_data</span></code> function goes through a number of steps. It identifies the available Sentinel-2 data over the last two years, then masks the bad quality pixels such as cloud and cloud shadow. After the masking step, the function only keeps images where more than half the pixels are good. Finally, it calculates the Normalised Difference Vegetation Index (NDVI) and returns the data. The returned data are stored in the <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">dataset</span></code> object.</p>
<p style="box-sizing: border-box; text-align: left;">To run the cell:</p>
<ol class="arabic simple" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px; text-align: left;">
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">Click on the cell corresponding to the image above in the notebook.</li>
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">Press <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Shift</span> <span class="pre" style="box-sizing: border-box;">+</span> <span class="pre" style="box-sizing: border-box;">Enter</span></code> on your keyboard to run the cell. Outputs should start to appear below the cell.</li>
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">When the cell has finished running, the <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">[</span> <span class="pre" style="box-sizing: border-box;">]</span></code> icon to the left of the cell should change to <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">[3]</span></code>.</li>
</ol>
<p style="text-align: left;">As the cell is running, you should see outputs describing the function’s actions. The output is shown in the image below:</p>
<p style="text-align: left;"></p>
<p style="box-sizing: border-box; text-align: left;"></p>
<p style="box-sizing: border-box; text-align: left;"></p>
<p style="box-sizing: border-box; text-align: left;"></p>
<p style="box-sizing: border-box; text-align: left;"></p>
<p style="box-sizing: border-box; text-align: left;"></p>
<p style="text-align: left;"></p>
<p style="box-sizing: border-box; text-align: left;"><img height="146" width="720" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth14.png" alt="output from load_ard function" /></p>
<p style="box-sizing: border-box; text-align: left;">In this case, the function identified 145 observations over the last 2 years, then kept and loaded 100 that met the quality requirements.</p>
</div>
</div>
<div class="vert vert-4" data-id="block-v1:digitalearthafrica+DEA101+2021+type@html+block@bc43a55e4f4b4e7f8af69f16e62703af">
<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@bc43a55e4f4b4e7f8af69f16e62703af" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<h3 style="text-align: left;">Running the Crop Health app</h3>
<p style="text-align: left;">After loading the data, you can visualise the health of various fields using the <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">run_crophealth_app</span></code> function. This is a special function for this notebook, which takes the <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">dataset</span></code> you loaded, as well as the latitude, longitude and buffer parameters that define the area of interest. It then starts an interactive app that you can use to measure the average NDVI in different fields.</p>
<p style="text-align: left;">The cell containing this function is shown in the image below:</p>
<p style="text-align: left;"><img height="41" width="800" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth15.png" alt="run crop health app" /></p>
<ol class="arabic simple" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px; text-align: left;">
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">Click on the cell corresponding to the image above in the notebook.</li>
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">Press <code class="docutils literal notranslate" style="box-sizing: border-box; font-family: SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courier, monospace; font-size: 12px; white-space: nowrap; max-width: 100%; background-image: initial; background-color: #ffffff; border: 1px solid #e1e4e5; padding: 2px 5px; color: #e74c3c; overflow-x: auto;"><span class="pre" style="box-sizing: border-box;">Shift</span> <span class="pre" style="box-sizing: border-box;">+</span> <span class="pre" style="box-sizing: border-box;">Enter</span></code> on your keyboard to run the cell. An interactive app should appear, as shown in the image below:</li>
</ol>
<p style="text-align: left;"><img height="513" width="800" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth16.png" alt="Loaded crop health app" /></p>
<ol class="arabic simple" start="3" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px; text-align: left;">
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">The left-hand side of the app contains a map, which will allow you to draw a polygon around a field of interest. Click the <strong style="box-sizing: border-box;">Polygon icon</strong>, then click points on the map to outline an area, as shown below:</li>
</ol>
<p style="text-align: left;"><img width="80%" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth17.png" alt="Draw a polygon to cover area of interest" /></p>
<div class="admonition note" style="box-sizing: border-box; -webkit-font-smoothing: antialiased; padding: 12px; line-height: 24px; margin-bottom: 24px; background: #e7f2fa;">
<p class="admonition-title" style="box-sizing: border-box; line-height: 1; margin: -12px -12px 12px; font-size: inherit; font-variant-numeric: normal; font-variant-east-asian: normal; font-weight: bold; font-stretch: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; color: #ffffff; background: #6ab0de; padding: 6px 12px;">Note</p>
The map in this app shows an ESRI basemap which is higher resolution than the Sentinel-2 data used to calculate the NDVI index. The purpose of the map is to guide you in drawing field boundaries.</div>
<ol class="arabic simple" start="4" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px; text-align: left;">
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">Click the first point of the polygon to finish selecting the area. The app will then calculate the average NDVI for that area and display it on the right-hand side of the app, as shown below:</li>
</ol>
<p style="text-align: left;"><img width="80%" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth18.png" alt="Results from one field" /></p>
<p style="text-align: left;">The cycles in the graph are likely related to growth and harvesting events.</p>
<ol class="arabic simple" start="5" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px; text-align: left;">
<li style="text-align: left; box-sizing: border-box; list-style: decimal; margin-left: 24px;">It is possible to draw multiple polygons and compare the vegetation index over time of different fields. Click the <strong style="box-sizing: border-box;">Polygon icon</strong> to draw a second polygon:</li>
</ol>
<p><img width="80%" src="https://learn.digitalearthafrica.org/asset-v1:digitalearthafrica+DEA101+2021+type@asset+block@crophealth19.png" alt="Results from multiple fields" style="float: left;" /></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@87705e52ed094814b72f6976b043593f" data-request-token="0e7ebad8881611efa85e837f534d2eba" 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@90f56c0f52fb4c9aa0986548feb3ba73">
<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@90f56c0f52fb4c9aa0986548feb3ba73" data-request-token="0e7ebad8881611efa85e837f534d2eba" 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">Knowledge check: Python imports 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@html+block@26387d86e2b247b2bf9da39041003e54">
<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@26387d86e2b247b2bf9da39041003e54" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<h3 style="text-align: left;">Optional activity</h3>
<p style="text-align: left;">If you would like to re-run this notebook using a different area of interest, follow these steps:</p>
<ol class="arabic simple" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px;">
<li style="box-sizing: border-box; list-style: decimal; margin-left: 24px; text-align: left;">Restart the notebook and clear all outputs.</li>
<li style="box-sizing: border-box; list-style: decimal; margin-left: 24px; text-align: left;">Run the cell that imports packages and fuctions.</li>
<li style="box-sizing: border-box; list-style: decimal; margin-left: 24px; text-align: left;">Change the latitude, longitude and buffer values in the second code cell. You can either use the values suggested above the cell, or provide your own. Then run the cell.</li>
</ol>
<div class="admonition note" style="box-sizing: border-box; -webkit-font-smoothing: antialiased; padding: 12px; line-height: 24px; margin-bottom: 24px; background: #e7f2fa; text-align: left;">
<p class="admonition-title" style="text-align: left; box-sizing: border-box; line-height: 1; margin: -12px -12px 12px; font-size: inherit; font-family: inherit; font-variant-numeric: normal; font-variant-east-asian: normal; font-weight: bold; font-stretch: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; color: #ffffff; background: #6ab0de; padding: 6px 12px;">Note</p>
<p style="text-align: left; box-sizing: border-box; line-height: 24px; margin: 0px; font-size: 16px;">If you’re going to use your own area of interest, make sure data is available by looking at the Sandbox Metadata Explorer for Sentinel-2 at <a class="reference external" href="https://explorer.digitalearth.africa/s2_l2a" target="_blank" style="box-sizing: border-box; color: #2980b9; text-decoration-line: none; cursor: pointer;">https://explorer.digitalearth.africa/s2_l2a</a>. You will also need to make sure you provide latitude and longitude values (rather than Easting and Northing values).</p>
</div>
<ol class="arabic simple" start="4" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px;">
<li style="box-sizing: border-box; list-style: decimal; margin-left: 24px; text-align: left;">Run the rest of the notebook as described in the tutorial, drawing in areas of interest using the <strong style="box-sizing: border-box;">Polygon icon</strong> on the map. Did you learn anything interesting about the fields for your area of interest?</li>
</ol><ol class="arabic simple" start="5" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 24px; padding-left: 0px; list-style-position: initial; list-style-image: initial; line-height: 24px;">
<li style="box-sizing: border-box; list-style: decimal; margin-left: 24px; text-align: left;">Investigate the <strong style="box-sizing: border-box;">optional</strong> <a class="reference internal" href="/courses/course-v1:digitalearthafrica+DEA101+2021/jump_to_id/8fe0db40f88a4b839b8850f44f0c55bc" style="box-sizing: border-box; color: #2980b9; text-decoration-line: none; cursor: pointer;" target="_blank">Python basics extra session</a> before continuing on to Session 2. If you are new to Python, it may be helpful for context and reference. If you have previous experience in Python, it provides a review of the major concepts used in the Digital Earth Africa training course.</li>
</ol>
</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@3c137ea0f1a146f09bb482d76c066383" data-request-token="0e7ebad8881611efa85e837f534d2eba" 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@9acf77d97aa94515ad97ff24e6b01140">
<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@9acf77d97aa94515ad97ff24e6b01140" data-request-token="0e7ebad8881611efa85e837f534d2eba" data-graded="True" data-has-score="False">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p style="text-align: left;">Congratulations! You have finished the first session of this training! You now know how to open and close notebooks, make copies of notebooks and run them.</p>
<p style="text-align: left;">You can go to the next unit to practice editing notebooks or go to the next section to complete the <a href="/courses/course-v1:digitalearthafrica+DEA101+2021/jump_to_id/c53079255028439aa147b0d82c162ac3" target="[object Object]">Quiz for Session 1</a>.</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>