Skip to content

Commit

Permalink
Updated template
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Feb 15, 2020
1 parent f5a888d commit 4cbe3c5
Show file tree
Hide file tree
Showing 594 changed files with 11,192 additions and 6,206 deletions.
26 changes: 16 additions & 10 deletions Algorithms/CloudMasking/landsat457_surface_reflectance.ipynb

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions Algorithms/CloudMasking/landsat457_surface_reflectance.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
'''
## Install Earth Engine API
Install the [Earth Engine Python API](https://developers.google.com/earth-engine/python_install) and [geehydro](https://github.com/giswqs/geehydro). The **geehydro** Python package builds on the [folium](https://github.com/python-visualization/folium) package and implements several methods for displaying Earth Engine data layers, such as `Map.addLayer()`, `Map.setCenter()`, `Map.centerObject()`, and `Map.setOptions()`.
The magic command `%%capture` can be used to hide output from a specific cell. Uncomment these lines if you are running this notebook for the first time.
The following script checks if the geehydro package has been installed. If not, it will install geehydro, which automatically install its dependencies, including earthengine-api and folium.
'''


# %%
# %%capture
# !pip install earthengine-api
# !pip install geehydro
import subprocess

try:
import geehydro
except ImportError:
print('geehydro package not installed. Installing ...')
subprocess.check_call(["python", '-m', 'pip', 'install', 'geehydro'])

# %%
'''
Expand All @@ -33,14 +37,16 @@

# %%
'''
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once. Uncomment the line `ee.Authenticate()`
if you are running this notebook for the first time or if you are getting an authentication error.
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once.
'''


# %%
# ee.Authenticate()
ee.Initialize()
try:
ee.Initialize()
except Exception as e:
ee.Authenticate()
ee.Initialize()

# %%
'''
Expand Down
26 changes: 16 additions & 10 deletions Algorithms/CloudMasking/landsat8_surface_reflectance-copy.ipynb

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions Algorithms/CloudMasking/landsat8_surface_reflectance-copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
'''
## Install Earth Engine API
Install the [Earth Engine Python API](https://developers.google.com/earth-engine/python_install) and [geehydro](https://github.com/giswqs/geehydro). The **geehydro** Python package builds on the [folium](https://github.com/python-visualization/folium) package and implements several methods for displaying Earth Engine data layers, such as `Map.addLayer()`, `Map.setCenter()`, `Map.centerObject()`, and `Map.setOptions()`.
The magic command `%%capture` can be used to hide output from a specific cell. Uncomment these lines if you are running this notebook for the first time.
The following script checks if the geehydro package has been installed. If not, it will install geehydro, which automatically install its dependencies, including earthengine-api and folium.
'''


# %%
# %%capture
# !pip install earthengine-api
# !pip install geehydro
import subprocess

try:
import geehydro
except ImportError:
print('geehydro package not installed. Installing ...')
subprocess.check_call(["python", '-m', 'pip', 'install', 'geehydro'])

# %%
'''
Expand All @@ -33,14 +37,16 @@

# %%
'''
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once. Uncomment the line `ee.Authenticate()`
if you are running this notebook for the first time or if you are getting an authentication error.
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once.
'''


# %%
# ee.Authenticate()
ee.Initialize()
try:
ee.Initialize()
except Exception as e:
ee.Authenticate()
ee.Initialize()

# %%
'''
Expand Down
26 changes: 16 additions & 10 deletions Algorithms/CloudMasking/landsat8_toa_reflectance_qa_band.ipynb

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions Algorithms/CloudMasking/landsat8_toa_reflectance_qa_band.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
'''
## Install Earth Engine API
Install the [Earth Engine Python API](https://developers.google.com/earth-engine/python_install) and [geehydro](https://github.com/giswqs/geehydro). The **geehydro** Python package builds on the [folium](https://github.com/python-visualization/folium) package and implements several methods for displaying Earth Engine data layers, such as `Map.addLayer()`, `Map.setCenter()`, `Map.centerObject()`, and `Map.setOptions()`.
The magic command `%%capture` can be used to hide output from a specific cell. Uncomment these lines if you are running this notebook for the first time.
The following script checks if the geehydro package has been installed. If not, it will install geehydro, which automatically install its dependencies, including earthengine-api and folium.
'''


# %%
# %%capture
# !pip install earthengine-api
# !pip install geehydro
import subprocess

try:
import geehydro
except ImportError:
print('geehydro package not installed. Installing ...')
subprocess.check_call(["python", '-m', 'pip', 'install', 'geehydro'])

# %%
'''
Expand All @@ -33,14 +37,16 @@

# %%
'''
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once. Uncomment the line `ee.Authenticate()`
if you are running this notebook for the first time or if you are getting an authentication error.
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once.
'''


# %%
# ee.Authenticate()
ee.Initialize()
try:
ee.Initialize()
except Exception as e:
ee.Authenticate()
ee.Initialize()

# %%
'''
Expand Down
26 changes: 16 additions & 10 deletions Algorithms/CloudMasking/modis_surface_reflectance_qa_band.ipynb

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions Algorithms/CloudMasking/modis_surface_reflectance_qa_band.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
'''
## Install Earth Engine API
Install the [Earth Engine Python API](https://developers.google.com/earth-engine/python_install) and [geehydro](https://github.com/giswqs/geehydro). The **geehydro** Python package builds on the [folium](https://github.com/python-visualization/folium) package and implements several methods for displaying Earth Engine data layers, such as `Map.addLayer()`, `Map.setCenter()`, `Map.centerObject()`, and `Map.setOptions()`.
The magic command `%%capture` can be used to hide output from a specific cell. Uncomment these lines if you are running this notebook for the first time.
The following script checks if the geehydro package has been installed. If not, it will install geehydro, which automatically install its dependencies, including earthengine-api and folium.
'''


# %%
# %%capture
# !pip install earthengine-api
# !pip install geehydro
import subprocess

try:
import geehydro
except ImportError:
print('geehydro package not installed. Installing ...')
subprocess.check_call(["python", '-m', 'pip', 'install', 'geehydro'])

# %%
'''
Expand All @@ -33,14 +37,16 @@

# %%
'''
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once. Uncomment the line `ee.Authenticate()`
if you are running this notebook for the first time or if you are getting an authentication error.
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once.
'''


# %%
# ee.Authenticate()
ee.Initialize()
try:
ee.Initialize()
except Exception as e:
ee.Authenticate()
ee.Initialize()

# %%
'''
Expand Down
26 changes: 16 additions & 10 deletions Algorithms/CloudMasking/sentinel-2.ipynb

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions Algorithms/CloudMasking/sentinel-2.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
'''
## Install Earth Engine API
Install the [Earth Engine Python API](https://developers.google.com/earth-engine/python_install) and [geehydro](https://github.com/giswqs/geehydro). The **geehydro** Python package builds on the [folium](https://github.com/python-visualization/folium) package and implements several methods for displaying Earth Engine data layers, such as `Map.addLayer()`, `Map.setCenter()`, `Map.centerObject()`, and `Map.setOptions()`.
The magic command `%%capture` can be used to hide output from a specific cell. Uncomment these lines if you are running this notebook for the first time.
The following script checks if the geehydro package has been installed. If not, it will install geehydro, which automatically install its dependencies, including earthengine-api and folium.
'''


# %%
# %%capture
# !pip install earthengine-api
# !pip install geehydro
import subprocess

try:
import geehydro
except ImportError:
print('geehydro package not installed. Installing ...')
subprocess.check_call(["python", '-m', 'pip', 'install', 'geehydro'])

# %%
'''
Expand All @@ -33,14 +37,16 @@

# %%
'''
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once. Uncomment the line `ee.Authenticate()`
if you are running this notebook for the first time or if you are getting an authentication error.
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once.
'''


# %%
# ee.Authenticate()
ee.Initialize()
try:
ee.Initialize()
except Exception as e:
ee.Authenticate()
ee.Initialize()

# %%
'''
Expand Down
26 changes: 16 additions & 10 deletions Algorithms/Segmentation/segmentation_snic.ipynb

Large diffs are not rendered by default.

22 changes: 14 additions & 8 deletions Algorithms/Segmentation/segmentation_snic.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
'''
## Install Earth Engine API
Install the [Earth Engine Python API](https://developers.google.com/earth-engine/python_install) and [geehydro](https://github.com/giswqs/geehydro). The **geehydro** Python package builds on the [folium](https://github.com/python-visualization/folium) package and implements several methods for displaying Earth Engine data layers, such as `Map.addLayer()`, `Map.setCenter()`, `Map.centerObject()`, and `Map.setOptions()`.
The magic command `%%capture` can be used to hide output from a specific cell. Uncomment these lines if you are running this notebook for the first time.
The following script checks if the geehydro package has been installed. If not, it will install geehydro, which automatically install its dependencies, including earthengine-api and folium.
'''


# %%
# %%capture
# !pip install earthengine-api
# !pip install geehydro
import subprocess

try:
import geehydro
except ImportError:
print('geehydro package not installed. Installing ...')
subprocess.check_call(["python", '-m', 'pip', 'install', 'geehydro'])

# %%
'''
Expand All @@ -33,14 +37,16 @@

# %%
'''
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once. Uncomment the line `ee.Authenticate()`
if you are running this notebook for the first time or if you are getting an authentication error.
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once.
'''


# %%
# ee.Authenticate()
ee.Initialize()
try:
ee.Initialize()
except Exception as e:
ee.Authenticate()
ee.Initialize()

# %%
'''
Expand Down
22 changes: 14 additions & 8 deletions Algorithms/center_pivot_irrigation_detector.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@
"source": [
"## Install Earth Engine API\n",
"Install the [Earth Engine Python API](https://developers.google.com/earth-engine/python_install) and [geehydro](https://github.com/giswqs/geehydro). The **geehydro** Python package builds on the [folium](https://github.com/python-visualization/folium) package and implements several methods for displaying Earth Engine data layers, such as `Map.addLayer()`, `Map.setCenter()`, `Map.centerObject()`, and `Map.setOptions()`.\n",
"The magic command `%%capture` can be used to hide output from a specific cell. Uncomment these lines if you are running this notebook for the first time."
"The following script checks if the geehydro package has been installed. If not, it will install geehydro, which automatically install its dependencies, including earthengine-api and folium."
]
},
{
"cell_type": "code",
"metadata": {},
"source": [
"# %%capture\n",
"# !pip install earthengine-api\n",
"# !pip install geehydro"
"import subprocess\n",
"\n",
"try:\n",
" import geehydro\n",
"except ImportError:\n",
" print('geehydro package not installed. Installing ...')\n",
" subprocess.check_call([\"python\", '-m', 'pip', 'install', 'geehydro'])"
],
"outputs": [],
"execution_count": null
Expand All @@ -54,16 +58,18 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once. Uncomment the line `ee.Authenticate()` \n",
"if you are running this notebook for the first time or if you are getting an authentication error. "
"Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once. "
]
},
{
"cell_type": "code",
"metadata": {},
"source": [
"# ee.Authenticate()\n",
"ee.Initialize()"
"try:\n",
" ee.Initialize()\n",
"except Exception as e:\n",
" ee.Authenticate()\n",
" ee.Initialize()"
],
"outputs": [],
"execution_count": null
Expand Down
22 changes: 14 additions & 8 deletions Algorithms/center_pivot_irrigation_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@
'''
## Install Earth Engine API
Install the [Earth Engine Python API](https://developers.google.com/earth-engine/python_install) and [geehydro](https://github.com/giswqs/geehydro). The **geehydro** Python package builds on the [folium](https://github.com/python-visualization/folium) package and implements several methods for displaying Earth Engine data layers, such as `Map.addLayer()`, `Map.setCenter()`, `Map.centerObject()`, and `Map.setOptions()`.
The magic command `%%capture` can be used to hide output from a specific cell. Uncomment these lines if you are running this notebook for the first time.
The following script checks if the geehydro package has been installed. If not, it will install geehydro, which automatically install its dependencies, including earthengine-api and folium.
'''


# %%
# %%capture
# !pip install earthengine-api
# !pip install geehydro
import subprocess

try:
import geehydro
except ImportError:
print('geehydro package not installed. Installing ...')
subprocess.check_call(["python", '-m', 'pip', 'install', 'geehydro'])

# %%
'''
Expand All @@ -33,14 +37,16 @@

# %%
'''
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once. Uncomment the line `ee.Authenticate()`
if you are running this notebook for the first time or if you are getting an authentication error.
Authenticate and initialize Earth Engine API. You only need to authenticate the Earth Engine API once.
'''


# %%
# ee.Authenticate()
ee.Initialize()
try:
ee.Initialize()
except Exception as e:
ee.Authenticate()
ee.Initialize()

# %%
'''
Expand Down
Loading

0 comments on commit 4cbe3c5

Please sign in to comment.