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

Adds fugue integration #1102

Merged
merged 6 commits into from
Oct 8, 2023
Merged

Adds fugue integration #1102

merged 6 commits into from
Oct 8, 2023

Conversation

ahuang11
Copy link
Collaborator

Closes #1097

Surprisingly easy to set up! cc: @goodwanghan

import xarray as xr
import hvplot.pandas
import fugue.api as fa
from hvplot.fugue import _parse_hvplot

ds = xr.tutorial.open_dataset("air_temperature")
df = ds.groupby("time.season").mean().mean("lon").to_dataframe().reset_index()

fa.fugue_sql(
    """
    OUTPUT df USING hvplot:points(
        x="lat",
        y="air",
        by="season",
        size=100,
        opts={"width": 500, "height": 500}
    )
    """
)
image

Also, not sure if we should change this:

        assert_or_throw(len(dfs) == 1, FugueWorkflowError("not single input"))

hvplot + panel can probably dump extra dfs in tabs, but I just followed this example
https://github.com/vizzuhq/ipyvizzu/blob/main/src/ipyvizzu/integrations/fugue.py#L54

@maximlt maximlt added this to the 0.9.0 milestone Oct 2, 2023
@maximlt maximlt self-requested a review October 2, 2023 08:37
@maximlt maximlt merged commit 268b12a into main Oct 8, 2023
@maximlt maximlt deleted the add_fugue_integration branch October 8, 2023 13:46
ahuang11 added a commit that referenced this pull request Oct 10, 2023
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.

Create a Fugue integration similar to ipyvizzu
2 participants