Coder Social home page Coder Social logo

hadley / spectralr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from olehprylutskyi/spectralr

0.0 1.0 0.0 11.66 MB

Spectral visual analysis of user-defined areas. Vignette: https://olehprylutskyi.github.io/spectralR/

License: GNU General Public License v3.0

R 100.00%

spectralr's Introduction

CRAN R-CMD-check Codecov test coverage

spectralR

Spectral reflectance visualisations for user-defined areas

See our vignette for detailed usage examples.

Authors: Oleh Prylutskyi, Vladimir Mikryukov, Dariia Shyriaieva

Description

This package provides tools for obtaining, processing, and visualization of satellite-derived spectral reflectance data for the user-defined polygons of earth surface classes, allowing to explore visually in which wavelengths the classes differ. Input should be a shapefile with polygons of surface classes (it might be polygons of different habitat types, crops, or any other things). We use Sentinel2 L2A satellite mission (only optical bands) as a source of spectral reflectance data, obtained through the Google Earth Engine service.

The workflow depends on rgee R package, which provides a bridge between R and Python API for Google Earth Engine. All the operations with satellite images run in a cloud, and the obtained pixel data is visualized locally afterward. Therefore, the most resource-hungry operations do not overload your local machine despite the extent of input data. But that means that you need a stable Internet connection for using API.

The overall workflow is following:

  1. Load the user’s ESRI shapefile containing polygons for user-defined surface classes, as well as the text or numerical field with classes names (labels).

  2. Apply rgee functionality to retrieve multi-band pixel data for classes polygons from the Google Earth Engine service.

  3. Visualize retrieved pixel data locally, mainly using ggplot2 approach.

Overall workflow

Essential requirements:

  • stable Internet connection (for using API)

  • Installed and correctly pre-configured Python environment (v. 3.5 or above)

  • valid Google Earth Engine account

Installation

Install the released version from CRAN

install.packages("spectralR")

You can install the development version of spectralR like so:

library(remotes)
install_github("olehprylutskyi/spectralR")

spectralR is strongly depends on rgee and sf packages, so install and configure them before installing spectralR. More details in the vignette.

Output examples

Spectral reflectance curves for user-defined set of habitat types

Reflectance per bands for user-defined set of habitat types

Density of values (as violin plots) for selected habitat types per band

References

Shyriaieva, D., Prylutskyi, O. (2021). Exploratory analysis of the spectral reflectance curves of habitat types: a case study on Southern Bug River valley, Ukraine. In: 63rd IAVS Annual Symposium: Book of Abstracts, p. 153.

spectralr's People

Contributors

driadash avatar olehprylutskyi avatar vmikk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.