Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive maps #44

Merged
merged 52 commits into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
6eb2317
WIP show. works, but awkwardly
gjoseph92 Mar 20, 2021
5d89066
support non-async clients
gjoseph92 Mar 21, 2021
4f4223b
split out geom_utils
gjoseph92 Mar 21, 2021
a632373
show is working!
gjoseph92 Mar 21, 2021
f435599
support range
gjoseph92 Mar 21, 2021
27fc0a7
update deps for viz.
gjoseph92 Mar 21, 2021
b2017ec
driveby: move fill_value check to items_to_dask
gjoseph92 Mar 21, 2021
6937475
colormap, restructure to_png, docs
gjoseph92 Mar 22, 2021
f03e11e
caching file manager comment
gjoseph92 Mar 22, 2021
626df00
custom tilesize. doesn't work.
gjoseph92 Mar 22, 2021
bb33e77
Revert "custom tilesize. doesn't work."
gjoseph92 Mar 22, 2021
49d3123
raise error on picke to hunt this error down
gjoseph92 Mar 22, 2021
e0fd04b
questions, comments, concerns
gjoseph92 Mar 22, 2021
08be77c
fix colormap
gjoseph92 Mar 22, 2021
b310210
insane hack: process pool for graph munging
gjoseph92 Mar 22, 2021
ffdeb37
mosaic
gjoseph92 Mar 22, 2021
538cae4
Revert "insane hack: process pool for graph munging"
gjoseph92 Mar 22, 2021
53bdf59
add some deps
gjoseph92 Mar 25, 2021
15e02da
TODO note on array_bounds
gjoseph92 Mar 25, 2021
6e1a603
optional dependencies
gjoseph92 Apr 25, 2021
e0fa2c3
Revert "Revert "custom tilesize. doesn't work.""
gjoseph92 Apr 25, 2021
d032f32
Make `array_bounds` inclusive, and constant time
gjoseph92 Apr 25, 2021
5a229b3
linspace not arange in `reproject_array`
gjoseph92 Apr 25, 2021
afbce2c
support interpolation= and fill_value
gjoseph92 Apr 25, 2021
00178f0
geom_utils docstrings
gjoseph92 Apr 25, 2021
1b45f50
docs
gjoseph92 Apr 26, 2021
e45857f
fixup! support interpolation=
gjoseph92 Apr 26, 2021
71864b2
support axis= in mosaic
gjoseph92 Apr 26, 2021
e8cfe87
clearer wrong dims error message
gjoseph92 Apr 26, 2021
b04a794
bump coiled version
gjoseph92 Apr 26, 2021
8265ddb
add viz extra to coiled env
gjoseph92 Apr 26, 2021
e53ad57
WIP server_stats and future ref leaks hacks
gjoseph92 Apr 26, 2021
cde1c9f
separate xyztile_of_array function
gjoseph92 Apr 26, 2021
1b838fa
poetry lock
gjoseph92 Apr 29, 2021
c73861c
cleanup
gjoseph92 May 4, 2021
b4b9859
use ipyleaflet events to get around chrome limit
gjoseph92 May 4, 2021
cbc1e06
kinda working
gjoseph92 May 4, 2021
e27648e
fix cancel/error stats, del with 1
gjoseph92 May 4, 2021
4b04d67
fix add_to_map state errors
gjoseph92 May 4, 2021
0c7d1a0
Switch to cache-based TileManager. Works great!
gjoseph92 May 4, 2021
725b501
update coiled
gjoseph92 May 4, 2021
d15b3ae
drop NaNs in percentile
gjoseph92 May 5, 2021
aa26909
debug layer + reorg file a bit
gjoseph92 May 5, 2021
b9581a1
add xyztile_of_array to public API
gjoseph92 May 5, 2021
153c104
auto increment port
gjoseph92 May 5, 2021
9f0ca46
colormap -> cmap
gjoseph92 May 5, 2021
2e6b936
better auto-fitting for `show`
gjoseph92 May 5, 2021
9622752
fix TileManager repr
gjoseph92 May 5, 2021
f3de64e
add show notebook
gjoseph92 May 5, 2021
8de77a3
Merge branch 'main' into show2
gjoseph92 May 5, 2021
79a5a83
remove bunching note
gjoseph92 May 5, 2021
0b96ebf
remove test.py that slipped in
gjoseph92 May 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ python:
- method: pip
path: .
extra_requirements:
- docs
- docs
- viz
3 changes: 2 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
_build/*
api/internal/*.rst
api/internal/*.rst
api/main/*.rst
47 changes: 45 additions & 2 deletions docs/api/main.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,49 @@
API reference
-------------

There's only one function:
.. currentmodule:: stackstac

.. autofunction:: stackstac.stack
Core
~~~~

This is what it's all about:

.. autosummary::
:toctree: main
:nosignatures:

stack

Visualization
~~~~~~~~~~~~~

Easily render your data on an :doc:`ipyleaflet <ipyleaflet:index>` map. Requires installing ``'stackstac[viz]'``, and running with a :doc:`dask distributed <distributed:index>` cluster.

As you pan around the map, the part of the array that's in view is computed on the fly by dask.

**Warning**: zooming in and out will *not* load underlying data at different resolutions. Assets will be loaded at whatever resolution you initially got from `~.stack`. If your array is large and high-resolution, zooming out could trigger very slow (and expensive) computations.


.. autosummary::
:toctree: main
:nosignatures:

show
add_to_map

Operations
~~~~~~~~~~

Utilities to work with geospatial DataArrays produced by stackstac.

**Warning**: these functions may be reorganized in the near future.

.. autosummary::
:toctree: main
:nosignatures:

mosaic
reproject_array
xyztile_of_array
array_bounds
array_epsg
7 changes: 5 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
# a list of builtin themes.
#
html_theme = "insipid"

html_theme_options = {
"globaltoc_maxdepth": -1,
}
Expand All @@ -92,12 +91,16 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
# html_static_path = ["_static"]

intersphinx_mapping = {
"rasterio": ("https://rasterio.readthedocs.io/en/latest/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"pystac": ("https://pystac.readthedocs.io/en/latest/", None),
"xarray": ("http://xarray.pydata.org/en/stable/", None),
"dask": ("https://docs.dask.org/en/latest/", None),
"distributed": ("https://distributed.dask.org/en/latest/", None),
"matplotlib": ("https://matplotlib.org/stable", None),
"ipyleaflet": ("https://ipyleaflet.readthedocs.io/en/latest/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/reference/", None),
}
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Installation

``stackstac`` is available on pip::

pip install stackstac
pip install 'stackstac[viz]'

Its main dependencies are rasterio, pyproj, dask, and xarray, all of which should pose no problems to install—no need to build GDAL from source here.

Expand Down
Binary file added examples/images/show-ndvi-anomaly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/images/show-ndvi-widget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/images/show-ndvi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/images/show-s2-median.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ More examples

cluster
gif
show
Loading