From 9d12386f4c1f1baf28874e3ff16ac243d141272f Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Fri, 8 Dec 2023 09:27:33 -0500 Subject: [PATCH] Update GEDI notebook example (#637) * Update GEDI notebook example * Clean up notebook --- docs/notebooks/85_gedi.ipynb | 6 +++++- docs/notebooks/86_add_markers.ipynb | 11 +++++++++++ examples/notebooks/85_gedi.ipynb | 6 +++++- examples/notebooks/86_add_markers.ipynb | 11 +++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/docs/notebooks/85_gedi.ipynb b/docs/notebooks/85_gedi.ipynb index 51ada47e0f..5c0d534a02 100644 --- a/docs/notebooks/85_gedi.ipynb +++ b/docs/notebooks/85_gedi.ipynb @@ -163,7 +163,11 @@ "metadata": {}, "outputs": [], "source": [ - "gdf = leafmap.h5_to_gdf('data/*.h5', dataset='BEAM0110', columns=['agbd'], nodata=-9999)\n", + "try:\n", + " gdf = leafmap.h5_to_gdf('data/*.h5', dataset='BEAM0110', columns=['agbd'], nodata=-9999)\n", + "except:\n", + " # Download the sample data if the above code fails\n", + " gdf = leafmap.geojson_to_gdf('https://github.com/opengeos/data/releases/download/v1.0.0/gedi_sample.geojson')\n", "gdf.head()" ] }, diff --git a/docs/notebooks/86_add_markers.ipynb b/docs/notebooks/86_add_markers.ipynb index 01b9e4114c..0af978a6c6 100644 --- a/docs/notebooks/86_add_markers.ipynb +++ b/docs/notebooks/86_add_markers.ipynb @@ -105,6 +105,13 @@ ")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![](https://i.imgur.com/pKfZrdd.png)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -154,6 +161,10 @@ "display_name": "Python 3", "language": "python", "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.11.6" } }, "nbformat": 4, diff --git a/examples/notebooks/85_gedi.ipynb b/examples/notebooks/85_gedi.ipynb index 51ada47e0f..5c0d534a02 100644 --- a/examples/notebooks/85_gedi.ipynb +++ b/examples/notebooks/85_gedi.ipynb @@ -163,7 +163,11 @@ "metadata": {}, "outputs": [], "source": [ - "gdf = leafmap.h5_to_gdf('data/*.h5', dataset='BEAM0110', columns=['agbd'], nodata=-9999)\n", + "try:\n", + " gdf = leafmap.h5_to_gdf('data/*.h5', dataset='BEAM0110', columns=['agbd'], nodata=-9999)\n", + "except:\n", + " # Download the sample data if the above code fails\n", + " gdf = leafmap.geojson_to_gdf('https://github.com/opengeos/data/releases/download/v1.0.0/gedi_sample.geojson')\n", "gdf.head()" ] }, diff --git a/examples/notebooks/86_add_markers.ipynb b/examples/notebooks/86_add_markers.ipynb index 01b9e4114c..0af978a6c6 100644 --- a/examples/notebooks/86_add_markers.ipynb +++ b/examples/notebooks/86_add_markers.ipynb @@ -105,6 +105,13 @@ ")" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![](https://i.imgur.com/pKfZrdd.png)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -154,6 +161,10 @@ "display_name": "Python 3", "language": "python", "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.11.6" } }, "nbformat": 4,