Skip to content

Installation

The required dependencies are earthengine-api, geopandas, geojson, and notebook. The package (and dependencies) can be installed via pip:

1
pip install gee_zonal

This is the preferred method to install geodev, as it will always install the most recent stable release.

If you don't have pip installed, this Python installation guide can guide you through the process.

Setup

The Earth Engine Python API needs to be authenticated with a Google account. First, sign up to Google Earth Engine here. You will also need to create a Google Cloud Project.

Launch a jupyter notebook, and authenticate your account with the ee library. You will be able to create a project after running the authenticate command, detailed instructions are available here

1
2
import ee
ee.Authenticate()

Note

Authenticating from within a terminal can lead to issues with gcloud.

You can check that this worked by running ee.Initialize(), then import and run the library:

1
from gee_zonal import ZonalStats, Catalog

If the pip installation is not working, you can install the package from source:

1
pip install git+https://github.com/worldbank/GEE_Zonal.git