Skip to content

Commit

Permalink
Reorganized file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Mar 19, 2020
1 parent 14cce15 commit 5e3f068
Show file tree
Hide file tree
Showing 34 changed files with 552 additions and 592 deletions.
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ include LICENSE
include README.rst
include requirements.txt

recursive-include geemap/examples *
recursive-include geemap/data *
recursive-include tests *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude * *.ipynb
recursive-include examples *.js
recursive-exclude examples *

recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
41 changes: 22 additions & 19 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,7 @@ Installation
The **geemap** Python package is built upon the `ipyleaflet <https://github.com/jupyter-widgets/ipyleaflet>`__ and `folium <https://github.com/python-visualization/folium>`__ packages and
implements several methods for displaying Earth Engine data layers, such as ``Map.addLayer()``, ``Map.setCenter()``, and ``Map.centerObject()``.

A key difference between folium and ipyleaflet is that ipyleaflet is built upon ipywidgets and allows bidirectional
communication between the front-end and the backend enabling the use of the map to capture user input, while folium is meant for displaying
static data only (`source <https://blog.jupyter.org/interactive-gis-in-jupyter-with-ipyleaflet-52f9657fa7a>`__).
Note that `Google Colab <https://colab.research.google.com/>`__ currently does not support ipyleaflet
(`source <https://github.com/googlecolab/colabtools/issues/60#issuecomment-596225619>`__). Therefore, if you are using geemap with Google Colab, you should use
`import geemap.eefolium <https://github.com/giswqs/geemap/blob/master/geemap/eefolium.py>`__. If you are using geemap with binder or a local Jupyter notebook server,
you can use `import geemap <https://github.com/giswqs/geemap/blob/master/geemap/geemap.py>`__, which provides more functionalities for capturing user input (e.g.,
mouse-clicking and moving).


To install **geemap**, run this command in your terminal:

Expand Down Expand Up @@ -111,6 +104,16 @@ To install the development version from GitHub, run the following command in you

Usage
-----

**Important note:** A key difference between `ipyleaflet <https://github.com/jupyter-widgets/ipyleaflet>`__ and `folium <https://github.com/python-visualization/folium>`__ is that ipyleaflet is built upon ipywidgets and allows bidirectional
communication between the front-end and the backend enabling the use of the map to capture user input, while folium is meant for displaying
static data only (`source <https://blog.jupyter.org/interactive-gis-in-jupyter-with-ipyleaflet-52f9657fa7a>`__).
Note that `Google Colab <https://colab.research.google.com/>`__ currently does not support ipyleaflet
(`source <https://github.com/googlecolab/colabtools/issues/60#issuecomment-596225619>`__). Therefore, if you are using geemap with Google Colab, you should use
`import geemap.eefolium <https://github.com/giswqs/geemap/blob/master/geemap/eefolium.py>`__. If you are using geemap with `binder <https://mybinder.org/>`__ or a local Jupyter notebook server,
you can use `import geemap <https://github.com/giswqs/geemap/blob/master/geemap/geemap.py>`__, which provides more functionalities for capturing user input (e.g.,
mouse-clicking and moving).

To create an ipyleaflet-based interactive map:

.. code:: python
Expand All @@ -124,8 +127,8 @@ To create a folium-based interactive map:

.. code:: python
import geemap.eefolium as eemap
Map = eemap.Map(center=[40,-100], zoom=4)
import geemap.eefolium as emap
Map = emap.Map(center=[40,-100], zoom=4)
Map
Expand Down Expand Up @@ -229,13 +232,13 @@ Launch an interactive notebook with **Google Colab**, **mybinder.org**, or **bin
The source code for this automated conversion module can be found at `conversion.py`_.

.. image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/giswqs/geemap/blob/master/examples/earthengine_js_to_ipynb.ipynb
:target: https://colab.research.google.com/github/giswqs/geemap/blob/master/examples/notebooks/earthengine_js_to_ipynb.ipynb

.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/giswqs/geemap/master?filepath=examples/earthengine_js_to_ipynb.ipynb
:target: https://mybinder.org/v2/gh/giswqs/geemap/master?filepath=examples/notebooks/earthengine_js_to_ipynb.ipynb

.. image:: https://binder.pangeo.io/badge_logo.svg
:target: https://binder.pangeo.io/v2/gh/giswqs/geemap/master?filepath=examples/earthengine_js_to_ipynb.ipynb
:target: https://binder.pangeo.io/v2/gh/giswqs/geemap/master?filepath=examples/notebooks/earthengine_js_to_ipynb.ipynb

.. code:: python
Expand Down Expand Up @@ -270,13 +273,13 @@ Interactive mapping using GEE Python API and geemap
Launch an interactive notebook with **mybinder.org** or **binder.pangeo.io**. Note that **Google Colab** currently does not support ipyleaflet. Therefore, you should use ``import geemap.eefolium`` instead of ``import geemap``.

.. image:: https://colab.research.google.com/assets/colab-badge.svg
:target: https://colab.research.google.com/github/giswqs/geemap/blob/master/examples/geemap_and_folium.ipynb
:target: https://colab.research.google.com/github/giswqs/geemap/blob/master/examples/notebooks/geemap_and_folium.ipynb

.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/giswqs/geemap/master?filepath=examples/geemap_and_earthengine.ipynb
:target: https://mybinder.org/v2/gh/giswqs/geemap/master?filepath=examples/notebooks/geemap_and_earthengine.ipynb

.. image:: https://binder.pangeo.io/badge_logo.svg
:target: https://binder.pangeo.io/v2/gh/giswqs/geemap/master?filepath=examples/geemap_and_earthengine.ipynb
:target: https://binder.pangeo.io/v2/gh/giswqs/geemap/master?filepath=examples/notebooks/geemap_and_earthengine.ipynb

.. code:: python
Expand All @@ -292,9 +295,9 @@ Launch an interactive notebook with **mybinder.org** or **binder.pangeo.io**. No
# Checks whether this notebook is running on Google Colab
try:
import google.colab
import geemap.eefolium as eemap
import geemap.eefolium as emap
except:
import geemap as eemap
import geemap as emap
# Authenticates and initializes Earth Engine
import ee
Expand All @@ -306,7 +309,7 @@ Launch an interactive notebook with **mybinder.org** or **binder.pangeo.io**. No
ee.Initialize()
# Creates an interactive map
Map = eemap.Map(center=[40,-100], zoom=4)
Map = emap.Map(center=[40,-100], zoom=4)
# Adds Earth Engine dataset
image = ee.Image('USGS/SRTMGL1_003')
Expand Down
172 changes: 0 additions & 172 deletions examples/Template/template.ipynb

This file was deleted.

100 changes: 0 additions & 100 deletions examples/Template/template.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5e3f068

Please sign in to comment.