Skip to main content

Pulls data from Google Earth Engine, syncs it to Google Drive, and downloads files.

Project description

Project Summary

Earth-Engine-Wildfire-Data is a Python command-line utility and library for extracting and transforming wildfire-related geospatial data from Google Earth Engine. It supports:

  • Access to MODIS, VIIRS, GRIDMET, and other remote sensing datasets.

  • Filtering wildfire perimeters by date, size, and region.

  • Combining daily and final fire perimeters.

  • Generating YAML config files for use in simulation or prediction tools.

  • Command-line configurability with persistent YAML-based settings.

  • This tool is intended for researchers, data scientists, or modelers working with wildfire data pipelines, particularly those interested in integrating Earth Engine datasets into geospatial ML workflows.

  • The Trello page contains the current development status.

Prerequisite

Requires at least python 3.10.

As of mid-2023, Google Earth Engine access must be linked to a Google Cloud Project, even for free/non-commercial usage. So sign up for a non-commercial earth engine account.

🔐 Google API Setup Instructions

To run this project with Google Earth Engine and Google Drive access, follow the steps below to create and configure your credentials.


Step 1. Create a Google Cloud Project

  • Go the Google Cloud Console.
  • Click the project drop-down (top bar) -> New Project.
  • Name your project (eg., ee-wildfire) and click Create.

Step 2. Enable Required APIs

Step 3. Create a Service Account

  • In the left sidebar: IAM & AdminService Accounts.
  • Click + Create Service Account.
  • Name it (e.g., wildfire-access) and click Create and Continue.
  • Assign the following roles to the service account:
    • Owner
    • Service Usage Admin
    • Service Usage Consumer
    • Storage Admin
    • Storage Object Creator
  • On the list, find your service account → Click Actions (⋮)Manage keys.
  • Under Keys, click Add Key → Create new key → JSON.
  • Save the downloaded JSON file somewhere safe (e.g., service_account.json).

Step 4. Share Google Drive Folder

If your code needs to read/write to Google Drive:

  • Create a folder in Google Drive.
  • Right-click → Share.
  • Share it with your service account email (e.g., your-sa@your-project.iam.gserviceaccount.com).
  • Grant Editor permission.

Install Instructions

For the stable build:

pip install ee-wildfire

For the experimental build:

git clone git@github.com:KylesCorner/Earth-Engine-Wildfire-Data.git
cd Earth-Engine-Wildfire-Data
pip install -e .

Configuration

This program uses a YAML file for user configuration.

Template for configuration:

# NEEDED

# You need a google cloud service account JSON, if not provided here the program
# will prompt you for one
credentials: ~/ee_wildfire_data/OAuth/credentials.json

# OPTIONAL
# These items have default values if not provided in YAML file.

# Fire query
min_size: 10000000.0

max_size: 1000000000.0

start_date: 2021-01-01 00:00:00

end_date: 2021-04-20 00:00:00

# Directories
tiff_dir: ~/ee_wildfire_data/tiff

data_dir: ~/ee_wildfire_data

log_dir : ~/ee_wildfire_data/logs

google_drive_dir: GoogleEarthEngine

# Pipeline
purge_before: false

download: false

export: false

retry_failed: false

purge_after: false

# Logs
no_log: false

log_level: info # levels: debug, info, warn, error

# Misc
silent: false

To finish configuration you will need to use the -config command line argument.

Command-Line Interface (CLI)

You can also edit configuration on the fly with command line arguments:

Argument Parameters Description
--version None Show current version.
--config PATH Path to YAML config file. Overrides all other command-line arguments.
--export None Export data from Google Earth Engine to Google Drive.
--download None Download data from Google Drive to your local machine.
--show-config None Show user configuration.
--credentials PATH Path to Google authentication .json service account file.
--data-dir PATH Path to output data directory on your local machine.
--tiff-dir PATH Path where downloaded .tif files are stored.
--google-drive-dir str Name of your Google Drive folder for exporting.
--min-size float Minimum size of fire area to detect (in hectares).
--max-size float Maximum size of fire area to detect (in hectares).
--retry-failed None Retry failed Earth Engine locations.
--purge-before None Purge files from Google Drive before exporting new data.
--purge-after None Purge files from Google Drive after downloading.
--start-date datetime Starting date for Earth Engine query (e.g., 2020-01-01).
--end-date datetime Ending date for Earth Engine query (e.g., 2020-12-31).
--silent None No command line output.
--reset_config None Resets internal YAML file to default values.
--no-log None Disable logging.
--log-dir PATH Directory where you want your logs files stored.
--log-level 'debug', 'info', 'warn', or 'error' Sets the level of verbosity for log files.

Basic Usage

ee-wildfire --config /path/to/some/config.yml
ee-wildfire --credentials PATH_TO_CREDS --export --download --min-size 10 --log-level warn

Acknowledgements

This project builds on work from the WildfireSpreadTSCreateDataset. Credit to original authors for providing data, methods, and insights.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ee_wildfire-2025.6.14.tar.gz (243.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ee_wildfire-2025.6.14-py3-none-any.whl (268.2 kB view details)

Uploaded Python 3

File details

Details for the file ee_wildfire-2025.6.14.tar.gz.

File metadata

  • Download URL: ee_wildfire-2025.6.14.tar.gz
  • Upload date:
  • Size: 243.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for ee_wildfire-2025.6.14.tar.gz
Algorithm Hash digest
SHA256 baa4dc02ab94f1900a1602b36d1a9fc89c82106def73ecb439aa8e4d120caca0
MD5 692dfa2c59a92d0ac024da53dd757a18
BLAKE2b-256 ac3ddb2062005dc882a66c14fbaecbc2bbd8a0d727b0fd3f018248dbdee7d760

See more details on using hashes here.

File details

Details for the file ee_wildfire-2025.6.14-py3-none-any.whl.

File metadata

  • Download URL: ee_wildfire-2025.6.14-py3-none-any.whl
  • Upload date:
  • Size: 268.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for ee_wildfire-2025.6.14-py3-none-any.whl
Algorithm Hash digest
SHA256 18c72c7cc8849f508a6f194e3fe4232f1457f05cbf5a19ae876a618a0349a2a4
MD5 f1d48ec35dd14b0c2fb8e0ac41164bae
BLAKE2b-256 8306d09d6b5ce1c81a2ff84a5d73fcdbf05f34f6121271c4ac9c31d64f5eb470

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page