gjoseph92 / stackstac

Turn a STAC catalog into a dask-based xarray
https://stackstac.readthedocs.io
MIT License
233 stars 48 forks source link

stackstac.show gives empty map #96

Closed robintw closed 2 years ago

robintw commented 2 years ago

I'm running into a problem with stackstac.show. I've got a simple notebook that grabs some data from Planetary Computer, mosaics it, and then shows it on a map using stackstac.show. This works fine when I run it on Microsoft Planetary Computer, but when I run it locally, I don't get any data (or any checkerboard pattern) on the map - I just get the background OpenStreetMap data.

The key parts of the code are below, and the full ipynb file is available here.

search = stac_client.search(
        collections=["cop-dem-glo-30"],
        bbox=bounds)

items = list(search.get_items())

data = stackstac.stack([item.to_dict() for item in items], bounds_latlon=bounds)

mosaic = data.max(dim='time').squeeze()

mosaic = mosaic.persist()

stackstac.show(mosaic, checkerboard=True)

Am I doing something wrong here when running locally, or have I discovered a bug? When running the show call I can see various Dask jobs being run when looking at the Dask dashboard - which suggests that something is happening - but the result never seems to be displayed.

In case it is relevant, I'm running on Windows 10, with the following in my conda enviroment:

``` # packages in environment at C:\Users\rwilson3\Documents\mambaforge\envs\anglo: # # Name Version Build Channel abseil-cpp 20210324.2 h0e60522_0 conda-forge affine 2.3.0 py_0 conda-forge aiohttp 3.8.1 pypi_0 pypi aiosignal 1.2.0 pypi_0 pypi alabaster 0.7.12 py_0 conda-forge alembic 1.7.3 pypi_0 pypi altair 4.1.0 pypi_0 pypi anyio 3.3.2 pypi_0 pypi appdirs 1.4.4 pyh9f0ad1d_0 conda-forge argon2-cffi 20.1.0 py39hb82d6ee_2 conda-forge arrow-cpp 5.0.0 py39he0f88eb_8_cpu conda-forge asciitree 0.3.3 py_2 conda-forge asgiref 3.4.1 pypi_0 pypi astor 0.8.1 pypi_0 pypi async-timeout 4.0.1 pypi_0 pypi async_generator 1.10 py_0 conda-forge asyncio 3.4.3 pypi_0 pypi asyncpg 0.22.0 pypi_0 pypi atomicwrites 1.4.0 pypi_0 pypi attrs 21.2.0 pyhd8ed1ab_0 conda-forge aws-c-cal 0.5.11 he19cf47_0 conda-forge aws-c-common 0.6.2 h8ffe710_0 conda-forge aws-c-event-stream 0.2.7 h70e1b0c_13 conda-forge aws-c-io 0.10.5 h2fe331c_0 conda-forge aws-checksums 0.1.11 h1e232aa_7 conda-forge aws-sdk-cpp 1.8.186 hb0612c5_3 conda-forge azure-core 1.20.1 pypi_0 pypi azure-storage-blob 12.9.0 pypi_0 pypi babel 2.9.1 pyh44b312d_0 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 py_2 conda-forge backports-entry-points-selectable 1.1.0 pypi_0 pypi backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge base58 2.1.0 pypi_0 pypi basemap 1.2.2 py39h381b4b0_3 conda-forge beautifulsoup4 4.10.0 pypi_0 pypi black 21.9b0 pypi_0 pypi blas 2.111 mkl conda-forge blas-devel 3.9.0 11_win64_mkl conda-forge bleach 4.1.0 pyhd8ed1ab_0 conda-forge blinker 1.4 pypi_0 pypi blosc 1.21.0 h0e60522_0 conda-forge bokeh 2.4.0 py39hcbf5309_0 conda-forge boost-cpp 1.74.0 h5b4e17d_4 conda-forge boto3 1.18.53 pypi_0 pypi botocore 1.21.53 pypi_0 pypi braceexpand 0.1.7 pypi_0 pypi branca 0.4.2 pyhd8ed1ab_0 conda-forge brotli 1.0.9 pypi_0 pypi brotli-asgi 1.1.0 pypi_0 pypi brotli-bin 1.0.9 h8ffe710_5 conda-forge brotlipy 0.7.0 py39hb82d6ee_1001 conda-forge bs4 0.0.1 pypi_0 pypi buildpg 0.3 pypi_0 pypi bzip2 1.0.8 h8ffe710_4 conda-forge c-ares 1.17.2 h8ffe710_0 conda-forge ca-certificates 2021.10.8 h5b45459_0 conda-forge cachetools 4.2.4 pyhd8ed1ab_0 conda-forge cachey 0.2.1 pyh9f0ad1d_0 conda-forge cairo 1.16.0 hb19e0ff_1008 conda-forge cartopy 0.20.0 py39h381b4b0_0 conda-forge certifi 2021.10.8 py39hcbf5309_1 conda-forge cffi 1.14.6 py39h0878f49_1 conda-forge cfgv 3.3.1 pypi_0 pypi cfitsio 3.470 h0af3d06_7 conda-forge cftime 1.5.1 py39h5d4886f_0 conda-forge chardet 4.0.0 py39hcbf5309_1 conda-forge charls 2.2.0 h39d44d4_0 conda-forge charset-normalizer 2.0.6 pypi_0 pypi click 7.1.2 pyh9f0ad1d_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.6.0 pyh9f0ad1d_0 conda-forge cloudpickle 2.0.0 pyhd8ed1ab_0 conda-forge cogeo-mosaic 3.0.2 pypi_0 pypi colorama 0.4.4 pyh9f0ad1d_0 conda-forge colorcet 2.0.6 pyhd8ed1ab_0 conda-forge colorlog 6.6.0 pypi_0 pypi coverage 6.0.2 pypi_0 pypi cramjam 2.4.0 pypi_0 pypi cryptography 3.4.7 py39hd8d06c1_0 conda-forge cudatoolkit 10.2.89 hb195166_9 conda-forge curl 7.79.1 h789b8ee_1 conda-forge cycler 0.10.0 py_2 conda-forge cython 0.29.24 pypi_0 pypi cytoolz 0.11.0 py39hb82d6ee_3 conda-forge dask 2021.9.1 pyhd8ed1ab_0 conda-forge dask-core 2021.9.1 pyhd8ed1ab_0 conda-forge dask-image 0.6.0 pypi_0 pypi datacube 1.8.6 pyhd8ed1ab_0 conda-forge datashader 0.13.0 pyh6c4a22f_0 conda-forge datashape 0.5.4 py_1 conda-forge debugpy 1.4.1 py39h415ef7b_0 conda-forge decorator 5.1.0 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge distlib 0.3.3 pypi_0 pypi distributed 2021.9.1 py39hcbf5309_0 conda-forge docstring-parser 0.7.3 pypi_0 pypi docstring_parser 0.12 pyhd8ed1ab_0 conda-forge docutils 0.17.1 py39hcbf5309_0 conda-forge easyprocess 0.3 pypi_0 pypi entrypoint2 0.2.4 pypi_0 pypi entrypoints 0.3 py39hde42818_1002 conda-forge expat 2.4.1 h39d44d4_0 conda-forge falcon 2.0.0 pypi_0 pypi fastapi 0.67.0 pypi_0 pypi fastapi-utils 0.2.1 pypi_0 pypi fasteners 0.16 pyhd8ed1ab_0 conda-forge filelock 3.3.0 pypi_0 pypi fiona 1.8.20 py39hea8b339_1 conda-forge folium 0.12.1 pypi_0 pypi font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.13.1 h1989441_1005 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freetype 2.10.4 h546665d_1 conda-forge freetype-py 2.2.0 pyh9f0ad1d_0 conda-forge freexl 1.0.6 ha8e266a_0 conda-forge frozenlist 1.2.0 pypi_0 pypi fsspec 2021.10.0 pyhd8ed1ab_0 conda-forge gdal 3.3.2 py39h7c9a9b1_2 conda-forge geoalchemy2 0.7.0 pypi_0 pypi geojson-pydantic 0.3.1 pypi_0 pypi geopandas 0.10.0 pyhd8ed1ab_0 conda-forge geopandas-base 0.10.0 pyha770c72_0 conda-forge geos 3.9.1 h39d44d4_2 conda-forge geotiff 1.7.0 ha8a8a2d_0 conda-forge gettext 0.19.8.1 ha2e2712_1008 conda-forge gflags 2.2.2 ha925a31_1004 conda-forge ghp-import 2.0.2 pypi_0 pypi giflib 5.2.1 h8d14728_2 conda-forge gitdb 4.0.7 pypi_0 pypi gitpython 3.1.24 pypi_0 pypi glog 0.5.0 h4797de2_0 conda-forge greenlet 1.1.2 py39h415ef7b_0 conda-forge grpc-cpp 1.40.0 h2431d41_2 conda-forge h11 0.12.0 pypi_0 pypi hdf4 4.2.15 h0e5069d_3 conda-forge hdf5 1.12.1 nompi_h2a0e4a3_100 conda-forge heapdict 1.0.1 py_0 conda-forge holoviews 1.14.6 pyhd8ed1ab_0 conda-forge hsluv 5.0.2 pyh44b312d_0 conda-forge httpcore 0.13.7 pypi_0 pypi httpx 0.20.0 pypi_0 pypi hug 2.6.1 pypi_0 pypi hvplot 0.7.3 pyh6c4a22f_0 conda-forge icu 68.1 h0e60522_0 conda-forge identify 2.3.0 pypi_0 pypi idna 3.2 pypi_0 pypi imagecodecs 2021.6.8 py39h166567b_0 conda-forge imageio 2.9.0 py_0 conda-forge imagesize 1.2.0 py_0 conda-forge importlib-metadata 4.8.1 py39hcbf5309_0 conda-forge importlib_metadata 4.8.1 hd8ed1ab_0 conda-forge iniconfig 1.1.1 pypi_0 pypi intel-openmp 2021.3.0 h57928b3_3372 conda-forge ipykernel 6.4.1 py39h832f523_0 conda-forge ipyleaflet 0.13.6 pypi_0 pypi ipyspin 0.1.5 pypi_0 pypi ipython 7.28.0 py39h832f523_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipyurl 0.1.2 pypi_0 pypi ipywidgets 7.6.5 pyhd8ed1ab_0 conda-forge iso-639 0.4.5 pypi_0 pypi iso3166 2.0.2 pypi_0 pypi isodate 0.6.0 pypi_0 pypi jbig 2.1 h8d14728_2003 conda-forge jedi 0.18.0 py39hcbf5309_2 conda-forge jinja2 2.11.3 pypi_0 pypi jmespath 0.10.0 pyh9f0ad1d_0 conda-forge joblib 1.0.1 pyhd8ed1ab_0 conda-forge jpeg 9d h8ffe710_0 conda-forge json5 0.9.6 pypi_0 pypi jsonschema 4.0.1 pyhd8ed1ab_0 conda-forge jupyter 1.0.0 py39hcbf5309_6 conda-forge jupyter-server 1.11.1 pypi_0 pypi jupyter_client 6.1.12 pyhd8ed1ab_0 conda-forge jupyter_console 6.4.0 pyhd8ed1ab_1 conda-forge jupyter_core 4.8.1 py39hcbf5309_0 conda-forge jupyterlab 3.1.17 pypi_0 pypi jupyterlab-server 2.8.2 pypi_0 pypi jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge jupyterlab_widgets 1.0.2 pyhd8ed1ab_0 conda-forge jxrlib 1.1 h8ffe710_2 conda-forge kealib 1.4.14 h8995ca9_3 conda-forge kiwisolver 1.3.2 py39h2e07f2f_0 conda-forge krb5 1.19.2 hbae68bd_2 conda-forge lark-parser 0.12.0 pyhd8ed1ab_0 conda-forge lcms2 2.12 h2a16943_0 conda-forge lerc 2.2.1 h0e60522_0 conda-forge libaec 1.0.6 h39d44d4_0 conda-forge libblas 3.9.0 11_win64_mkl conda-forge libbrotlicommon 1.0.9 h8ffe710_5 conda-forge libbrotlidec 1.0.9 h8ffe710_5 conda-forge libbrotlienc 1.0.9 h8ffe710_5 conda-forge libcblas 3.9.0 11_win64_mkl conda-forge libclang 11.1.0 default_h5c34c98_1 conda-forge libcurl 7.79.1 h789b8ee_1 conda-forge libdeflate 1.7 h8ffe710_5 conda-forge libffi 3.4.2 h0e60522_4 conda-forge libgdal 3.3.2 hfb14b67_2 conda-forge libglib 2.68.4 h3be07f2_1 conda-forge libiconv 1.16 he774522_0 conda-forge libkml 1.3.0 h9859afa_1014 conda-forge liblapack 3.9.0 11_win64_mkl conda-forge liblapacke 3.9.0 11_win64_mkl conda-forge libnetcdf 4.8.1 nompi_h1cc8e9d_101 conda-forge libpng 1.6.37 h1d00b33_2 conda-forge libpq 13.3 hfcc5ef8_0 conda-forge libprotobuf 3.18.1 h7755175_0 conda-forge librttopo 1.1.0 hb340de5_6 conda-forge libsodium 1.0.18 h8d14728_1 conda-forge libspatialindex 1.9.3 h39d44d4_4 conda-forge libspatialite 5.0.1 h762a7f4_6 conda-forge libssh2 1.10.0 h680486a_2 conda-forge libthrift 0.15.0 h636ae23_1 conda-forge libtiff 4.3.0 h0c97f57_1 conda-forge libutf8proc 2.6.1 hcb41399_0 conda-forge libuv 1.42.0 h8ffe710_0 conda-forge libwebp-base 1.2.1 h8ffe710_0 conda-forge libxml2 2.9.12 hf5bbc77_0 conda-forge libzip 1.8.0 hfed4ece_1 conda-forge libzlib 1.2.11 h8ffe710_1013 conda-forge libzopfli 1.0.3 h0e60522_0 conda-forge llvmlite 0.37.0 py39ha0cd8c8_0 conda-forge locket 0.2.0 py_2 conda-forge loguru 0.5.3 pypi_0 pypi lxml 4.6.4 pypi_0 pypi lz4-c 1.9.3 h8ffe710_1 conda-forge m2w64-gcc-libgfortran 5.3.0 6 conda-forge m2w64-gcc-libs 5.3.0 7 conda-forge m2w64-gcc-libs-core 5.3.0 7 conda-forge m2w64-gmp 6.1.0 2 conda-forge m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge magicgui 0.3.2 pyhd8ed1ab_0 conda-forge mako 1.1.5 pypi_0 pypi mapclassify 2.4.3 pyhd8ed1ab_0 conda-forge markdown 3.3.4 pyhd8ed1ab_0 conda-forge markupsafe 2.0.1 py39hb82d6ee_0 conda-forge matplotlib-base 3.4.3 py39h581301d_1 conda-forge matplotlib-inline 0.1.3 pyhd8ed1ab_0 conda-forge mercantile 1.2.1 pypi_0 pypi mergedeep 1.3.4 pypi_0 pypi mistune 0.8.4 py39hb82d6ee_1004 conda-forge mkdocs 1.2.2 pypi_0 pypi mkdocs-material 7.3.2 pypi_0 pypi mkdocs-material-extensions 1.0.3 pypi_0 pypi mkl 2021.3.0 hb70f87d_564 conda-forge mkl-devel 2021.3.0 h57928b3_565 conda-forge mkl-include 2021.3.0 hb70f87d_564 conda-forge monotonic 1.5 py_0 conda-forge morecantile 2.1.4 pypi_0 pypi msgpack-python 1.0.2 py39h2e07f2f_1 conda-forge msrest 0.6.21 pypi_0 pypi mss 6.1.0 pypi_0 pypi msys2-conda-epoch 20160418 1 conda-forge multidict 5.2.0 pypi_0 pypi multipledispatch 0.6.0 py_0 conda-forge munch 2.5.0 py_0 conda-forge mutagen 1.45.1 pypi_0 pypi mypy-extensions 0.4.3 pypi_0 pypi napari 0.4.12 pyhd8ed1ab_0 conda-forge napari-console 0.0.4 pyhd8ed1ab_0 conda-forge napari-plugin-engine 0.2.0 py39hcbf5309_0 conda-forge napari-svg 0.1.5 pyhd8ed1ab_0 conda-forge nbclassic 0.3.2 pypi_0 pypi nbclient 0.5.4 pyhd8ed1ab_0 conda-forge nbconvert 6.2.0 py39hcbf5309_0 conda-forge nbformat 5.1.3 pyhd8ed1ab_0 conda-forge nest-asyncio 1.5.1 pyhd8ed1ab_0 conda-forge netcdf4 1.5.7 nompi_py39hf113b1f_103 conda-forge networkx 2.5 py_0 conda-forge nodeenv 1.6.0 pypi_0 pypi notebook 6.4.4 pyha770c72_0 conda-forge numba 0.54.0 py39hb8cd55e_0 conda-forge numcodecs 0.9.1 py39h415ef7b_1 conda-forge numexpr 2.7.3 pypi_0 pypi numpy 1.20.0 py39h6635163_0 conda-forge numpydoc 1.1.0 py_1 conda-forge oauthlib 3.1.1 pypi_0 pypi odc-algo 0.2.0a4 pypi_0 pypi odc-io 0.2.0a1 pypi_0 pypi odc-stac 0.2.0a8 pypi_0 pypi olefile 0.46 pyh9f0ad1d_1 conda-forge opencv-python 4.5.4.58 pypi_0 pypi openjpeg 2.4.0 hb211442_1 conda-forge openssl 1.1.1l h8ffe710_0 conda-forge orjson 3.6.4 pypi_0 pypi packaging 21.0 pyhd8ed1ab_0 conda-forge pafy 0.5.5 pypi_0 pypi pandas 1.2.5 pypi_0 pypi pandoc 2.14.2 h8ffe710_0 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge panel 0.12.4 pyhd8ed1ab_0 conda-forge param 1.11.1 pyh6c4a22f_0 conda-forge parquet-cpp 1.5.1 1 conda-forge parso 0.8.2 pyhd8ed1ab_0 conda-forge partd 1.2.0 pyhd8ed1ab_0 conda-forge pathspec 0.9.0 pypi_0 pypi pcre 8.45 h0e60522_0 conda-forge pdocs 1.1.1 pypi_0 pypi pickleshare 0.7.5 py39hde42818_1002 conda-forge pillow 8.3.2 py39h916092e_0 conda-forge pims 0.5 pypi_0 pypi pint 0.18 pyhd8ed1ab_0 conda-forge pip 21.2.4 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h8ffe710_0 conda-forge platformdirs 2.4.0 pypi_0 pypi plotext 2.3.1 pypi_0 pypi pluggy 1.0.0 pypi_0 pypi pooch 1.5.2 pyhd8ed1ab_0 conda-forge poppler 21.09.0 h24fffdf_3 conda-forge poppler-data 0.4.11 hd8ed1ab_0 conda-forge postgresql 13.3 h1c22c4f_0 conda-forge pre-commit 2.15.0 pypi_0 pypi proj 8.0.1 h1cfcee9_0 conda-forge prometheus_client 0.11.0 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.20 pyha770c72_0 conda-forge prompt_toolkit 3.0.20 hd8ed1ab_0 conda-forge protobuf 3.18.1 pypi_0 pypi psutil 5.8.0 py39hb82d6ee_1 conda-forge psycopg2 2.9.1 py39h0878f49_0 conda-forge psycopg2-binary 2.9.1 pypi_0 pypi psygnal 0.1.4 py39h2e07f2f_0 conda-forge py 1.10.0 pypi_0 pypi pyarrow 5.0.0 py39hf9247be_8_cpu conda-forge pycparser 2.20 pyh9f0ad1d_2 conda-forge pycryptodome 3.11.0 pypi_0 pypi pycryptodomex 3.11.0 pypi_0 pypi pyct 0.4.6 py_0 conda-forge pyct-core 0.4.6 py_0 conda-forge pydantic 1.8.2 py39hb82d6ee_0 conda-forge pydeck 0.7.0 pypi_0 pypi pyee 8.2.2 pypi_0 pypi pygeos 0.10.2 pypi_0 pypi pygments 2.10.0 pyhd8ed1ab_0 conda-forge pymdown-extensions 9.0 pypi_0 pypi pyopengl 3.1.5 py_0 conda-forge pyopenssl 21.0.0 pyhd8ed1ab_0 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pypgstac 0.3.4 pypi_0 pypi pyppeteer 0.2.6 pypi_0 pypi pyproj 3.2.1 py39ha996c60_2 conda-forge pyqt 5.12.3 py39hcbf5309_7 conda-forge pyqt-impl 5.12.3 py39h415ef7b_7 conda-forge pyqt5-sip 4.19.18 py39h415ef7b_7 conda-forge pyqtchart 5.12 py39h415ef7b_7 conda-forge pyqtwebengine 5.12.1 py39h415ef7b_7 conda-forge pyrsistent 0.17.3 py39hb82d6ee_2 conda-forge pyscreenshot 3.0 pypi_0 pypi pyshp 2.1.3 pyh44b312d_0 conda-forge pysocks 1.7.1 py39hcbf5309_3 conda-forge pystac 1.2.0 pypi_0 pypi pystac-client 0.3.0 pypi_0 pypi pytest 6.2.5 pypi_0 pypi pytest-asyncio 0.16.0 pypi_0 pypi pytest-cov 3.0.0 pypi_0 pypi python 3.9.7 h7840368_3_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-dotenv 0.19.0 pypi_0 pypi python-snappy 0.6.0 py39h1d87f24_0 conda-forge python_abi 3.9 2_cp39 conda-forge pytorch 1.10.0 py3.9_cuda10.2_cudnn7_0 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2021.1 pyhd8ed1ab_0 conda-forge pytz-deprecation-shim 0.1.0.post0 pypi_0 pypi pyviz_comms 2.1.0 pyhd8ed1ab_0 conda-forge pywavelets 1.1.1 py39h5d4886f_3 conda-forge pywin32 301 py39hb82d6ee_0 conda-forge pywinpty 1.1.4 py39h99910a6_0 conda-forge pyyaml 5.4.1 py39hb82d6ee_1 conda-forge pyyaml-env-tag 0.1 pypi_0 pypi pyzmq 22.3.0 py39he46f08e_0 conda-forge qt 5.12.9 h5909a2a_4 conda-forge qtconsole 5.1.1 pyhd8ed1ab_0 conda-forge qtpy 1.11.2 pyhd8ed1ab_0 conda-forge rasterio 1.2.8 py39h85efae1_0 conda-forge re2 2021.09.01 h0e60522_0 conda-forge regex 2021.9.30 pypi_0 pypi requests 2.26.0 pyhd8ed1ab_0 conda-forge requests-oauthlib 1.3.0 pypi_0 pypi requests-unixsocket 0.2.0 pypi_0 pypi retrying 1.3.3 py_2 conda-forge rfc3986 1.5.0 pypi_0 pypi rio-cogeo 2.3.1 pypi_0 pypi rio-color 1.0.4 pypi_0 pypi rio-mucho 1.0.0 pypi_0 pypi rio-stac 0.3.1 pypi_0 pypi rio-tiler 2.1.3 pypi_0 pypi rio-tiler-pds 0.5.2 pypi_0 pypi rio-toa 0.3.0 pypi_0 pypi rio-viz 0.7.2 pypi_0 pypi rioxarray 0.7.1 pyhd8ed1ab_0 conda-forge rtree 0.9.7 py39h09fdee3_2 conda-forge s3transfer 0.5.0 pyhd8ed1ab_0 conda-forge scikit-image 0.18.3 pypi_0 pypi scikit-learn 1.0 py39h74df8f2_1 conda-forge scipy 1.7.1 py39hc0c34ad_0 conda-forge send2trash 1.8.0 pyhd8ed1ab_0 conda-forge setuptools 58.0.4 py39hcbf5309_2 conda-forge shapely 1.7.1 py39haadaec5_5 conda-forge simplejpeg 1.6.2 pypi_0 pypi simplejson 3.17.5 pypi_0 pypi six 1.16.0 pyh6c4a22f_0 conda-forge slicerator 1.0.0 pypi_0 pypi smart-open 4.2.0 pypi_0 pypi smmap 4.0.0 pypi_0 pypi snappy 1.1.8 ha925a31_3 conda-forge sniffio 1.2.0 pypi_0 pypi snowballstemmer 2.1.0 pyhd8ed1ab_0 conda-forge snuggs 1.4.7 py_0 conda-forge sortedcontainers 2.4.0 pyhd8ed1ab_0 conda-forge soupsieve 2.2.1 pypi_0 pypi spatialpandas 0.4.3 pyhd8ed1ab_0 conda-forge sphinx 4.2.0 pyh6c4a22f_0 conda-forge sphinxcontrib-applehelp 1.0.2 py_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 2.0.0 pyhd8ed1ab_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.5 pyhd8ed1ab_0 conda-forge sqlakeyset 1.0.1629029818 pypi_0 pypi sqlalchemy 1.3.23 pypi_0 pypi sqlite 3.36.0 h8ffe710_2 conda-forge stac-fastapi-api 2.1.1 dev_0 stac-fastapi-extensions 2.1.1 dev_0 stac-fastapi-pgstac 2.1.1 dev_0 stac-fastapi-sqlalchemy 2.1.1 dev_0 stac-fastapi-types 2.1.1 dev_0 stac-nb 0.4.0 pypi_0 pypi stac-pydantic 2.0.1 pypi_0 pypi stackstac 0.2.1 pyhd8ed1ab_0 conda-forge stacterm 0.1.0 pypi_0 pypi starlette 0.14.2 pypi_0 pypi starlette-cramjam 0.1.0 pypi_0 pypi streamlink 2.4.0 pypi_0 pypi streamlit 1.0.0 pypi_0 pypi streamlit-folium 0.4.0 pypi_0 pypi supermercado 0.2.0 pypi_0 pypi superqt 0.2.4 pyhd8ed1ab_0 conda-forge tbb 2021.3.0 h2d74725_0 conda-forge tblib 1.7.0 pyhd8ed1ab_0 conda-forge terminado 0.12.1 py39hcbf5309_0 conda-forge termtables 0.2.4 pypi_0 pypi testpath 0.5.0 pyhd8ed1ab_0 conda-forge threadpoolctl 3.0.0 pyh8a188c0_0 conda-forge tifffile 2021.8.30 pypi_0 pypi tiledb 2.3.4 h78dabda_0 conda-forge titiler-application 0.3.11 dev_0 titiler-core 0.3.11 dev_0 titiler-mosaic 0.3.11 dev_0 titiler-pgstac 0.1.0a1 dev_0 tk 8.6.11 h8ffe710_1 conda-forge toml 0.10.2 pypi_0 pypi tomli 1.2.1 pypi_0 pypi toolz 0.11.1 py_0 conda-forge torchvision 0.11.1 py39_cu102 pytorch tornado 6.1 py39hb82d6ee_1 conda-forge tqdm 4.62.3 pyhd8ed1ab_0 conda-forge traitlets 5.1.0 pyhd8ed1ab_0 conda-forge traittypes 0.2.1 pypi_0 pypi typer 0.3.2 pypi_0 pypi typing-extensions 3.10.0.2 hd8ed1ab_0 conda-forge typing_extensions 3.10.0.2 pyha770c72_0 conda-forge tzdata 2021.2.post0 pypi_0 pypi tzlocal 4.0 pypi_0 pypi ucrt 10.0.20348.0 h57928b3_0 conda-forge urllib3 1.26.7 pyhd8ed1ab_0 conda-forge uvicorn 0.15.0 pypi_0 pypi validators 0.18.2 pypi_0 pypi vc 14.2 hb210afc_5 conda-forge vidgear 0.2.3 pypi_0 pypi virtualenv 20.8.1 pypi_0 pypi vispy 0.9.2 py39h5d4886f_0 conda-forge vs2015_runtime 14.29.30037 h902a5da_5 conda-forge watchdog 2.1.6 pypi_0 pypi wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge webencodings 0.5.1 py_1 conda-forge websocket-client 1.2.1 pypi_0 pypi websockets 9.1 pypi_0 pypi wheel 0.37.0 pyhd8ed1ab_1 conda-forge widgetsnbextension 3.5.1 py39hcbf5309_4 conda-forge win32-setctime 1.0.3 pypi_0 pypi win_inet_pton 1.1.0 py39hcbf5309_2 conda-forge winpty 0.4.3 4 conda-forge wrapt 1.13.2 py39hb82d6ee_0 conda-forge xarray 0.19.0 pyhd8ed1ab_1 conda-forge xarray-leaflet 0.1.15 pypi_0 pypi xarray-spatial 0.2.9 pyhd8ed1ab_0 conda-forge xerces-c 3.2.3 h0e60522_2 conda-forge xyzservices 2021.9.1 pyhd8ed1ab_0 conda-forge xz 5.2.5 h62dcd97_1 conda-forge yaml 0.2.5 he774522_0 conda-forge yarl 1.7.2 pypi_0 pypi yt-dlp 2021.11.10.1 pypi_0 pypi zarr 2.10.1 pyhd8ed1ab_0 conda-forge zeromq 4.3.4 h0e60522_1 conda-forge zfp 0.5.5 h0e60522_7 conda-forge zict 2.0.0 py_0 conda-forge zipp 3.6.0 pyhd8ed1ab_0 conda-forge zlib 1.2.11 h8ffe710_1013 conda-forge zstd 1.5.0 h6255e5f_0 conda-forge ```
gjoseph92 commented 2 years ago

We'll, I'm excited to hear anyone's even using show! A couple questions first:

FWIW, yesterday I was debugging an issue with show where it can be extremely slow, many minutes for tiles to show up. It appears there's a bug in the Dask client where it'll wait many minutes before sending more messages to the scheduler, which I'm trying to track down. One anecdotal thing to try is skipping the persist.

robintw commented 2 years ago

Thanks for the quick response.

I've been using show a lot on Planetary Computer as a great way to interactively visualise what I'm working on. I've also combined it with some IPython widget interaction functionality to make some simple interactive apps that use planetary computer data in the background, being processed by Dask in (near) real-time. It's great!

Responses to questions below:

Are you using JupyterLab locally (and not, say, vscode)?

I realised when you asked this that I was using the traditional Jupyter Notebook interface on my local machine, whereas on Planetary Computer I was using JupyterLab. I've just tried with JupyterLab locally and I'm still running into the same problems.

If you run stackstac.server_stats, does the widget indicate there are any computations or HTTP requests active? Does it show anything completing?

If display the widget and then run show and move the map a bit, the 'computing' bar fills up and empties again fairly quickly (and I can see some computations taking place on the Dask dashboard), but the 'HTTP requests' bar stays at zero.

If you open the web browser's network inspector before you add things to the map, once you run show, do you see requests for PNGs not from openstreetmap, to a URL on the Jupyter server? I expect they'd all be pending.

I'm seeing various PNGs that are coming from a HTTP request to a Jupyter URL, and they are all coming back with 404 errors:

image

If you browse the map somewhere far away from where the data is, do you get checkerboards? If you can't get checkerboards anywhere, then it's an issue communicating with the local webserver serving the tiles. If just the areas that would contain data are blank, it's probably an issue communicating with dask.

No, there are no checkerboards displayed anywhere, even if I scroll a long way away from where the data should be.

I've had a few intermittent problems on Planetary Computer with the actual data not displaying, but the checkboards always appeared. In these cases, restarting the kernel or restarting the Dask cluster seems to fix it - but that seems to be a different problem to the problem I'm experiencing locally.

gjoseph92 commented 2 years ago

@robintw this might actually be really simple: you don't have jupyter-server-proxy installed, and I forgot to add it as a required dependency for viz 🤦. Try installing that and see if it fixes things?

robintw commented 2 years ago

Unfortunately that's already installed (I'm using one of the Planetary Computer docker images: the one here).

I'll do some more detailed debugging next week, but looking in the developer tools, I think the requests for the tiles were giving a HTTP 500 Error. Is there any way to get more insight into what the tile server is doing behind the scenes, and what is causing the 500 error?

gjoseph92 commented 2 years ago

Ok, in the screenshot you posted I saw 404s, meaning the URL requested didn't exist, which is exactly what would happen if the proxy wasn't running. And the conda environment listed doesn't have it, so I would think that was your original problem locally.

500s indicate something different. Getting error messages is extremely hard, because JupyterLab appears determined to swallow all the errors coming from coroutines no matter what logging level you set. I'd recommend opening the web inspector and looking at the contents of the 500 response, that may be the best clue you can get. There are also some code changes I can make to try to capture the errors and make them more easily visible.

robintw commented 2 years ago

Sorry, I think I commented on the wrong PR and confused things.

The issue with the empty map with no checkboards is the one I raised in this issue. This occurred when running on my local machine, which does not have jupyter-server-proxy installed. I've just tried installing it, and it completely fixes the issue: both the checkerboard and the data itself now appear on the map. Thanks!

Next week I'll continue debugging the problem I'm having when running within docker on my machine, using one of the planetary computer docker images. That's the one that's giving me a 500 error. I'll create a separate issue for that.