Skip to content

Commit

Permalink
Enable Intake GUI for thumbnails and geotiffs (#58)
Browse files Browse the repository at this point in the history
* gui fixup
* sat-search>=0.3 in binder config
  • Loading branch information
scottyhq authored Aug 24, 2020
1 parent f4e636d commit 0fcde70
Show file tree
Hide file tree
Showing 11 changed files with 4,114 additions and 47 deletions.
55 changes: 46 additions & 9 deletions binder/environment.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,56 @@
name: intake-stac
# Intake GUI also requires jupyterlab extensions installed
# jupyter labextension install @pyviz/jupyterlab_pyviz
name: intake-stac-gui
channels:
- conda-forge
- informaticslab
dependencies:
- python=3
- aiohttp
- autopep8
- black
- boto3
- codecov
- coverage
- dask
- datashader
- distributed
- flake8
- geopandas
- geoviews
- hvplot
- intake
- intake_geopandas
- intake-geopandas
- intake-parquet
- intake-xarray
- rasterio
- sat-stac
- sat-search
- ipykernel
- ipywidgets
- isort
- jupyterlab
- make
- matplotlib
- nbsphinx
- netcdf4
- nodejs >=10.0.0
- numpy
- numpydoc
- pandoc
- panel
- pip
- pre_commit
- pytest
- pytest-cov
- pytest-icdiff
- python =3.7
- pytoml
- pyyaml
- rasterio
- recommonmark
- requests
- sat-search>=0.3
- sat-stac
- scikit-image
- matplotlib
- pip
- sphinx_rtd_theme
- sphinx >=1.6
- xarray
- pip:
- git+https://github.com/intake/intake-stac@master
- sphinx_copybutton
9 changes: 6 additions & 3 deletions binder/postBuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash
set -euo pipefail

# Install development version of intake-stack
pip install .
jupyter labextension install --clean \
@jupyter-widgets/jupyterlab-manager \
@jupyterlab/geojson-extension \
@pyviz/jupyterlab_pyviz

#EOF
2 changes: 1 addition & 1 deletion ci/environment-dev-3.6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ dependencies:
- rasterio
- recommonmark
- requests
- sat-search>=0.3
- sat-stac
- scikit-image
- sphinx_rtd_theme
- sphinx>=1.6
- xarray
- pip:
- sat-search==0.3.0rc1
- sphinx_copybutton
2 changes: 1 addition & 1 deletion ci/environment-dev-3.7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ dependencies:
- rasterio
- recommonmark
- requests
- sat-search>=0.3
- sat-stac
- scikit-image
- sphinx_rtd_theme
- sphinx>=1.6
- xarray
- pip:
- sat-search==0.3.0rc1
- sphinx_copybutton
58 changes: 58 additions & 0 deletions ci/environment-gui-3.7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Intake GUI also requires jupyterlab extensions installed
# conda env create -f ci/environment-gui-3.7.yml
# conda activate intake-stac-gui
# pip install -e .
# jupyter labextension install @pyviz/jupyterlab_pyviz
name: intake-stac-gui
channels:
- conda-forge
dependencies:
- aiohttp
- autopep8
- black
- boto3
- codecov
- coverage
- dask
- datashader
- distributed
- flake8
- geopandas
- geoviews
- hvplot
- intake
- intake-geopandas
- intake-parquet
- intake-xarray
- ipykernel
- ipywidgets
- isort
- jupyterlab
- make
- matplotlib
- nbsphinx
- netcdf4
- nodejs >=10.0.0
- numpy
- numpydoc
- pandoc
- panel
- pip
- pre_commit
- pytest
- pytest-cov
- pytest-icdiff
- python =3.7
- pytoml
- pyyaml
- rasterio
- recommonmark
- requests
- sat-search>=0.3
- sat-stac
- scikit-image
- sphinx_rtd_theme
- sphinx >=1.6
- xarray
- pip:
- sphinx_copybutton
28 changes: 6 additions & 22 deletions examples/aws-earth-search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"source": [
"%matplotlib inline\n",
"import intake\n",
"import satsearch\n",
"import os"
"import satsearch"
]
},
{
Expand All @@ -31,10 +30,11 @@
"bbox = [35.48, -3.24, 35.58, -3.14] # (min lon, min lat, max lon, max lat)\n",
"dates = '2020-07-01/2020-08-15'\n",
"\n",
"os.environ['STAC_API_URL'] = 'https://earth-search.aws.element84.com/v0' # \"stac_version\":\"1.0.0-beta.2\"\n",
"results = satsearch.Search.search(collections=['sentinel-s2-l2a-cogs'], # note collection='sentinel-s2-l2a-cogs' doesn't work\n",
"URL='https://earth-search.aws.element84.com/v0'\n",
"results = satsearch.Search.search(url=URL,\n",
" collections=['sentinel-s2-l2a-cogs'], # note collection='sentinel-s2-l2a-cogs' doesn't work\n",
" datetime=dates,\n",
" bbox=bbox, \n",
" bbox=bbox, \n",
" sort=['<datetime'])"
]
},
Expand Down Expand Up @@ -68,15 +68,6 @@
"catalog = intake.open_stac_item_collection(items)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"type(catalog)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -188,14 +179,7 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Interactive plot with hvplot and datashader\n",
"#import hvplot.xarray\n",
"#NDVI.hvplot.image(x='x', y='y',\n",
"# cmap='BrBG', clim=(-1,1),\n",
"# rasterize=True, dynamic=True,\n",
"# width=700, height=500)"
]
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit 0fcde70

Please sign in to comment.