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 plotting with lonboard #67

Merged
merged 32 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
302a97b
draft of the explore functionality based on `lonboard`
keewis Oct 1, 2024
3606fb2
expose the draft
keewis Oct 1, 2024
0851443
docstring for `explore`
keewis Oct 2, 2024
774cf3f
use the proper import from `matplotlib` for the standard normalizer
keewis Oct 2, 2024
2ffbb5f
use `pandas` to compute the half range
keewis Oct 2, 2024
6348ce2
specify `vmin` and `vmax`
keewis Oct 2, 2024
0c2dc44
explicitly specify `skipna`
keewis Oct 2, 2024
41856c1
refactor to construct the polygons as geoarrow
keewis Oct 8, 2024
091a7bd
allow choosing the transparency
keewis Oct 8, 2024
2ef3192
move the healpix-specific code to `xdggs.healpix`
keewis Oct 8, 2024
46411a4
change the signature of `cell_boundaries`
keewis Oct 8, 2024
05495b8
also have h3 support the geoarrow cell boundaries
keewis Oct 8, 2024
5149fa4
fix several typos
keewis Oct 8, 2024
1ec8bf3
adjust the tests to fit the new dateline fix algorithm
keewis Oct 8, 2024
269f684
update the list of extra dependencies for `explore`
keewis Oct 8, 2024
27a6193
mention that this only works for 1D arrays for now
keewis Oct 8, 2024
f7ddf09
add optional dependencies for `explore`
keewis Oct 8, 2024
e2958b7
explicitly use `pyproj` to construct the crs string
keewis Oct 8, 2024
f96a64b
raise an error if the geometry type is wrong
keewis Oct 8, 2024
49b54fe
wrap the output of `crs.to_json()` in a json dict
keewis Oct 8, 2024
20fd427
verify that both backends produce the same polygons
keewis Oct 9, 2024
8117e7d
move the data normalization to a separate function
keewis Oct 12, 2024
0a2f577
move the table creation to a separate function
keewis Oct 12, 2024
71f612a
check that the normalization works properly
keewis Oct 12, 2024
998e6fb
coverage configuration
keewis Oct 12, 2024
0d31059
pass on `center` to the normalizing function
keewis Oct 12, 2024
5a71559
skip the plotting module if `arro3.core` is not available
keewis Oct 12, 2024
76ffe15
use `json` to construct the arrow extension metadata
keewis Oct 12, 2024
84938a1
Revert "skip the plotting module if `arro3.core` is not available"
keewis Oct 12, 2024
6ca24de
workaround for missing macos-arm packages of arro3-core
keewis Oct 12, 2024
6d9b78a
install arro3-core using `pip`
keewis Oct 12, 2024
c891e12
always include the cell ids in the table data
keewis Oct 14, 2024
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
2 changes: 1 addition & 1 deletion xdggs/h3.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def polygons_geoarrow(wkb):
polygon_array.field.with_metadata(
{
"ARROW:extension:name": "geoarrow.polygon",
"ARROW:extension:metadata": crs.to_json(),
"ARROW:extension:metadata": f'{{"crs": {crs.to_json()}}}',
keewis marked this conversation as resolved.
Show resolved Hide resolved
}
)
)
Expand Down
4 changes: 2 additions & 2 deletions xdggs/healpix.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def polygons_geoarrow(vertices):
from arro3.core import list_array

polygon_vertices = np.concatenate([vertices, vertices[:, :1, :]], axis=1)
crs = pyproj.CRS.from_user_input("epsg:4326")
crs = pyproj.CRS.from_epsg(4326)

# construct geoarrow arrays
coords = np.reshape(polygon_vertices, (-1, 2))
Expand All @@ -52,7 +52,7 @@ def polygons_geoarrow(vertices):
polygon_array.field.with_metadata(
{
"ARROW:extension:name": "geoarrow.polygon",
"ARROW:extension:metadata": crs.to_json(),
"ARROW:extension:metadata": f'{{"crs": {crs.to_json()}}}',
}
)
)
Expand Down