ee_viz | R Documentation |
This function allows users to quickly view a previously created get_*() object or ee.image.Image.
ee_viz(x, ...) ## S3 method for class 'ee.image.Image' ee_viz( x, scale = 1000, geom = NULL, band = NULL, palette = hcl.colors(11, "RdBu"), range = NULL, gamma = NULL, opacity = NULL, ... ) ## S3 method for class 'exploreList' ee_viz( x, scale = 1000, band = NULL, palette = hcl.colors(11, "RdBu"), range = NULL, gamma = NULL, opacity = NULL, ... )
x |
A previously created get_* object or ee.image.Image |
... |
extra args to pass on |
scale |
A |
geom |
A sf object to use as 'aoi/geom' for an 'ee.image.Image'. |
band |
A |
palette |
|
range |
|
gamma |
|
opacity |
|
A leaflet map.
This function uses a scale argument which is used to generate a min and max value for viewing. Because this uses getInfo(), it can take a while depending on the scale. Since this is used for viewing, I would suggest to go bigger on the scale. If a user selects more than one band, the 'up-to' three bands will be overlayed like earth engine.
## Not run: # Load Libraries library(rgee) ee_Initialize() library(exploreRGEE) # Bring in data huc <- exploreRGEE::huc ld8 <- get_landsat(huc, method = 'ld8', startDate = '2014-01-01', endDate = '2018-12-31', c.low = 6, c.high = 11) ld8 %>% ee_viz(scale = 30, band = 'NDVI', palette = 'RdYlGn') # or without scale, when min and max are used scale is irrelevant. ld8 %>% ee_viz(min = 0, max = 1, band = 'NDVI', palette = 'RdYlGn') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.