Learn R Programming

rgee (version 0.2.0)

ee_Initialize: Authenticate and Initialize Earth Engine

Description

Authorize rgee to manage Earth Engine resource, Google Drive and Google Cloud Storage. The ee_initialize() via web-browser asked to sign in to your Google account and allows you to grant permission to manage resources. This function is a wrapper around rgee::ee$Initialize().

Usage

ee_Initialize(email = NULL, drive = FALSE, gcs = FALSE,
  quiet = FALSE)

Arguments

email

Character (optional, e.g. data.colec.fbf@gmail.com). The email name is used as a folder inside the path rgee::ee_get_earthengine_path(). This enable a multi-user support allowing to target a specific Google identity.

drive

Logical (optional). If TRUE the drive credential will be cached in the path rgee::ee_get_earthengine_path().

gcs

logical. If TRUE the Google Cloud Storage credential will be cached in the path rgee::ee_get_earthengine_path().

quiet

logical. Suppress info messages.

Details

ee_Initialize(...) can also manage Google drive and Google Cloud Storage resources using the R packages googledrive and googlecloudStorageR respectively. By default, rgee does not need to them, these are just necessary for export and import tasks. All the user credentials are saved in directory ~/.config/earthengine/, if a user does not specified the the email argument all user credentials will be saved in a subdirectory called ndef.

See Also

remove credential function: ee_remove_credentials

Examples

Run this code
# NOT RUN {
library(rgee)
ee_reattach() # reattach ee as a reserved word
#ee_user_info()

# Simple init
ee_Initialize()

# Advanced init
expr <- ee_Initialize(
  email = "data.colec.fbf@gmail.com",
  drive = TRUE,
  gcs = TRUE
)
ee_user_info()

# }

Run the code above in your browser using DataLab