Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readme #5

Open
joshualerickson opened this issue Dec 31, 2021 · 1 comment
Open

readme #5

joshualerickson opened this issue Dec 31, 2021 · 1 comment

Comments

@joshualerickson
Copy link

Hey @csaybar great work as always! I noticed a few things when I started working with the package in regards to the Readme and thought I'd give a shout. Just a few things with the example. So nice to be able to index now and use the operators! Take care.

library(rgee)

ee_Initialize()

img <- ee$Image("LANDSAT/LC08/C01/T1_SR/LC08_038029_20180810")
ndvi <- (img[["B5"]] - img[["B4"]])/(img[["B5"]] + img[["B4"]])**2
names(ndvi) <- "pow_ndvi"

Map$centerObject(img,zoom=12)
Map$addLayer(img)

potential edits

library(rgee)
library(rgeeExtra) #add library call

ee_Initialize()

img <- ee$Image("LANDSAT/LC08/C01/T1_SR/LC08_038029_20180810")
ndvi <- (img[["B5"]] - img[["B4"]])/(img[["B5"]] + img[["B4"]])**2
names(ndvi) <- "pow_ndvi"

# here just add ndvi instead of image and also some visParams for the image with power.
Map$centerObject(ndvi,zoom=12)
Map$addLayer(ndvi, visParams = list(min = -0.001, max = 0.001)
@csaybar
Copy link
Member

csaybar commented Jan 2, 2022

Hi @joshualerickson, thank you for the example and reminder :D. Next weekend we will try to get everything ready 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants