From c53f61458bf993c910107cad2f15e983fc462a5f Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Sat, 30 Sep 2023 20:07:48 -0400 Subject: [PATCH] Update badges and add Colab notebook (#1743) --- README.rst | 29 +++--- docs/index.md | 23 ++--- docs/notebooks/00_geemap_colab.ipynb | 115 +++++++++++++++++++++++ examples/notebooks/00_geemap_colab.ipynb | 115 +++++++++++++++++++++++ examples/notebooks/geemap_colab.ipynb | 2 +- 5 files changed, 259 insertions(+), 25 deletions(-) create mode 100644 docs/notebooks/00_geemap_colab.ipynb create mode 100644 examples/notebooks/00_geemap_colab.ipynb diff --git a/README.rst b/README.rst index 28166334d5..49b109ee4a 100644 --- a/README.rst +++ b/README.rst @@ -3,25 +3,28 @@ geemap ====== .. image:: https://colab.research.google.com/assets/colab-badge.svg - :target: https://gishub.org/geemap-colab + :target: https://colab.research.google.com/github/gee-community/geemap/blob/master/docs/notebooks/00_geemap_colab.ipynb .. image:: https://mybinder.org/badge_logo.svg - :target: https://gishub.org/geemap-binder + :target: https://mybinder.org/v2/gh/gee-community/geemap/master?labpath=docs%2Fnotebooks%2F00_geemap_colab.ipynb .. image:: https://studiolab.sagemaker.aws/studiolab.svg - :target: https://studiolab.sagemaker.aws/import/github/gee-community/geemap/blob/master/examples/notebooks/00_geemap_key_features.ipynb - -.. image:: https://renkulab.io/renku-badge.svg - :target: https://renkulab.io/projects/renku-stories/geemap/sessions/new?autostart=1 + :target: https://studiolab.sagemaker.aws/import/github/gee-community/geemap/blob/master/docs/notebooks/00_geemap_colab.ipynb .. image:: https://img.shields.io/pypi/v/geemap.svg :target: https://pypi.python.org/pypi/geemap +.. image:: https://static.pepy.tech/badge/geemap + :target: https://pepy.tech/project/geemap + +.. image:: https://img.shields.io/badge/recipe-geemap-green.svg + :target: https://github.com/giswqs/geemap-feedstock + .. image:: https://img.shields.io/conda/vn/conda-forge/geemap.svg :target: https://anaconda.org/conda-forge/geemap -.. image:: https://static.pepy.tech/badge/geemap - :target: https://pepy.tech/project/geemap +.. image:: https://img.shields.io/conda/dn/conda-forge/geemap.svg + :target: https://anaconda.org/conda-forge/geemap .. image:: https://github.com/gee-community/geemap/workflows/docs/badge.svg :target: https://geemap.org @@ -38,7 +41,7 @@ geemap .. image:: https://joss.theoj.org/papers/10.21105/joss.02305/status.svg :target: https://joss.theoj.org/papers/10.21105/joss.02305 -**A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and ipywidgets.** +**A Python package for interactive geospatial analysis and visualization with Google Earth Engine.** * GitHub repo: https://github.com/gee-community/geemap * Documentation: https://geemap.org @@ -48,7 +51,7 @@ geemap * GEE Tutorials on YouTube: https://youtube.com/@giswqs * Free software: MIT license -**Acknowledgment:** This material is based upon work partially supported by the National Aeronautics and Space Administration (NASA) under Grant No. 80NSSC22K1742 issued through the `Open Source Tools, Frameworks, and Libraries 2020 Program `__. +**Acknowledgment:** The geemap project is supported by the National Aeronautics and Space Administration (NASA) under Grant No. 80NSSC22K1742 issued through the `Open Source Tools, Frameworks, and Libraries 2020 Program `__. **Contents** @@ -62,7 +65,7 @@ geemap Announcement ------------ -The book **Earth Engine and Geemap - Geospatial Data Science with Python**, written by `Qiusheng Wu `__, has been published by Locate Press in July 2023. If you’re interested in +The book **Earth Engine and Geemap: Geospatial Data Science with Python**, written by `Qiusheng Wu `__, has been published by Locate Press in July 2023. If you’re interested in purchasing the book, please visit this URL: https://locatepress.com/book/gee. .. figure:: https://images.geemap.org/book.png @@ -72,7 +75,7 @@ purchasing the book, please visit this URL: https://locatepress.com/book/gee. Introduction ------------ -**Geemap** is a Python package for interactive mapping with `Google Earth Engine `__ (GEE), which is a cloud computing platform with a `multi-petabyte catalog `__ of satellite imagery and geospatial datasets. During the past few years, +**Geemap** is a Python package for geospatial analysis and visualization with `Google Earth Engine `__ (GEE), which is a cloud computing platform with a `multi-petabyte catalog `__ of satellite imagery and geospatial datasets. During the past few years, GEE has become very popular in the geospatial community and it has empowered numerous environmental applications at local, regional, and global scales. GEE provides both JavaScript and Python APIs for making computational requests to the Earth Engine servers. Compared with the comprehensive `documentation `__ and interactive IDE (i.e., `GEE JavaScript Code Editor `__) of the GEE JavaScript API, the GEE Python API has relatively little documentation and limited functionality for visualizing results interactively. The **geemap** Python package was created to fill this gap. It is built upon `ipyleaflet `__ and `ipywidgets `__, and enables users to @@ -88,7 +91,7 @@ If you find geemap useful in your research, please consider citing the following - Wu, Q., (2020). geemap: A Python package for interactive mapping with Google Earth Engine. *The Journal of Open Source Software*, 5(51), 2305. ``__ - Wu, Q., Lane, C. R., Li, X., Zhao, K., Zhou, Y., Clinton, N., DeVries, B., Golden, H. E., & Lang, M. W. (2019). Integrating LiDAR data and multi-temporal aerial imagery to map wetland inundation dynamics using Google Earth Engine. *Remote Sensing of Environment*, 228, 1-13. https://doi.org/10.1016/j.rse.2019.04.015 (`pdf `_ | `source code `_) -Check out the geemap workshop I presented at the GeoPython Conference 2021. This workshop gives a comprehensive introduction to the key features of geemap. +Check out the geemap workshop presented at the GeoPython Conference 2021. This workshop gives a comprehensive introduction to the key features of geemap. .. image:: https://img.youtube.com/vi/wGjpjh9IQ5I/0.jpg :target: https://www.youtube.com/watch?v=wGjpjh9IQ5I diff --git a/docs/index.md b/docs/index.md index 30ee3f5a21..670b2a7b49 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,20 +1,21 @@ # Welcome to geemap -[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://gishub.org/geemap-colab) -[![Open in Binder](https://mybinder.org/badge_logo.svg)](https://gishub.org/geemap-binder) -[![Open In Studio Lab](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/gee-community/geemap/blob/master/examples/notebooks/00_geemap_key_features.ipynb) +[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/gee-community/geemap/blob/master/docs/notebooks/00_geemap_colab.ipynb) +[![Open in Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/gee-community/geemap/master?labpath=docs%2Fnotebooks%2F00_geemap_colab.ipynb) +[![Open In Studio Lab](https://studiolab.sagemaker.aws/studiolab.svg)](https://studiolab.sagemaker.aws/import/github/gee-community/geemap/blob/master/docs/notebooks/00_geemap_colab.ipynb) [![image](https://img.shields.io/pypi/v/geemap.svg)](https://pypi.python.org/pypi/geemap) -[![image](https://img.shields.io/conda/vn/conda-forge/geemap.svg)](https://anaconda.org/conda-forge/geemap) [![image](https://static.pepy.tech/badge/geemap)](https://pepy.tech/project/geemap) +[![Conda Recipe](https://img.shields.io/badge/recipe-geemap-green.svg)](https://github.com/giswqs/geemap-feedstock) +[![image](https://img.shields.io/conda/vn/conda-forge/geemap.svg)](https://anaconda.org/conda-forge/geemap) +[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/geemap.svg)](https://anaconda.org/conda-forge/geemap) [![image](https://github.com/gee-community/geemap/workflows/docs/badge.svg)](https://geemap.org) -[![image](https://github.com/gee-community/geemap/workflows/build/badge.svg)](https://github.com/gee-community/geemap/actions?query=workflow%3Abuild) [![image](https://img.shields.io/badge/YouTube-Channel-red)](https://youtube.com/@giswqs) [![image](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![image](https://joss.theoj.org/papers/10.21105/joss.02305/status.svg)](https://joss.theoj.org/papers/10.21105/joss.02305) [![logo](https://i.imgur.com/9OOSpDm.png)](https://github.com/gee-community/geemap/blob/master/docs/assets/logo.png) -**A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and ipywidgets.** +**A Python package for interactive geospatial analysis and visualization with Google Earth Engine** - GitHub repo: - Documentation: @@ -24,17 +25,17 @@ - GEE Tutorials on YouTube: - Free software: [MIT license](https://opensource.org/licenses/MIT) -**Acknowledgment:** This material is based upon work supported by the National Aeronautics and Space Administration (NASA) under Grant No. 80NSSC22K1742 issued through the [Open Source Tools, Frameworks, and Libraries 2020 Program](https://bit.ly/3RVBRcQ). +**Acknowledgment:** The geemap project is supported by the National Aeronautics and Space Administration (NASA) under Grant No. 80NSSC22K1742 issued through the [Open Source Tools, Frameworks, and Libraries 2020 Program](https://bit.ly/3RVBRcQ). ## Announcement -The book _**Earth Engine and Geemap - Geospatial Data Science with Python**_, written by [Qiusheng Wu](https://gishub.org), has been published by Locate Press in July 2023. If you're interested in purchasing the book, please visit this URL: . +The book _**Earth Engine and Geemap: Geospatial Data Science with Python**_, written by [Qiusheng Wu](https://gishub.org), has been published by Locate Press in July 2023. If you're interested in purchasing the book, please visit this URL: . ![book](https://images.geemap.org/book.png) ## Introduction -**Geemap** is a Python package for interactive mapping with [Google Earth Engine](https://earthengine.google.com/) (GEE), which is a cloud computing platform with a [multi-petabyte catalog](https://developers.google.com/earth-engine/datasets/) of satellite imagery and geospatial datasets. During the past few years, GEE has become very popular in the geospatial community and it has empowered numerous environmental applications at local, regional, and global scales. GEE provides both JavaScript and Python APIs for making computational requests to the Earth Engine servers. Compared with the comprehensive [documentation](https://developers.google.com/earth-engine) and interactive IDE (i.e., [GEE JavaScript Code Editor](https://code.earthengine.google.com/)) of the GEE JavaScript API, the GEE Python API has relatively little documentation and limited functionality for visualizing results interactively. The geemap Python package was created to fill this gap. It is built upon [ipyleaflet](https://github.com/jupyter-widgets/ipyleaflet) and [ipywidgets](https://github.com/jupyter-widgets/ipywidgets), and enables users to analyze and visualize Earth Engine datasets interactively within a Jupyter-based environment. +**Geemap** is a Python package for interactive geospatial analysis and visualization with [Google Earth Engine](https://earthengine.google.com/) (GEE), which is a cloud computing platform with a [multi-petabyte catalog](https://developers.google.com/earth-engine/datasets/) of satellite imagery and geospatial datasets. During the past few years, GEE has become very popular in the geospatial community and it has empowered numerous environmental applications at local, regional, and global scales. GEE provides both JavaScript and Python APIs for making computational requests to the Earth Engine servers. Compared with the comprehensive [documentation](https://developers.google.com/earth-engine) and interactive IDE (i.e., [GEE JavaScript Code Editor](https://code.earthengine.google.com/)) of the GEE JavaScript API, the GEE Python API has relatively little documentation and limited functionality for visualizing results interactively. The geemap Python package was created to fill this gap. It is built upon [ipyleaflet](https://github.com/jupyter-widgets/ipyleaflet) and [ipywidgets](https://github.com/jupyter-widgets/ipywidgets), and enables users to analyze and visualize Earth Engine datasets interactively within a Jupyter-based environment. **Geemap** is intended for students and researchers, who would like to utilize the Python ecosystem of diverse libraries and tools to explore Google Earth Engine. It is also designed for existing GEE users who would like to transition from the GEE JavaScript API to Python API. The automated JavaScript-to-Python [conversion module](https://github.com/gee-community/geemap/blob/master/geemap/conversion.py) of the geemap package can greatly reduce the time needed to convert existing GEE JavaScripts to Python scripts and Jupyter notebooks. @@ -45,9 +46,9 @@ If you find geemap useful in your research, please consider citing the following - Wu, Q., (2020). geemap: A Python package for interactive mapping with Google Earth Engine. The Journal of Open Source Software, 5(51), 2305. - Wu, Q., Lane, C. R., Li, X., Zhao, K., Zhou, Y., Clinton, N., DeVries, B., Golden, H. E., & Lang, M. W. (2019). Integrating LiDAR data and multi-temporal aerial imagery to map wetland inundation dynamics using Google Earth Engine. Remote Sensing of Environment, 228, 1-13. ([pdf](https://gishub.org/2019_rse) | [source code](https://doi.org/10.6084/m9.figshare.8864921)) -Check out the geemap workshop I presented at the GeoPython Conference 2021. This workshop gives a comprehensive introduction to the key features of geemap. +Check out the geemap workshop presented at the GeoPython Conference 2021. This workshop gives a comprehensive introduction to the key features of geemap. -[![geemap workship](https://img.youtube.com/vi/wGjpjh9IQ5I/0.jpg)](https://www.youtube.com/watch?v=wGjpjh9IQ5I) +[![geemap workshop](https://img.youtube.com/vi/wGjpjh9IQ5I/0.jpg)](https://www.youtube.com/watch?v=wGjpjh9IQ5I) ## Key Features diff --git a/docs/notebooks/00_geemap_colab.ipynb b/docs/notebooks/00_geemap_colab.ipynb new file mode 100644 index 0000000000..077b23c175 --- /dev/null +++ b/docs/notebooks/00_geemap_colab.ipynb @@ -0,0 +1,115 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\"Open\n", + "\n", + "## Using geemap with Google Colab\n", + "\n", + "### Instructions\n", + "\n", + "To use geemap and the Earth Engine Python API, you must [register](https://code.earthengine.google.com/register) for an Earth Engine account and follow the instructions [here](https://docs.google.com/document/d/1ZGSmrNm6_baqd8CHt33kIBWOlvkh-HLr46bODgJN1h0/edit?usp=sharing) to create a Cloud Project. Earth Engine is free for [noncommercial and research use](https://earthengine.google.com/noncommercial)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Install geemap" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%pip install geemap" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Import libraries" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import ee\n", + "import geemap" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create an interactive map\n", + "\n", + "Running the following cell will start the Earth Engine authentication. Follow the instructions [here](https://book.geemap.org/chapters/01_introduction.html#earth-engine-authentication) to authenticate Earth Engine." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "Map = geemap.Map()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Add Earth Engine data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Add Earth Engine dataset\n", + "image = ee.Image('USGS/SRTMGL1_003')\n", + "\n", + "# Set visualization parameters.\n", + "vis_params = {\n", + " 'min': 0,\n", + " 'max': 4000,\n", + " 'palette': 'terrain',\n", + "}\n", + "\n", + "# Add Earth Engine layers to Map\n", + "Map.addLayer(image, vis_params, 'DEM')\n", + "\n", + "# Center the map based on an Earth Engine object or coordinates (longitude, latitude)\n", + "Map.setCenter(86.9250, 27.9881, 4)\n", + "Map" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you can see the map above, you have successfully authenticated the Earth Engine Python API. Otherwise, you might need to follow the instructions [here](https://docs.google.com/document/d/1ZGSmrNm6_baqd8CHt33kIBWOlvkh-HLr46bODgJN1h0/edit?usp=sharing) to create a Cloud Project, which is required to use the Earth Engine Python API." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/examples/notebooks/00_geemap_colab.ipynb b/examples/notebooks/00_geemap_colab.ipynb new file mode 100644 index 0000000000..077b23c175 --- /dev/null +++ b/examples/notebooks/00_geemap_colab.ipynb @@ -0,0 +1,115 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\"Open\n", + "\n", + "## Using geemap with Google Colab\n", + "\n", + "### Instructions\n", + "\n", + "To use geemap and the Earth Engine Python API, you must [register](https://code.earthengine.google.com/register) for an Earth Engine account and follow the instructions [here](https://docs.google.com/document/d/1ZGSmrNm6_baqd8CHt33kIBWOlvkh-HLr46bODgJN1h0/edit?usp=sharing) to create a Cloud Project. Earth Engine is free for [noncommercial and research use](https://earthengine.google.com/noncommercial)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Install geemap" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%pip install geemap" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Import libraries" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import ee\n", + "import geemap" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create an interactive map\n", + "\n", + "Running the following cell will start the Earth Engine authentication. Follow the instructions [here](https://book.geemap.org/chapters/01_introduction.html#earth-engine-authentication) to authenticate Earth Engine." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "Map = geemap.Map()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Add Earth Engine data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Add Earth Engine dataset\n", + "image = ee.Image('USGS/SRTMGL1_003')\n", + "\n", + "# Set visualization parameters.\n", + "vis_params = {\n", + " 'min': 0,\n", + " 'max': 4000,\n", + " 'palette': 'terrain',\n", + "}\n", + "\n", + "# Add Earth Engine layers to Map\n", + "Map.addLayer(image, vis_params, 'DEM')\n", + "\n", + "# Center the map based on an Earth Engine object or coordinates (longitude, latitude)\n", + "Map.setCenter(86.9250, 27.9881, 4)\n", + "Map" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If you can see the map above, you have successfully authenticated the Earth Engine Python API. Otherwise, you might need to follow the instructions [here](https://docs.google.com/document/d/1ZGSmrNm6_baqd8CHt33kIBWOlvkh-HLr46bODgJN1h0/edit?usp=sharing) to create a Cloud Project, which is required to use the Earth Engine Python API." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/examples/notebooks/geemap_colab.ipynb b/examples/notebooks/geemap_colab.ipynb index 83c3d796f9..077b23c175 100644 --- a/examples/notebooks/geemap_colab.ipynb +++ b/examples/notebooks/geemap_colab.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\"Open\n", + "\"Open\n", "\n", "## Using geemap with Google Colab\n", "\n",