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

docs(examples): add asof_join weather example #10507

Merged
merged 2 commits into from
Nov 20, 2024

Conversation

IndexSeek
Copy link
Member

Description of changes

Sets up a scenario for an example of using asof_join using weather data, including sensor data collection and various weather events.

Copy link
Member

@gforsyth gforsyth left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together @IndexSeek ! One small nit to avoid pain in the future.

Comment on lines 3286 to 3288
>>> sensors.asof_join(events, on="event_time", predicates="site", tolerance=tolerance).drop(
... "event_time_right"
... )
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we can order here by event_time? Or by humidity, I guess -- but we'll want a consistent ordering so the doctests don't fail randomly due to row order

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for the reminder, good catch! This ordering not only helps ensure the doctests pass but I think it makes the asof_join result a bit clearer to the user seeing the gaps where they are.

Copy link
Member

@gforsyth gforsyth left a comment

Choose a reason for hiding this comment

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

:shipit:

@gforsyth gforsyth merged commit 7595ca6 into ibis-project:main Nov 20, 2024
76 checks passed
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.

2 participants