MODISTools

Interface to the MODIS Land Products Subsets Web Services

https://github.com/bluegreen-labs/modistools

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.5%) to scientific vocabulary

Keywords

api r-package remote-sensing rstats satellite-data
Last synced: 6 months ago · JSON representation

Repository

Interface to the MODIS Land Products Subsets Web Services

Basic Info
Statistics
  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
api r-package remote-sensing rstats satellite-data
Created about 3 years ago · Last pushed about 2 years ago
Metadata Files
Readme License

README.md

MODISTools

R build
status codecov Status Downloads DOI

Programmatic interface to the ‘MODIS Land Products Subsets’ web services. Allows for easy downloads of ‘MODIS’ time series directly to your R workspace or your computer. When using the package please cite the manuscript as referenced below. Keep in mind that the original manuscript describes versions prior to release 1.0 of the package. Functions described in this manuscript do not exist in the current package, please consult the documentation to find matching functionality.

Please cite the package in your work as:

Koen Hufkens. (2023). bluegreen-labs/MODISTools: MODISTools v1.1.5. Zenodo. https://doi.org/10.5281/zenodo.7551164

Installation

stable release

To install the current stable release use a CRAN repository:

r install.packages("MODISTools") library("MODISTools")

development release

To install the development releases of the package run the following commands:

r if(!require(remotes)){install.package("remotes")} remotes::install_github("bluegreen-labs/MODISTools") library("MODISTools")

Vignettes are not rendered by default, if you want to include additional documentation please use:

r if(!require(remotes)){install.package("remotes")} remotes::install_github("bluegreen-labs/MODISTools", build_vignettes = TRUE) library("MODISTools")

Use

Downloading MODIS time series

To extract a time series of modis data for a given location and its direct environment use the mt_subset() function.

detailed parameter description (click to expand)

| Parameter | Description | |-----------|---------------------------------------------------------------------------------------------------------------------------------| | product | a MODIS product | | band | a MODIS product band (if NULL all bands are downloaded) | | lat | latitude of the site | | lon | longitude of the site | | start | start year of the time series (data start in 1980) | | end | end year of the time series (current year - 2 years, use force = TRUE to override) | | internal | logical, TRUE or FALSE, if true data is imported into R workspace otherwise it is downloaded into the current working directory | | out_dir | path where to store the data when not used internally, defaults to tempdir() | | km_lr | force “out of temporal range” downloads (integer) | | km_ab | suppress the verbose output (integer) | | site_name | a site identifier | | site_id | a site_id for predefined locations (not required) | | progress | logical, TRUE or FALSE (show download progress) |

``` r

load the library

library(MODISTools)

download data

subset <- mtsubset(product = "MOD11A2", lat = 40, lon = -110, band = "LSTDay1km", start = "2004-01-01", end = "2004-02-01", kmlr = 1, kmab = 1, sitename = "testsite", internal = TRUE, progress = FALSE) print(str(subset)) ```

The output format is a tidy data frame, as shown above. When witten to a csv with the parameter internal = FALSE this will result in a flat file on disk.

Note that when a a region is defined using kmlr and kmab multiple pixels might be returned. These are indexed using the pixel column in the data frame containing the time series data. The remote sensing values are listed in the value column. When no band is specified all bands of a given product are returned, be mindful of the fact that different bands might require different multipliers to represent their true values. To list all available products, bands for particular products and temporal coverage see function descriptions below.

Batch downloading MODIS time series

When a large selection of locations is needed you might benefit from using the batch download function mt_batch_subset(), which provides a wrapper around the mt_subset() function in order to speed up large download batches. This function has a similar syntax to mt_subset() but requires a data frame defining site names (site_name) and locations (lat / lon) (or a comma delimited file with the same structure) to specify a list of download locations.

Below an example is provided on how to batch download data for a data frame of given site names and locations (lat / lon).

``` r

create data frame with a site_name, lat and lon column

holding the respective names of sites and their location

df <- data.frame("site_name" = paste("test",1:2)) df$lat <- 40 df$lon <- -110

test batch download

subsets <- mtbatchsubset(df = df, product = "MOD11A2", band = "LSTDay1km", internal = TRUE, start = "2004-01-01", end = "2004-02-01")

print(str(subsets)) ```

Listing products

To list all available products use the mt_products() function.

r products <- mt_products() head(products)

Listing bands

To list all available bands for a given product use the mt_bands() function.

r bands <- mt_bands(product = "MOD11A2") head(bands)

listing dates

To list all available dates (temporal coverage) for a given product and location use the mt_dates() function.

r dates <- mt_dates(product = "MOD11A2", lat = 42, lon = -110) head(dates)

References

Koen Hufkens. (2023). bluegreen-labs/MODISTools: MODISTools v1.1.5. Zenodo. https://doi.org/10.5281/zenodo.7551164

Acknowledgements

Original development was supported by the UK Natural Environment Research Council (NERC; grants NE/K500811/1 and NE/J011193/1), and the Hans Rausing Scholarship. Refactoring was supported through the Belgian Science Policy office COBECORE project (BELSPO; grant BR/175/A3/COBECORE). Logo design elements are taken from the FontAwesome library according to these terms, where the globe element was inverted and intersected.

Owner

  • Name: BlueGreen Labs
  • Login: bluegreen-labs
  • Kind: organization
  • Email: info@bluegreenlabs.org
  • Location: Melsele, Belgium

BlueGreen open science labs & consulting, providing environmental research infrastructure and editorial solutions.

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 38
  • Total Committers: 1
  • Avg Commits per committer: 38.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 18
  • Committers: 1
  • Avg Commits per committer: 18.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Koen Hufkens k****s@g****m 38

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 6
  • Total pull requests: 1
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 1 minute
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.83
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • khufkens (6)
Pull Request Authors
  • khufkens (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • cran 1,529 last-month
  • Total docker downloads: 62,285
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 17
    (may contain duplicates)
  • Total versions: 18
  • Total maintainers: 1
proxy.golang.org: github.com/bluegreen-labs/modistools
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/bluegreen-labs/MODISTools
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
cran.r-project.org: MODISTools

Interface to the 'MODIS Land Products Subsets' Web Services

  • Versions: 16
  • Dependent Packages: 2
  • Dependent Repositories: 17
  • Downloads: 1,529 Last month
  • Docker Downloads: 62,285
Rankings
Dependent repos count: 6.9%
Dependent packages count: 13.3%
Downloads: 14.3%
Average: 18.7%
Forks count: 28.0%
Stargazers count: 31.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 3.4 depends
  • httr * imports
  • jsonlite * imports
  • memoise * imports
  • sf * imports
  • sp * imports
  • stats * imports
  • terra * imports
  • utils * imports
  • covr * suggests
  • dplyr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • markdown * suggests
  • testthat * suggests
.github/workflows/deploy_docs.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite