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

Adding derived datatime for xarray #263

Merged
merged 4 commits into from
Jul 27, 2019
Merged

Adding derived datatime for xarray #263

merged 4 commits into from
Jul 27, 2019

Conversation

jsignell
Copy link
Member

@jsignell jsignell commented Jul 26, 2019

Closes #54

Allows using derived datetime for xarray objects

import xarray as xr
import hvplot.xarray
ds = xr.tutorial.open_dataset('air_temperature')
plot = ds.hvplot.violin(y='air', by='time.month')
plot

Screen Shot 2019-07-26 at 11 08 30 AM

ds.mean(dim=['lat', 'lon']).hvplot(by='time.hour')

Screen Shot 2019-07-26 at 11 08 38 AM

data.hvplot.scatter(y='air', x='time.dayofyear', by='time.year')

Screen Shot 2019-07-26 at 2 29 33 PM

Copy link
Member

@philippjfr philippjfr left a comment

Choose a reason for hiding this comment

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

This looks great!

@philippjfr philippjfr merged commit 62fb08b into master Jul 27, 2019
@jsignell jsignell deleted the jsignell/derived_dt branch July 29, 2019 13:04
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.

Derived datetime accessor (time.dayofyear)
2 participants