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

Fix dask tiles regression #1432

Merged
merged 4 commits into from
Oct 10, 2024
Merged

Fix dask tiles regression #1432

merged 4 commits into from
Oct 10, 2024

Conversation

ahuang11
Copy link
Collaborator

@ahuang11 ahuang11 commented Oct 4, 2024

Closes #1431

import dask.dataframe as dd
import hvplot.dask  # noqa
import pandas as pd

data = {"x": [-9700947, -9584977], "y": [3890186, 3824923]}
df = dd.from_pandas(pd.DataFrame(data), npartitions=2)
df.hvplot.points("x", "y", tiles=True)
image

Copy link
Member

@hoxbro hoxbro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failing test

hvplot/converter.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 82.60870% with 4 lines in your changes missing coverage. Please review.

Project coverage is 88.93%. Comparing base (b36e3a1) to head (7ca3a78).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
hvplot/tests/testgeowithoutgv.py 86.66% 2 Missing ⚠️
hvplot/util.py 71.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1432      +/-   ##
==========================================
- Coverage   88.94%   88.93%   -0.01%     
==========================================
  Files          52       52              
  Lines        7751     7775      +24     
==========================================
+ Hits         6894     6915      +21     
- Misses        857      860       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

hvplot/converter.py Outdated Show resolved Hide resolved
@ahuang11 ahuang11 requested a review from hoxbro October 9, 2024 14:53
hvplot/converter.py Outdated Show resolved Hide resolved
hvplot/util.py Show resolved Hide resolved
Copy link
Member

@maximlt maximlt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we recommend to users that have a dask dataset with lat/lon coordinates?

hvplot/util.py Show resolved Hide resolved
@philippjfr
Copy link
Member

What do we recommend to users that have a dask dataset with lat/lon coordinates?

Good question, you should still be able to make it project by explicitly requesting it.

Co-authored-by: Simon Høxbro Hansen <[email protected]>
@ahuang11
Copy link
Collaborator Author

ahuang11 commented Oct 10, 2024

What do we recommend to users that have a dask dataset with lat/lon coordinates?

Same behavior from <0.11 releases; manually setting crs and projection; not sure if this needs to be explicitly called out though since I do mention "automatically unless..."

If coordinate values fall within lat/lon bounds, auto-projects to EPSG:3857 unless projection=False or if the data is lazily loaded (dask / ibis).

@maximlt
Copy link
Member

maximlt commented Oct 10, 2024

What do we recommend to users that have a dask dataset with lat/lon coordinates?

Same behavior from <0.11 releases; manually setting crs and projection; not sure if this needs to be explicitly called out though since I do mention "automatically unless..."

If coordinate values fall within lat/lon bounds, auto-projects to EPSG:3857 unless projection=False or if the data is lazily loaded (dask / ibis).

But that still requires GeoViews? If so, maybe there's a way to special case crs="4326" (or some of the other allowed values) so it doesn't use GeoViews. But I'd say that's for another PR, this one was about fixing the regression and it achieved that, thanks.

@maximlt maximlt merged commit 815af95 into main Oct 10, 2024
8 of 9 checks passed
@maximlt maximlt deleted the fix_dask_tiles_regression branch October 10, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tiles with Dask DataFrame no longer works in 0.11.0
4 participants