Skip to main content

Hestia Earth Engine

Pipeline Status Coverage Report

Hestia's utilities to make queries to Earth Engine.

Getting Started

  1. Sign up for a Google Cloud Account
  2. Enable the Earth Engine API
  3. Create a Service Account with Earth Engine access
  4. Set the service account JSON credentials in the following file: ee-credentials.json
  5. Set the following environment variable:
# path to the ee-credentials.json file saved at previous step
EARTH_ENGINE_KEY_FILE=./ee-credentials.json
  1. The GADM assets are not shared publicly, as GADM cannot be redistributed. Download version 3.6 by level and upload each level to your own Earth Engine account, keeping the names gadm36_0 to gadm36_5:
curl -O https://geodata.ucdavis.edu/gadm/gadm3.6/gadm36_levels_shp.zip
unzip gadm36_levels_shp.zip -d gadm36_levels
# the Earth Engine CLI uploads from Google Cloud Storage
gsutil cp gadm36_levels/gadm36_* gs://<your-bucket>/gadm36/
for level in 0 1 2 3 4 5; do
  earthengine upload table --asset_id=users/<your-account>/gadm36_$level gs://<your-bucket>/gadm36/gadm36_$level.shp
done

You can also upload each level from the Code Editor (Assets > New > Shape files), selecting its .shp, .shx, .dbf and .prj files. Then set the folder holding them:

# defaults to users/hestiaplatform
HESTIA_ASSETS=users/<your-account>
# optional, defaults to HESTIA_ASSETS
HESTIA_GADM_ASSETS=users/<your-account>

Install

  1. Install Python 3 (we recommend using Python 3.6 minimum)
  2. Install the module:
pip install hestia_earth.earth_engine

Usage

from hestia_earth.earth_engine import init_gee, run

# call this only once during a session
init_gee()
# fetch sand content for a specific location
data = {
  "ee_type": "raster",
  "collections": [
    {
      "collection": "users/hestiaplatform/T_SAND",
      "fields": "first"
    }
  ],
  "coordinates": [
    {
      "latitude": -11.77,
      "longitude": -45.7689
    }
  ]
}
result = run(data)
assert result == [81]

Metadata

Release files for hestia-earth-earth-engine 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hestia-earth-earth-engine 0.6.2
File Size Uploaded
hestia_earth_earth_engine-0.6.2.tar.gz 13.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hestia-earth-earth-engine 0.6.2
File Interpreter ABI Platform
hestia_earth_earth_engine-0.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 29.4 kB

Release files / hestia_earth_earth_engine-0.6.2.tar.gz

Download URL hestia_earth_earth_engine-0.6.2.tar.gz
Size 13.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5de3f96e63c189924bfe2ddbeb8069dd8adf206977b52bf32d2fcd3220754c76
BLAKE2b-256 checksum
How to use checksums
948f4b7521d0d22b033f1e9b7b74939751d8d0060f22a231b089af96fa34b543
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / hestia_earth_earth_engine-0.6.2-py3-none-any.whl

Download URL hestia_earth_earth_engine-0.6.2-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c0001bcd53d7365f21858a54912ba1c6481eb0d1196590ef7855c75fc77373b
BLAKE2b-256 checksum
How to use checksums
e12153b2da1adb5892e232d39a31d057ca6757ca1dbf0adc47da969aa63f3f4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.6.2 This release

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page