Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/r-earthengine/rgeeextra
Extension for rgee
https://github.com/r-earthengine/rgeeextra
rgee
Last synced: about 1 month ago
JSON representation
Extension for rgee
- Host: GitHub
- URL: https://github.com/r-earthengine/rgeeextra
- Owner: r-earthengine
- License: other
- Created: 2021-04-02T10:48:18.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-11-23T14:20:18.000Z (about 1 year ago)
- Last Synced: 2024-11-11T23:37:21.679Z (about 2 months ago)
- Topics: rgee
- Language: Python
- Homepage: https://r-earthengine.github.io/rgeeExtra/
- Size: 13.3 MB
- Stars: 41
- Watchers: 4
- Forks: 6
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
rgeeExtra: An Extension for rgee
Simplifies the interaction with the GEE API making it more R-like. Popular third-party GEE algorithms are made available to R users
• Installation
• How does it work?
• Example
• Code of conduct
• Contributing
• Citation
• Credits## **Why rgeeExtra is needed?** 🤔
The goal of rgeeExtra is to enhance the user experience ⚡ of Google Earth Engine (GEE) 🌐 for R enthusiasts by simplifying its syntax. While GEE's primary language is JavaScript, which diverges from R's structure, rgeeExtra serves as a bridge 🌉, offering R users a suite of tools and functions to navigate GEE's complexity with ease. This extension elevates R interaction with GEE through high-level 📈 abstractions and tailored functions, all adapted from the JavaScript API.
Python (ee)
R (rgee)
R (rgee + rgeeExtra)
``` python
import ee
ee.Initialize()
db = 'CGIAR/SRTM90_V4'
image = ee.Image(db)
image.bandNames().getInfo()
#> [u'elevation']
`````` r
library(rgee)
ee_Initialize()
db <- 'CGIAR/SRTM90_V4'
image <- ee$Image(db)
image$bandNames()$getInfo()
#> [1] "elevation"
`````` r
library(rgee)
library(rgeeExtra)ee_Initialize()
extra_Initialize()image <- ee$Image$Dataset$CGIAR_SRTM90_V4
names(image)
#> [1] "elevation"
```## **Installation** 🚀
You can install rgeeExtra from [GitHub](https://github.com/r-earthengine/rgeeExtra) with:
``` r
remotes::install_github("r-earthengine/rgeeExtra")
```For additional details on connecting GEE and R, refer to the documentation provided [here](https://github.com/r-spatial/rgee#installation). To set up an account, click [here](https://earthengine.google.com/signup/).
## **How does it work?️** 🛠
The rgeeExtra extends the following Earth Engine classes:
- [ee\$Geometry](https://developers.google.com/earth-engine/guides/geometries)
- [ee\$Feature](https://developers.google.com/earth-engine/guides/features)
- [ee\$FeatureCollection](https://developers.google.com/earth-engine/guides/feature_collections)
- [ee\$Image](https://developers.google.com/earth-engine/guides/image_overview)
- [ee\$ImageCollection](https://developers.google.com/earth-engine/guides/ic_creating)rgeeExtra develops and maintains new methods and constructors that extend the most popular GEE classes (e.g., `ee$Feature$Extra\_...`). All third-party methods implemented by rgeeExtra start with `Extra\_.` To learn more about all the functionalities that rgeeExtra offers, please refer to the article [Features](https://r-earthengine.com/rgeeExtra/articles/) for additional information.
## **Example** 💡
Look at this simple example to estimate the NDVI from a Landsat-8 Surface Reflectance image.
With [**rgee**](https://github.com/r-spatial/rgee):
``` r
# Load 'rgee' and initialize GEE
library(rgee)
ee_Initialize()# Compute squared NDVI from Landsat 8 image
img <- ee$Image("LANDSAT/LC08/C02/T1_L2/LC08_007067_20140822")$
normalizedDifference(c("SR_B5", "SR_B4"))$
pow(2)# Visualize squared NDVI on map
Map$centerObject(img)
Map$addLayer(
eeObject = img,
visParams = list(
min = 0,
max = 0.2,
palette = c("brown", "yellow", "green")
),
name = "Squared NDVI")
```With [**rgeeExtra**](https://github.com/r-earthengine/rgeeExtra):
``` r
# Load 'rgee' and initialize GEE
library(rgee)
library(rgeeExtra)ee_Initialize()
extra_Initialize()# Compute squared NDVI from Landsat 8 image
img <- ee$Image("LANDSAT/LC08/C02/T1_L2/LC08_007067_20140822")
ndvi <- ((img[["SR_B5"]] - img[["SR_B4"]]) / (img[["SR_B5"]] + img[["SR_B4"]])) ** 2
names(ndvi) <- "NDVI"# Visualize squared NDVI on map
Map$centerObject(ndvi)
Map$addLayer(
eeObject = ndvi,
visParams = list(
min = 0,
max = 0.2,
palette = c("brown", "yellow", "green")
),
name = "Squared NDVI"
)
```## **Code of Conduct** 📜
Please note that the `rgeeExtra` project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this project, you agree to abide by its terms.
## **Contributing Guide** 🤝
👍 Thanks for taking the time to contribute! 🎉👍 Please review our [Contributing Guide](CONTRIBUTING.md).
## **Share the love** ❤️
Think **rgeeExtra** is useful? Let others discover it, by telling them in person via Twitter or a blog post.
Using **rgeeExtra** for a paper you are writing? Consider citing it
``` r
citation("rgeeExtra")
To cite rgee in publications use:
C Aybar, Q Wu, L Bautista, R Yali and A Barja (2020) rgee: An R
package for interacting with Google Earth Engine Journal of Open
Source Software URL https://github.com/r-spatial/rgee/.A BibTeX entry for LaTeX users is
@Article{,
title = {rgee: An R package for interacting with Google Earth Engine},
author = {Cesar Aybar and Quisheng Wu and Lesly Bautista and Roy Yali and Antony Barja},
journal = {Journal of Open Source Software},
year = {2020},
}
```## **Credits** 👏
We would like to mention the following third-party R/Python packages for contributing indirectly to the improvement of rgeeExtra:
- [**eemont - David Montero Loaiza**](https://github.com/davemlz/eemont)