Signs in to Google Earth Engine with your own Google account and saves your project ID, so later R sessions connect on their own. Run it once per machine; running it again when already connected does nothing.
Arguments
- project
Earth Engine (Google Cloud) project ID, for example
"my-ee-project". IfNULL, the saved project is used, or you are asked for one.- force
If
TRUE, sign in again even if valid credentials exist.- auth_mode
Earth Engine sign-in flow, passed to
ee.Authenticate(). LeaveNULLto use"localhost"(a browser click) where a browser is available and"notebook"(paste a code) where it is not."gcloud"uses the gcloud command-line tool.
Details
You need a free Earth Engine account first: register at
https://earthengine.google.com/signup/. Earth Engine is free for
noncommercial, research, education and nonprofit use, and registration gives
you the Cloud project ID to pass as project.
Signing in opens your browser, where you click Allow. The Earth
Engine client stores the resulting credentials in its own configuration
folder, as it does for every tool that uses Earth Engine. AlphaSDM saves only
the project ID, in tools::R_user_dir("AlphaSDM", "config").
The Earth Engine Python client (earthengine-api) is provided through
reticulate, which sets up a Python environment for it the first time
it is needed, unless you have pointed reticulate at a Python of your own.