Skip to content

Commit

Permalink
Merge pull request #65 from digitalearthafrica/minty-fresh-training
Browse files Browse the repository at this point in the history
Compatibility updates for Cape Town migration
  • Loading branch information
eefaye committed Jun 1, 2021
2 parents b847a6f + 2ce4f69 commit 855c401
Show file tree
Hide file tree
Showing 58 changed files with 377 additions and 1,784 deletions.
Binary file modified docs/_static/session_1/crophealth14.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/session_1/crophealth18.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/session_1/crophealth19.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/session_1/sandbox-default-env.PNG
Binary file not shown.
Binary file added docs/_static/session_1/sandbox-default-env.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/session_1/sandbox-register-form.PNG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/session_1/sandbox-register-form.png
Binary file not shown.
Binary file modified docs/_static/session_2/04_load_data_exercise_07_imports.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 54 additions & 19 deletions docs/_static/session_2/Load_data_solution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,25 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/env/lib/python3.6/site-packages/geopandas/_compat.py:88: UserWarning: The Shapely GEOS version (3.7.2-CAPI-1.11.0 ) is incompatible with the GEOS version PyGEOS was compiled with (3.9.1-CAPI-1.14.2). Conversions between both will be slow.\n",
" shapely_geos_version, geos_capi_version_string\n"
]
}
],
"source": [
"%matplotlib inline\n",
"\n",
"import sys\n",
"import datacube\n",
"\n",
"sys.path.append(\"../Scripts\")\n",
"from deafrica_plotting import rgb\n",
"from deafrica_plotting import display_map"
"from deafrica_tools.plotting import rgb\n",
"from deafrica_tools.plotting import display_map"
]
},
{
Expand All @@ -46,9 +53,18 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/env/lib/python3.6/site-packages/datacube/drivers/postgres/_connections.py:87: SADeprecationWarning: Calling URL() directly is deprecated and will be disabled in a future release. The public constructor for URL is now the URL.create() method.\n",
" username=username, password=password,\n"
]
}
],
"source": [
"dc = datacube.Datacube(app=\"Load_data\")"
]
Expand All @@ -69,9 +85,23 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgCiAgICAgICAgPHNjcmlwdD4KICAgICAgICAgICAgTF9OT19UT1VDSCA9IGZhbHNlOwogICAgICAgICAgICBMX0RJU0FCTEVfM0QgPSBmYWxzZTsKICAgICAgICA8L3NjcmlwdD4KICAgIAogICAgPHN0eWxlPm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ICA8L3N0eWxlPgogICAgICAgIAo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgICAgICAgICA8ZGl2IGNsYXNzPSJmb2xpdW0tbWFwIiBpZD0ibWFwXzBhNmY3NDllYjhhZjQ3ZWM4YmY4MmIwMGQ4ZmVhZWJlIiA+PC9kaXY+CiAgICAgICAgCjwvYm9keT4KPHNjcmlwdD4gICAgCiAgICAKICAgICAgICAgICAgdmFyIG1hcF8wYTZmNzQ5ZWI4YWY0N2VjOGJmODJiMDBkOGZlYWViZSA9IEwubWFwKAogICAgICAgICAgICAgICAgIm1hcF8wYTZmNzQ5ZWI4YWY0N2VjOGJmODJiMDBkOGZlYWViZSIsCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY2VudGVyOiBbLTYuOCwgMzkuMjg1XSwKICAgICAgICAgICAgICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3LAogICAgICAgICAgICAgICAgICAgIHpvb206IDExLAogICAgICAgICAgICAgICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgICAgICAgICAgICAgIHByZWZlckNhbnZhczogZmFsc2UsCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICk7CgogICAgICAgICAgICAKCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHRpbGVfbGF5ZXJfZmMxNWRmNGI2NjdkNDY1MmFhODkxYmQxZGI5NzlhMzggPSBMLnRpbGVMYXllcigKICAgICAgICAgICAgICAgICJodHRwOi8vbXQxLmdvb2dsZS5jb20vdnQvbHlycz15XHUwMDI2ej17en1cdTAwMjZ4PXt4fVx1MDAyNnk9e3l9IiwKICAgICAgICAgICAgICAgIHsiYXR0cmlidXRpb24iOiAiR29vZ2xlIiwgImRldGVjdFJldGluYSI6IGZhbHNlLCAibWF4TmF0aXZlWm9vbSI6IDE4LCAibWF4Wm9vbSI6IDE4LCAibWluWm9vbSI6IDAsICJub1dyYXAiOiBmYWxzZSwgIm9wYWNpdHkiOiAx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hhYgogICAgICAgICAgICAgICAgICAgICAgICAuc2V0TGF0TG5nKGUubGF0bG5nKQogICAgICAgICAgICAgICAgICAgICAgICAuc2V0Q29udGVudCgiTGF0aXR1ZGU6ICIgKyBlLmxhdGxuZy5sYXQudG9GaXhlZCg0KSArCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICI8YnI+TG9uZ2l0dWRlOiAiICsgZS5sYXRsbmcubG5nLnRvRml4ZWQoNCkpCiAgICAgICAgICAgICAgICAgICAgICAgIC5vcGVuT24obWFwXzBhNmY3NDllYjhhZjQ3ZWM4YmY4MmIwMGQ4ZmVhZWJlKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBtYXBfMGE2Zjc0OWViOGFmNDdlYzhiZjgyYjAwZDhmZWFlYmUub24oJ2NsaWNrJywgbGF0TG5nUG9wKTsKICAgICAgICAgICAgCjwvc2NyaXB0Pg==\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x7f78c69a1d30>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x = (39.20, 39.37)\n",
"y = (-6.90, -6.70)\n",
Expand All @@ -88,20 +118,19 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"landsat_ds = dc.load(\n",
" product=\"ls8_usgs_sr_scene\",\n",
" product=\"ls8_sr\",\n",
" x=(39.20, 39.37),\n",
" y=(-6.90, -6.70),\n",
" time=(\"2018-01-01\", \"2018-12-31\"),\n",
" output_crs=\"EPSG:6933\",\n",
" resolution=(-30, 30),\n",
" group_by=\"solar_day\",\n",
" measurements=[\"red\", \"green\", \"blue\"]\n",
")"
" measurements=[\"red\", \"green\", \"blue\"])"
]
},
{
Expand Down Expand Up @@ -159,8 +188,7 @@
" output_crs=\"EPSG:6933\",\n",
" resolution=(-10, 10),\n",
" group_by=\"solar_day\",\n",
" measurements=[\"red\", \"green\", \"blue\"]\n",
")"
" measurements=[\"red\", \"green\", \"blue\"])"
]
},
{
Expand Down Expand Up @@ -194,6 +222,13 @@
"source": [
"rgb(sentinel_2_ds, bands=[\"red\", \"green\", \"blue\"], index=9, size=10)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Binary file added docs/_static/session_2/explorer_11august2018.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/session_2/explorer_2018.PNG
Binary file not shown.
Binary file added docs/_static/session_2/explorer_2018.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/session_2/explorer_august.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/session_2/explorer_ls8.PNG
Binary file not shown.
Binary file added docs/_static/session_2/explorer_ls8.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/session_2/explorer_tanzania.PNG
Binary file not shown.
Binary file added docs/_static/session_2/explorer_tanzania.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/session_2/explorer_ui1.PNG
Binary file not shown.
Binary file added docs/_static/session_2/explorer_ui1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/session_2/explorer_zoom.PNG
Binary file not shown.
Binary file added docs/_static/session_2/explorer_zoom.png
Binary file modified docs/_static/session_3/02_cloud_masking_01_imports.png
9 changes: 3 additions & 6 deletions docs/_static/session_3/Geomedian_composite_solution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,13 @@
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"%matplotlib inline\n",
"\n",
"import sys\n",
"import datacube\n",
"\n",
"sys.path.append(\"../Scripts\")\n",
"from deafrica_datahandling import load_ard\n",
"from deafrica_plotting import rgb\n",
"from deafrica_plotting import display_map\n",
"from deafrica_tools.datahandling import load_ard\n",
"from deafrica_tools.plotting import rgb\n",
"from deafrica_tools.plotting import display_map\n",
"from odc.algo import xr_geomedian"
]
},
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
79 changes: 18 additions & 61 deletions docs/_static/session_5/Vegetation_exercise.ipynb

Large diffs are not rendered by default.

0 comments on commit 855c401

Please sign in to comment.