MODISTools
Interface to the MODIS Land Products Subsets Web Services.
https://github.com/bluegreen-labs/MODISTools
Category: Sustainable Development
Sub Category: Environmental Satellites
Keywords
api r-package remote-sensing rstats satellite-data
Last synced: about 14 hours ago
JSON representation
Repository metadata
Interface to the MODIS Land Products Subsets Web Services
- Host: GitHub
- URL: https://github.com/bluegreen-labs/MODISTools
- Owner: bluegreen-labs
- License: other
- Created: 2023-01-07T17:29:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T09:40:50.000Z (about 1 year ago)
- Last Synced: 2025-04-17T20:39:39.916Z (9 days ago)
- Topics: api, r-package, remote-sensing, rstats, satellite-data
- Language: R
- Homepage: https://bluegreen-labs.github.io/MODISTools/
- Size: 1.22 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
MODISTools
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:
install.packages("MODISTools")
library("MODISTools")
development release
To install the development releases of the package run the following
commands:
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:
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.
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) |
# load the library
library(MODISTools)
# download data
subset <- mt_subset(product = "MOD11A2",
lat = 40,
lon = -110,
band = "LST_Day_1km",
start = "2004-01-01",
end = "2004-02-01",
km_lr = 1,
km_ab = 1,
site_name = "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 km_lr and km_ab 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).
# 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 <- mt_batch_subset(df = df,
product = "MOD11A2",
band = "LST_Day_1km",
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.
products <- mt_products()
head(products)
Listing bands
To list all available bands for a given product use the mt_bands()
function.
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.
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 metadata
- Name: BlueGreen Labs
- Login: bluegreen-labs
- Email: [email protected]
- Kind: organization
- Description: BlueGreen open science labs & consulting, providing environmental research infrastructure and editorial solutions.
- Website: http://bluegreenlabs.org
- Location: Melsele, Belgium
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/65854203?v=4
- Repositories: 17
- Last ynced at: 2023-03-09T08:10:34.683Z
- Profile URL: https://github.com/bluegreen-labs
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Committers metadata
Last synced: 6 days ago
Total Commits: 38
Total Committers: 1
Avg Commits per committer: 38.0
Development Distribution Score (DDS): 0.0
Commits in past year: 18
Committers in past year: 1
Avg Commits per committer in past year: 18.0
Development Distribution Score (DDS) in past year: 0.0
Name | Commits | |
---|---|---|
Koen Hufkens | k****s@g****m | 38 |
Committer domains:
Issue and Pull Request metadata
Last synced: 1 day ago
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 request: 1
Bot issues: 0
Bot pull requests: 0
Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- khufkens (6)
Top Pull Request Authors
- khufkens (1)
Top Issue Labels
Top Pull Request Labels
Package metadata
- Total packages: 1
-
Total downloads:
- cran: 1,293 last-month
- Total docker downloads: 62,285
- Total dependent packages: 2
- Total dependent repositories: 17
- Total versions: 16
- Total maintainers: 1
cran.r-project.org: MODISTools
Interface to the 'MODIS Land Products Subsets' Web Services
- Homepage: https://github.com/bluegreen-labs/MODISTools
- Documentation: http://cran.r-project.org/web/packages/MODISTools/MODISTools.pdf
- Licenses: AGPL-3
- Latest release: 1.1.5 (published over 1 year ago)
- Last Synced: 2025-04-25T11:31:58.060Z (1 day ago)
- Versions: 16
- Dependent Packages: 2
- Dependent Repositories: 17
- Downloads: 1,293 Last month
- Docker Downloads: 62,285
-
Rankings:
- Dependent repos count: 6.931%
- Dependent packages count: 13.3%
- Downloads: 14.332%
- Average: 18.733%
- Forks count: 28.019%
- Stargazers count: 31.085%
- Maintainers (1)
Dependencies
- 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
- actions/checkout v3 composite
- actions/upload-artifact v3 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- 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
- 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
Score: 11.753500206494106