Skip to contents

Initializes the rpygee session by setting the Python environment (optional) and authenticating and initializing a connection to Google Earth Engine.

Usage

activate_rpygee(
  project_id = "spatialgeography",
  python_path = NULL,
  auth_mode = "notebook"
)

Arguments

project_id

A Google Cloud Platform (GCP) project ID to associate with the GEE session. Defaults to "spatialgeography".

python_path

Optional. The full path to the Python executable in the desired environment. If `NULL` (the default), `reticulate` will attempt to find a suitable Python environment on its own.

auth_mode

The authentication mode to use, e.g., 'notebook' or 'gcloud'.

Examples

if (FALSE) { # \dontrun{
# Example 1: Initialize GEE with default project ID
activate_rpygee(project_id = "spatialgeography")

# Example 2: Initialize GEE and specify the exact Python environment to use
py_env_path <- "C:/Users/pulak/anaconda3/envs/maps/python.exe"
activate_rpygee(project_id = "spatialgeography", python_path = py_env_path)
} # }