Description Usage Arguments Value Examples
View source: R/Earth_Imagery.R
This function retrieves the Landsat 8 image for the supplied location and date. The response will include the date and URL to the image that is closest to the supplied date. The requested resource may not be available for the exact date in the request.
1 2 3 | Earth_Imagery(key = Sys.getenv("NASA_TOKEN"), lat, lon, dim = 0.025,
date = Sys.Date(), cloud_score = FALSE,
download_filename = "img.png")
|
key |
String. Your NASA API key, you can enter your key in the function parameter, but it's not recommended. Instead, you'd better save your key in R environment and call it "NASA_TOKEN". Then the function would automatically acquire your key info. |
lat |
Float. Latitude of the location. |
lon |
Float. Longitude of the location. |
dim |
Float. Width and height of image in degrees. 0.025 as default. |
date |
Date. Date of image; if not supplied, then the most recent image (i.e., closest to today) is returned. Today as default. |
cloud_score |
Boolean. Calculate the percentage of the image covered by clouds. FALSE as default. If False is supplied, then no keypair is returned. If True is supplied, then a keypair will always be returned, even if the backend algorithm is not able to calculate a score. Note that this is a rough calculation, mainly used to filter out exceedingly cloudy images. |
download_filename |
String. Filename of downloaded image. "img.png" as default. |
A Landsat 8 imagery and its date.
1 | Earth_Imagery(lon = 100.75, lat = 1.5, date = as.Date("2014-02-01"), cloud_score = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.