-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add black-jupyter and nbstripout to pre-commit (#1915)
- Loading branch information
Showing
384 changed files
with
133,903 additions
and
125,154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,87 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"<a href=\"https://colab.research.google.com/github/gee-community/geemap/blob/master/examples/notebooks/00_ee_auth_colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a>\n", | ||
"\n", | ||
"\n", | ||
"## Earth Engine Automatic Authentication on Google Colab\n", | ||
"\n", | ||
"### Step 1: Locating the Earth Engine Token\n", | ||
"\n", | ||
"1. Locate the Earth Engine token on your computer by navigating to the following file path based on your operating system:\n", | ||
"\n", | ||
" - Windows: C:\\\\Users\\\\USERNAME\\\\.config\\\\earthengine\\\\credentials\n", | ||
" - Linux: /home/USERNAME/.config/earthengine/credentials\n", | ||
" - MacOS: /Users/USERNAME/.config/earthengine/credentials\n", | ||
"\n", | ||
"2. Open the credentials file and copy the entire content to the clipboard.\n", | ||
"\n", | ||
" **Note:** Ensure that you do not share the content of the credentials file with others to prevent unauthorized access to your Earth Engine account.\n", | ||
"\n", | ||
"### Step 2: Creating the Secret in Google Colab\n", | ||
"\n", | ||
"1. Open your Google Colab notebook and click on the `secrets` tab.\n", | ||
"2. Create a new secret with the name `EARTHENGINE_TOKEN`.\n", | ||
"3. Paste the content from the clipboard into the `Value` input box of the created secret.\n", | ||
"4. Toggle the button on the left to allow notebook access to the secret.\n", | ||
"\n", | ||
"![](https://i.imgur.com/Z9R08uU.png)\n", | ||
"\n", | ||
"### Step 3: Installing the Required Version of geemap\n", | ||
"\n", | ||
"Ensure that you have installed geemap version 0.29.3 or later, as only these versions support the automatic authentication feature." | ||
], | ||
"metadata": { | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"%pip install -U geemap" | ||
], | ||
"metadata": { | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"### Step 4: Automatic Authentication with geemap\n", | ||
"\n", | ||
"To automatically authenticate Earth Engine using the EARTHENGINE_TOKEN in your Google Colab notebook, run the following code:" | ||
], | ||
"metadata": { | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"import geemap" | ||
], | ||
"metadata": { | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"source": [ | ||
"m = geemap.Map()\n", | ||
"m" | ||
], | ||
"metadata": { | ||
}, | ||
"execution_count": null, | ||
"outputs": [] | ||
} | ||
], | ||
"metadata": { | ||
"colab": { | ||
"provenance": [] | ||
}, | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"name": "python3" | ||
} | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"<a href=\"https://colab.research.google.com/github/gee-community/geemap/blob/master/examples/notebooks/00_ee_auth_colab.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open in Colab\"/></a>\n", | ||
"\n", | ||
"\n", | ||
"## Earth Engine Automatic Authentication on Google Colab\n", | ||
"\n", | ||
"### Step 1: Locating the Earth Engine Token\n", | ||
"\n", | ||
"1. Locate the Earth Engine token on your computer by navigating to the following file path based on your operating system:\n", | ||
"\n", | ||
" - Windows: C:\\\\Users\\\\USERNAME\\\\.config\\\\earthengine\\\\credentials\n", | ||
" - Linux: /home/USERNAME/.config/earthengine/credentials\n", | ||
" - MacOS: /Users/USERNAME/.config/earthengine/credentials\n", | ||
"\n", | ||
"2. Open the credentials file and copy the entire content to the clipboard.\n", | ||
"\n", | ||
" **Note:** Ensure that you do not share the content of the credentials file with others to prevent unauthorized access to your Earth Engine account.\n", | ||
"\n", | ||
"### Step 2: Creating the Secret in Google Colab\n", | ||
"\n", | ||
"1. Open your Google Colab notebook and click on the `secrets` tab.\n", | ||
"2. Create a new secret with the name `EARTHENGINE_TOKEN`.\n", | ||
"3. Paste the content from the clipboard into the `Value` input box of the created secret.\n", | ||
"4. Toggle the button on the left to allow notebook access to the secret.\n", | ||
"\n", | ||
"![](https://i.imgur.com/Z9R08uU.png)\n", | ||
"\n", | ||
"### Step 3: Installing the Required Version of geemap\n", | ||
"\n", | ||
"Ensure that you have installed geemap version 0.29.3 or later, as only these versions support the automatic authentication feature." | ||
] | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%pip install -U geemap" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"### Step 4: Automatic Authentication with geemap\n", | ||
"\n", | ||
"To automatically authenticate Earth Engine using the EARTHENGINE_TOKEN in your Google Colab notebook, run the following code:" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import geemap" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"m = geemap.Map()\n", | ||
"m" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"colab": { | ||
"provenance": [] | ||
}, | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"name": "python3" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
Oops, something went wrong.