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

Add robust keyword #1291

Merged
merged 9 commits into from
Mar 27, 2024
Merged

Add robust keyword #1291

merged 9 commits into from
Mar 27, 2024

Conversation

ahuang11
Copy link
Collaborator

@ahuang11 ahuang11 commented Mar 4, 2024

Closes #1251

from pystac_client import Client
from odc.stac import load
import hvplot.xarray

client = Client.open("https://earth-search.aws.element84.com/v1")
collection = "sentinel-2-l2a"
tas_bbox = [146.5, -43.6, 146.7, -43.4]
search = client.search(collections=[collection], bbox=tas_bbox, datetime="2023-12")

ds = load(search.items(), bbox=tas_bbox, groupby="solar_day", chunks={})
da = ds[["red", "green", "blue"]].isel(time=2).load().to_array()

da.hvplot.rgb("x", "y", bands="variable", robust=True)
image

hvplot/converter.py Outdated Show resolved Hide resolved
@ahuang11
Copy link
Collaborator Author

ahuang11 commented Mar 19, 2024

Any thoughts about this @maximlt? I'd like to use it for a tutorial.

@maximlt
Copy link
Member

maximlt commented Mar 20, 2024

Oh sorry, I didn't realize this was ready. I'll review it today.

@maximlt
Copy link
Member

maximlt commented Mar 20, 2024

I'd like to use it for a tutorial.

Do you need a release? If so, when?

@ahuang11
Copy link
Collaborator Author

Not in a rush! Maybe next week?

hvplot/converter.py Outdated Show resolved Hide resolved
hvplot/converter.py Outdated Show resolved Hide resolved
hvplot/converter.py Outdated Show resolved Hide resolved
hvplot/converter.py Outdated Show resolved Hide resolved
ahuang11 and others added 2 commits March 25, 2024 07:37
Co-authored-by: Maxime Liquet <35924738+maximlt@users.noreply.github.com>
@ahuang11 ahuang11 requested a review from maximlt March 25, 2024 14:39
@ahuang11
Copy link
Collaborator Author

ahuang11 commented Mar 26, 2024

Follows xarray now.

robust also works with image.

image image

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.

LGTM!

@ahuang11 ahuang11 merged commit c5a1d3b into main Mar 27, 2024
9 checks passed
@ahuang11 ahuang11 deleted the hvplot_converter branch March 27, 2024 03:34
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.

robust or clim_percentile option to get the 2nd / 98th percentile
2 participants