Learn R Programming

nasadata (version 0.9.0)

earth_image: Fetches image from Earth Imagery API

Description

Calls NASA's Earth Imagery API and returns list with identification information and image.

Usage

earth_image(key, lon, lat, date, cloud_score = TRUE, plot = FALSE, meta_only = FALSE)

Arguments

key
Key for API authentication.
lon
Longitud of coordinate position.
lat
Latitud of coordinate position.
date
In YYYY-MM-DD format. The API wil return the image that is closest to this date.
cloud_score
Gives a score of percentage of cloud cover, via algorithm (see official documentation). Defaults to TRUE.
plot
If TRUE will plot the image via generic plot function.
meta_only
if TRUE will only download the meta data for the image.

Examples

Run this code
## Not run: 
# key <- "123key"
# img <- earth_image(key, -100.31008, 25.66779, "2016-01-01")
# ## End(Not run)

Run the code above in your browser using DataLab