Learn R Programming

⚠️There's a newer version (1.1.7) of this package.Take me there.

Google Earth Engine for R

rgee is a bindings package for calling Google Earth Engine API from within R. Additionally, functions have been done for making painless the connection with the R spatial ecosystem.

What is Google Earth Engine?

Google Earth Engine is a cloud-based platform that allows users getting access to a petabyte-scale archive of remote sensing data and run geospatial analysis on Google’s infrastructure. Google currently just offers Python and JavaScript support.

Earth Engine Python API:

import ee
ee.Initialize()
image = ee.Image('CGIAR/SRTM90_V4')
image.bandNames().getInfo()
#> [u'elevation']

rgee:

library(rgee)
ee$Initialize()
image <- ee$Image('CGIAR/SRTM90_V4')
image$bandNames()$getInfo()
#> [1] "elevation"

TODO

  • Improve documentation.
  • Generate better examples.
  • py_help: Generate compressible documentation in an html format.
  • Unit testing

Features

NOTE: Access to Google Earth Engine is currently only available to registered users.

Installation

Install development versions from github with

remotes::install_git("csaybar/rgee")

Windows

Before install rgee be sure that Rtools is installed in the system. The static libraries will automatically downloaded from rwinlib.

Linux

Please install the follow system libraries.

Ubuntu

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler libv8-3.14-dev libjq-dev libudunits2-dev libproj-dev libgeos-dev libspatialite-dev libgdal-dev libjson-c-dev libnetcdf-dev netcdf-bin

MacOS

Use Homebrew to install system libraries:

brew install pkg-config
brew install gdal
brew install netcdf
brew install libgit2
brew install udunits
brew install curl
brew install sqlite

Docker image (Recommended way to use rgee)

docker run -d -p 8787:8787 -e USER=rgee -e PASSWORD=rgee --name rgee-dev csaybar/rgee

After that, in your preferred browser, run:

127.0.0.1:8787

How does it works?

Credits

The rgee has been inspired by the following third-party R/Python packages:

Contributing

Copy Link

Version

Install

install.packages('rgee')

Monthly Downloads

1,754

Version

0.1.0

License

Apache License (>= 2.0)

Issues

Pull Requests

Stars

Forks

Maintainer

Cesar Aybar

Last Published

September 27th, 2023

Functions in rgee (0.1.0)

ee_extract

Extract values for EE ImageCollections objects
ee_as_thumbnail

Create a stars object based on an EE thumbnail image
ee_download_drive

Move Earth Engine (EE) results from Google Drive to Hard disk
ee_install-tools

Interface to install non-R rgee dependencies
ee_check-tools

Interface to check Python and non-R rgee dependencies
ee_Initialize

Authenticate and Initialize Earth Engine
ee_get_earthengine_path

Get the path where rgee save the credentials
ee_download_gcs

Move EE results from Google Cloud Storage to Hard disk
ee_as_sf

Convert an EE table in a sf object
ee_upload

Upload sf or stars objects into a GEE asset
%>%

Pipe operator
ee_upload_file_to_gcs

Upload local files to google cloud storage
rgee-package

rgee: R bindings for calling the Earth Engine API
sf_as_ee

Convert an sf object to EE object
ee_manage-tools

Interface for manage the Earth Engine Asset
ee_monitoring

Monitoring Earth Engine task progress
ee_map

Adds a given Earth Engine (EE) spatial object to mapview as a layer.
+,mapview,mapview-method

mapview + mapview; adds data from the second map to the first
ee_py_to_r

Convert between Python and R objects
ee_print

Print and return metadata about Spatial Earth Engine Objects
ee_reattach

Reattach ee as a reserved word
ee_search-tools

Interface to search into the Earth Engine Data Catalog