Learn R Programming

rgee (version 1.1.5)

ee_Initialize: Authenticate and Initialize Earth Engine

Description

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

Usage

ee_Initialize(
  user = NULL,
  drive = FALSE,
  gcs = FALSE,
  credentials = "persistent",
  opt_url = NULL,
  cloud_api_key = NULL,
  http_transport = NULL,
  project = NULL,
  quiet = FALSE,
  ...
)

Value

No return value, called for initializing the earthengine-api.

Arguments

user

Character (optional, e.g. data.colec.fbf). The user argument is used to create a folder inside the path ~/.config/earthengine/ that save all the credentials for a specific Google identity.

drive

Logical (optional). If TRUE, the drive credential is cached in the path ~/.config/earthengine/.

gcs

Logical (optional). If TRUE, the Google Cloud Storage credential is cached in the path ~/.config/earthengine/.

credentials

OAuth2 credentials. 'persistent' (default) means use credentials already stored in the filesystem, or raise an explanatory exception guiding the user to create those credentials.

opt_url

The base url for the EarthEngine REST API to connect to.

cloud_api_key

An optional API key to use the Cloud API.

http_transport

The http transport method to use when making requests.

project

The client project ID or number to use when making API calls.

quiet

Logical. Suppress info messages.

...

Extra exporting argument. See ee_Authenticate.

Details

ee_Initialize() can manage Google Drive, and Google Cloud Storage resources using the R packages googledrive and googlecloudStorageR, respectively. By default, rgee does not require them. These are only necessary to enable rgee I/O functionality. All user credentials are saved in the directory ~/.config/earthengine/. If a user does not specify the "user" argument, all user credentials are saved in the the subdirectory ~/.config/earthengine/ndef.

See Also

Other session management functions: ee_user_info(), ee_users(), ee_version()

Examples

Run this code
if (FALSE) {
library(rgee)

# Simple init - Load just the Earth Engine credential
ee_Initialize()
ee_user_info()
}

Run the code above in your browser using DataLab