Getting Started with GEE
Code status: The code on this page was corrected on 17 September 2026 against the current Earth Engine Data Catalog and API documentation. It has not been executed against Earth Engine. Screenshots, printed values and described outputs come from earlier versions of this lesson and may differ from what the corrected code produces.
This module guides you through setting up your Google Earth Engine (GEE) account and getting started with the platform. It also covers the setup process for integrating GEE with Python, enabling you to leverage its capabilities within Python-based workflows. The process is easier for JavaScript than Python, which requires several additional steps and package installs.
Setting up an Account
Whether you’re using the JavaScript or Python API, Earth Engine access runs through a Google Cloud project that is registered for Earth Engine. Sign in with your Google account, then use the Earth Engine registration page to create a new Cloud project or choose an existing one and register it. Registration asks whether the project is for noncommercial or commercial use:
- Noncommercial use: complete the registration questionnaire to confirm the project’s eligibility. Noncommercial projects use the Community Tier by default, and no billing setup is required.
- Commercial use: register the project and choose a paid plan on its billing account.
The project must also have the Earth Engine API enabled, and your account needs permission to use the project. The Earth Engine access guide describes each step; according to that guide, access is enabled immediately after registration.
When signing up with an organizational or educational email account, there may be restrictions that will have to be handled by the account owner. This guidance may change as GEE’s authentication processes evolve.
Once the project is registered, you can access Google Earth Engine and start utilizing its powerful tools for geospatial analysis.
JavaScript
With JavaScript, you can get started immediately - as long as you are logged into the Google account you registered with, you can access the code editor and begin running scripts. A common issue is when users have multiple Google accounts and the account is incorrect.
Python setup
Setting up Python takes a little more effort - you have to:
- Install the Earth Engine library and
geemap(one-time per environment) - Authenticate your Earth Engine account (usually one-time per environment)
- Initialize the API with your registered Cloud project (every time you start a session)
In addition, we will be using the geemap package for visualization in conjunction with Earth Engine. geemap installs its own dependencies, so there is no separate dependency step.
In the terminal, run the following commands - we suggest creating a virtual environment.
Authenticate Earth Engine
Once the Earth Engine and geemap libraries are installed, you will need to authenticate your environment. This is theoretically a one-time event, although it might happen more frequently.
In the code chunk below, we import the GEE library and then authenticate. ee.Authenticate() chooses a sign-in flow for your environment: in Google Colab it uses Colab’s own authentication; in other Jupyter notebooks it opens a sign-in page that gives you a verification code to paste back into the notebook cell; elsewhere it opens a browser sign-in on your machine when a browser is available and no gcloud tool is installed, and otherwise delegates to gcloud. Make sure you sign in with the Google account that has access to your registered Cloud project. The older paste mode, which gave you a token to paste anywhere, is no longer available. The Earth Engine authentication guide lists the available modes.
Initialize Earth Engine
You have to initialize a session with the API every time you run a script, and the authentication guide says you must provide a Cloud project that you own or have permission to use, registered for Earth Engine with the Earth Engine API enabled. Pass that project’s ID as project. In the import section of your code, include the following to start using Earth Engine.
# Initialize Earth Engine
# use your registered Cloud project ID
Putting it together
The other Python pages in this track start from the block below. It authenticates if needed, initializes Earth Engine with your project, and defines the build_map() helper that those pages use to display layers with geemap.
# opens the sign-in flow when no stored credentials exist
# use your registered Cloud project ID
=
return