home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

23 rows where user = 1550771 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, reactions, created_at (date), updated_at (date)

issue 9

  • Feature Proposal: `xarray.interactive` module 7
  • HoloViews based plotting API 5
  • Animate DataArrays 4
  • Add entrypoint for plotting backends 2
  • Mention that HoloViews supports xarray objects 1
  • simple command line interface for xarray 1
  • holoviews / bokeh doesn't like cftime coords 1
  • Add CRS/projection information to xarray objects 1
  • Value based indexing using .sel is broken on datetime coords 1

user 1

  • philippjfr · 23 ✖

author_association 1

  • NONE 23
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1141015434 https://github.com/pydata/xarray/issues/3709#issuecomment-1141015434 https://api.github.com/repos/pydata/xarray/issues/3709 IC_kwDOAMm_X85EAoOK philippjfr 1550771 2022-05-30T11:01:35Z 2022-05-30T11:01:35Z NONE

We'd probably have to write a so called HoloViews DataInterface for scipp. See the equivalent xarray implementation: https://github.com/holoviz/holoviews/blob/master/holoviews/core/data/xarray.py

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Feature Proposal: `xarray.interactive` module 552500673
680890282 https://github.com/pydata/xarray/issues/4377#issuecomment-680890282 https://api.github.com/repos/pydata/xarray/issues/4377 MDEyOklzc3VlQ29tbWVudDY4MDg5MDI4Mg== philippjfr 1550771 2020-08-26T13:46:56Z 2020-08-26T13:46:56Z NONE

Apologies, duplicate of https://github.com/pydata/xarray/issues/4283. Closing.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Value based indexing using .sel is broken on datetime coords 686324285
619318420 https://github.com/pydata/xarray/issues/3709#issuecomment-619318420 https://api.github.com/repos/pydata/xarray/issues/3709 MDEyOklzc3VlQ29tbWVudDYxOTMxODQyMA== philippjfr 1550771 2020-04-25T04:27:14Z 2020-04-25T04:27:14Z NONE

@TomNicholas I've been playing around with an interactive accessor, very much an experiment for now (and requires some small fixes in HoloViews) but I think this could be heading in the right direction:

https://anaconda.org/philippjfr/xarray_interactive/notebook

{
    "total_count": 9,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 9,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Feature Proposal: `xarray.interactive` module 552500673
619061738 https://github.com/pydata/xarray/pull/3640#issuecomment-619061738 https://api.github.com/repos/pydata/xarray/issues/3640 MDEyOklzc3VlQ29tbWVudDYxOTA2MTczOA== philippjfr 1550771 2020-04-24T14:56:21Z 2020-04-24T14:56:21Z NONE

To be clear, I'm just checking whether there's anything that I can or need to do in hvPlot so this can proceed smoothly.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add entrypoint for plotting backends 539394615
619061196 https://github.com/pydata/xarray/pull/3640#issuecomment-619061196 https://api.github.com/repos/pydata/xarray/issues/3640 MDEyOklzc3VlQ29tbWVudDYxOTA2MTE5Ng== philippjfr 1550771 2020-04-24T14:55:28Z 2020-04-24T14:55:28Z NONE

@andersy005 Sorry I never followed up here. Trying to get out a new hvPlot release very soon. What's the current status here? @jsignell do you have any comments?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add entrypoint for plotting backends 539394615
610341352 https://github.com/pydata/xarray/issues/3709#issuecomment-610341352 https://api.github.com/repos/pydata/xarray/issues/3709 MDEyOklzc3VlQ29tbWVudDYxMDM0MTM1Mg== philippjfr 1550771 2020-04-07T11:50:30Z 2020-04-07T11:50:56Z NONE

Having taken the ideas presented here as inspiration the latest HoloViews release actually extends what we had described above and provides the capability to use arbitrary xarray methods to transform the data and control the parameters of those transforms using Panel based widgets. The HoloViews docs show one such example built on xarray which is built around so call dim expressions:

```python import panel as pn import xarray as xr

air_temp = xr.tutorial.load_dataset('air_temperature')

We declare a dim expression which uses the quantile method from the xr namespace

and provides a panel FloatSlider as the argument to the expression

q = pn.widgets.FloatSlider(name='quantile') quantile_expr = hv.dim('air').xr.quantile(q, dim='time')

We now wrap the xarray Dataset in a HoloViews one, apply the dim expression and cast the result to an image

temp_ds = hv.Dataset(air_temp, ['lon', 'lat']) transformed = temp_ds.apply.transform(air=quantile_expr).apply(hv.Image)

Now we display the resulting transformation pipeline alongside the widget

pn.Column(q, transformed.opts(colorbar=True, width=400)) ```

I am likely to integrate this capability with hvPlot with a more intuitive API, e.g. in this case I'd expect to be able to spell this something like this:

python xrds = xr.tutorial.load_dataset('air_temperature') q = pn.widgets.FloatSlider(name='quantile') quantile_expr = hv.dim('air').xr.quantile(q, dim='time') xrds.hvplot.image(transforms={'air': quantile_expr})

{
    "total_count": 5,
    "+1": 5,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Feature Proposal: `xarray.interactive` module 552500673
577692145 https://github.com/pydata/xarray/issues/3709#issuecomment-577692145 https://api.github.com/repos/pydata/xarray/issues/3709 MDEyOklzc3VlQ29tbWVudDU3NzY5MjE0NQ== philippjfr 1550771 2020-01-23T13:57:16Z 2020-01-23T13:57:16Z NONE

I didn't appreciate exactly how much of this panels/holoviews can already do - I think I need to go away and experiment with using/wrapping them but aiming for an xarray-like syntax.

Maybe wait until early next week when I anticipate new Panel and HoloViews releases to be out which smooth out some issues with these workflows.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Feature Proposal: `xarray.interactive` module 552500673
577680001 https://github.com/pydata/xarray/issues/3709#issuecomment-577680001 https://api.github.com/repos/pydata/xarray/issues/3709 MDEyOklzc3VlQ29tbWVudDU3NzY4MDAwMQ== philippjfr 1550771 2020-01-23T13:25:03Z 2020-01-23T13:25:03Z NONE

One thing I didn't mention above is that in the pipeline I showed HoloViews will cache the intermediate changes so that if you change the color or change the resampling frequency it only executes the part of the pipeline downstream from where the parameter changed.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Feature Proposal: `xarray.interactive` module 552500673
577436046 https://github.com/pydata/xarray/issues/3709#issuecomment-577436046 https://api.github.com/repos/pydata/xarray/issues/3709 MDEyOklzc3VlQ29tbWVudDU3NzQzNjA0Ng== philippjfr 1550771 2020-01-22T23:33:17Z 2020-01-23T13:21:37Z NONE

I think the real power in this proposal is in the ability to chain operations on interactive components using an API that will be familiar to xarray users. We have a similar concept in HoloViews which allows you to build complex processing and visualization pipelines. I'll work through some examples in HoloViz ecosystem to show what is possible there and maybe provide some ideas or approaches that might work here.

Let's work with a relatively contrived but simple example and load the air_temperature sample dataset:

python airtemps = xr.tutorial.open_dataset('air_temperature') ds = hv.Dataset(airtemps)

In this example you explode your dataset into individual chunks for each longitude, then apply a reduction along the latitude and finally cast the output to a Curve giving us a Curve of the mean temperature at each longitude:

python curves = ds.groupby('lon', dynamic=True).apply.reduce(lat=np.mean).apply(hv.Curve).opts(width=600, framewise=True)

Now we decide we want to resample the data too, so we import the resample operation and apply it to our existing pipeline:

from holoviews.operation.timeseries import resample resample(curves, rule='7d')

But really we don't just want to compute the mean we want to pick the reduce function and we also want to be able to set the resampling frequency and pick a color. By combining Panel and HoloViews you can inject widget parameters at every stage:

```python function = pn.widgets.Select(name='Function', options={'mean': np.mean, 'min': np.min, 'max': np.max}) color = pn.widgets.ColorPicker(name='Color', value='#000000') rule = pn.widgets.TextInput(name='Rule', value='7d')

obj = (ds.groupby('lon', dynamic=True) .apply.reduce(lat=function) .apply(hv.Curve) .apply.opts(width=600, color=color, framewise=True) .apply(resample, rule=rule) )

hv_pane = pn.pane.HoloViews(obj)

pn.Row( hv_pane[0], pn.Column(*hv_pane[1][0], function, color, rule) ) ```

So this shows pretty clearly how useful this kind of chaining/pipeline building can be, especially when built on top of an API like xarray which allows for very powerful data manipulation. I don't have enough of a perspective to say how feasible it would be to implement something like this that comprehensively wraps xarray's API but I'd certainly love to see it. Whether it is built on Panel (which I am of course partial to as the author) or ipywidgets or even supporting both.

My main comments therefore are about the API, it is not clear to me based on what you have said so far which parts of the API are actually interactive, e.g. in this case:

python ida = da.interactive.isel(lat=50, lon=60) ida = (ida - ida.mean('time')).std(dim='time')

Is only sel/isel ever interactive or can other methods also be interactively set? If the answer is no then that's all clear enough and the scope relatively narrow but well defined. If however you intend the entire API (or at least some well defined subset of it) to be interactive then I think there should be some explicit way to declare which parts are interactive and where the values are coming from (and what the values should be if they can't be automatically determined). In the HoloViews example I showed above you explicitly supply widgets but if you don't want users to deal with manually laying things out then you could also just let the user supply the specification of the valid values. Something like in your first example:

python interactive.isel(da, plot_mean_over_time, time=slice(100, 500))

but expanded to include support for discrete lists of items, explicit widgets, and so on.

Hope that's at all helpful! I think the idea is really neat and it could be very powerful indeed.

{
    "total_count": 4,
    "+1": 4,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Feature Proposal: `xarray.interactive` module 552500673
576724600 https://github.com/pydata/xarray/issues/3709#issuecomment-576724600 https://api.github.com/repos/pydata/xarray/issues/3709 MDEyOklzc3VlQ29tbWVudDU3NjcyNDYwMA== philippjfr 1550771 2020-01-21T15:08:20Z 2020-01-21T15:08:20Z NONE

This looks really cool and I like the API! I'll have to give it a try to give more detailed feedback. Note that I'm not a core developer of xarray but I also think this is best managed as an external project.

Just wanted to ask some clarification on some of your comments.

Some downstream plotting libaries (such as @hvplot) already use widgets when interactively plotting xarray-derived data structures, but they don't seem to go the full N dimensions.

What do you mean by this? hvPlot does let you explore n-dimensional data using widgets, what is the limitation you were seeing there?

This also isn't something that should be confined to plotting functions - you often choose slices or variables at the start of analysis, not just at the end.

This is a good point, but I guess I'm not yet entirely clear on how your proposed APIs would deal with this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Feature Proposal: `xarray.interactive` module 552500673
497739327 https://github.com/pydata/xarray/issues/2030#issuecomment-497739327 https://api.github.com/repos/pydata/xarray/issues/2030 MDEyOklzc3VlQ29tbWVudDQ5NzczOTMyNw== philippjfr 1550771 2019-05-31T14:55:56Z 2019-05-31T14:55:56Z NONE

Small update in the syntax, which also happens to make it easier to set fps:

```python import xarray as xr import holoviews as hv hv.extension('matplotlib')

air = xr.tutorial.open_dataset('air_temperature').load() ds = hv.Dataset(air.isel(time=range(100))) images = ds.to(hv.Image, ['lon', 'lat']).options(fig_inches=(10, 5), colorbar=True, cmap='viridis') hv.save(images, 'hv_anim.mp4', fps=4) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Animate DataArrays 309965118
405105396 https://github.com/pydata/xarray/issues/2288#issuecomment-405105396 https://api.github.com/repos/pydata/xarray/issues/2288 MDEyOklzc3VlQ29tbWVudDQwNTEwNTM5Ng== philippjfr 1550771 2018-07-15T17:23:39Z 2018-07-15T17:23:39Z NONE

This would also be very helpful for geoviews.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add CRS/projection information to xarray objects 341331807
401603966 https://github.com/pydata/xarray/issues/2199#issuecomment-401603966 https://api.github.com/repos/pydata/xarray/issues/2199 MDEyOklzc3VlQ29tbWVudDQwMTYwMzk2Ng== philippjfr 1550771 2018-07-01T12:35:56Z 2018-07-01T12:35:56Z NONE

Thanks for everyone's feedback, due to trademark concerns we decided to rename both the library and the API to .hvplot. There should be a release and an announcement in the coming week.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  HoloViews based plotting API 327725925
394179490 https://github.com/pydata/xarray/issues/2199#issuecomment-394179490 https://api.github.com/repos/pydata/xarray/issues/2199 MDEyOklzc3VlQ29tbWVudDM5NDE3OTQ5MA== philippjfr 1550771 2018-06-03T17:56:40Z 2018-06-03T17:56:40Z NONE

Thanks again for the feedback, I've decided to go with .holoplot in the end. I'll work on finishing some of geo related features today and get a 0.1 release and announcement out this week.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  HoloViews based plotting API 327725925
393309581 https://github.com/pydata/xarray/issues/2199#issuecomment-393309581 https://api.github.com/repos/pydata/xarray/issues/2199 MDEyOklzc3VlQ29tbWVudDM5MzMwOTU4MQ== philippjfr 1550771 2018-05-30T20:34:39Z 2018-05-30T20:37:24Z NONE

something like DataArray.hv.plot.contourf() seems too deeply nested.

Actually I suppose that's not what it would be, it could be da.hv.plot and da.hv.contourf with .plot figuring out the kind for you. I quite like that too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  HoloViews based plotting API 327725925
393300042 https://github.com/pydata/xarray/issues/2199#issuecomment-393300042 https://api.github.com/repos/pydata/xarray/issues/2199 MDEyOklzc3VlQ29tbWVudDM5MzMwMDA0Mg== philippjfr 1550771 2018-05-30T20:06:29Z 2018-05-30T20:16:45Z NONE

I agree the accessor is the best option for now, but I have no strong opinions about the name of the accessor.

Okay thanks, given xarray's preference for accessor names to match projects I'm now leaning toward da.holoplot().

Automatic generation of DynamicMaps. Say I have a DataArray with dimensions ('time', 'lat', 'lon'); I should be able to say da.hv.plot(kdims=['lat', 'lon'] and have time become a dynamic selector.

HoloPlot explicitly does not deal with kdims and vdims instead more closely following the API of pd.DataFrame.plot and xr.DataArray. That said coordinates that are not assigned to the x/y axes will automatically result in a DynamicMap, so this will give you an image plot + a widget to select the time:

python da.holoplot(x='lon', y='lat', kind='image')

To go along with the above, lazy loading of dask-backed arrays

That should happen automatically.

Intelligent faceting which automatically links the facet kdims

You can facet in a number of ways:

python da.isel(time=slice(0, 3)).holoplot(x='lon', y='lat', kind='image', by='time')

will produce three subplots which are linked on the x- and y-axis, i.e. zooming on one will zoom on all unless you set shared_axes=False. You can also generate a grid with:

python da.isel(time=slice(0, 3)).holoplot(x='lon', y='lat', kind='image', row='time', col='some_other_coord')

Plotting not just of DataArrays but Datasets.

This is also already supported, the API here is:

python ds.holoplot(x='lon', y='lat', z=['air', 'surface'])

Will provide a widget to select between the 'air' and 'surface' data variable.

Options for projections, coastlines, etc. associated with geoviews

Currently working on that, it's basically just waiting on new HoloViews/GeoViews releases. The API here is as follows:

python air_ds.air.holoplot.quadmesh( 'lon', 'lat', ['air', 'some_other_variable'], crs=ccrs.PlateCarree(), projection=ccrs.Orthographic(-80, 30), global_extent=True, width=600, height=500, cmap='viridis' ) * gv.feature.coastline

{
    "total_count": 7,
    "+1": 4,
    "-1": 0,
    "laugh": 0,
    "hooray": 3,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  HoloViews based plotting API 327725925
393284049 https://github.com/pydata/xarray/issues/2199#issuecomment-393284049 https://api.github.com/repos/pydata/xarray/issues/2199 MDEyOklzc3VlQ29tbWVudDM5MzI4NDA0OQ== philippjfr 1550771 2018-05-30T19:16:32Z 2018-05-30T19:16:32Z NONE

Thanks for the feedback! I'll try to drive the pandas conversation along, but since I doubt that will be resolved in the near term so I think until then we should definitely pursue the accessor approach (which is much better than the property monkey patching we're doing now).

Personally I'd prefer DataArray.hvplot() since I think even the two extra characters make a difference and something like DataArray.hv.plot.contourf() seems too deeply nested. That said if "our preference for accessor names to match projects" is a solidly established convention I'll defer to that and go with DataArray.holoplot().

@rabernat Since you have used HoloViews with xarray in the past I'd very appreciate your input as well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  HoloViews based plotting API 327725925
390518653 https://github.com/pydata/xarray/issues/2164#issuecomment-390518653 https://api.github.com/repos/pydata/xarray/issues/2164 MDEyOklzc3VlQ29tbWVudDM5MDUxODY1Mw== philippjfr 1550771 2018-05-20T22:45:41Z 2018-05-21T03:14:33Z NONE

Thanks for the detailed example, I've been able to reproduce the issue. Part of it is that we need to add the new type(s) to holoviews.util.datetime_types. Secondly it seems like bokeh's date conversion code will also have to be made aware of this new type somehow (I haven't investigated that yet).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  holoviews / bokeh doesn't like cftime coords 324740017
378352966 https://github.com/pydata/xarray/issues/2034#issuecomment-378352966 https://api.github.com/repos/pydata/xarray/issues/2034 MDEyOklzc3VlQ29tbWVudDM3ODM1Mjk2Ng== philippjfr 1550771 2018-04-03T18:37:01Z 2018-04-03T18:37:27Z NONE

I'm not familiar with ncview myself, but based on the screenshots it shouldn't be too difficult to implement something that gets close on top of xarray/dask/geoviews/JupyterLab and some widget framework (probably bokeh widgets or ipywidgets). From my (biased) perspective that seems like the most straightforward approach anyway.

The thing I'm not sure about is how likely users of ncview are to adopt JupyterLab. That would determine whether it would make more sense to write it as a standalone app and integrate it with JupyterLab or build it entirely within JupyterLab. In either case I'd be happy to give pointers and help out both on the HoloViews/GeoViews front and on the JupyterLab development, which I've recently familiarized myself with.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  simple command line interface for xarray 310547057
377570022 https://github.com/pydata/xarray/issues/2030#issuecomment-377570022 https://api.github.com/repos/pydata/xarray/issues/2030 MDEyOklzc3VlQ29tbWVudDM3NzU3MDAyMg== philippjfr 1550771 2018-03-30T16:58:11Z 2018-03-30T16:58:11Z NONE

@benbovy Yes that's right, my apologies, I always work with the bleeding edge and forget what was merged before the last release. What I posted will be valid in 1.10.0, due to be released next week.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Animate DataArrays 309965118
377566839 https://github.com/pydata/xarray/issues/2030#issuecomment-377566839 https://api.github.com/repos/pydata/xarray/issues/2030 MDEyOklzc3VlQ29tbWVudDM3NzU2NjgzOQ== philippjfr 1550771 2018-03-30T16:44:35Z 2018-03-30T16:44:35Z NONE

I hand't found anything like that.

Yes, the Plotting with Matplotlib section in the user guide should cover it but it appears to be broken in the last website build.

For me, %%output isn't a recognized magic command

That will only work in the notebook after you have run hv.extension('matplotlib').

fails for me with a tkinter-related error (can't invoke "wm" command), so I really couldn't see anything yet.

You might have to switch to a different matplotlib GUI toolkit or forego one entirely and use agg, either by declaring it in your matplotlib.rc or by setting the backend before importing holoviews, e.g.:

import matplotlib matplotlib.use('Agg')

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Animate DataArrays 309965118
377550475 https://github.com/pydata/xarray/issues/2030#issuecomment-377550475 https://api.github.com/repos/pydata/xarray/issues/2030 MDEyOklzc3VlQ29tbWVudDM3NzU1MDQ3NQ== philippjfr 1550771 2018-03-30T15:31:45Z 2018-03-30T15:44:24Z NONE

The fact that it can't create an animation file (as far as I could tell so far) does mean I can't use it, though

You can create animation files using the matplotlib backend in holoviews, as a simple example:

```python import xarray as xr import holoviews as hv hv.extension('matplotlib')

air = xr.tutorial.load_dataset('air_temperature') ds = hv.Dataset(air.isel(time=range(100))) images = ds.to(hv.Image, ['lon', 'lat']).options(fig_inches=(10, 5), colorbar=True, cmap='viridis') ```

To display it in the notebook:

python %%output holomap='mp4' images

To save it to file:

python renderer = hv.renderer('matplotlib') renderer.save(images, 'hv_anim', 'mp4')

{
    "total_count": 5,
    "+1": 5,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Animate DataArrays 309965118
274999158 https://github.com/pydata/xarray/pull/1226#issuecomment-274999158 https://api.github.com/repos/pydata/xarray/issues/1226 MDEyOklzc3VlQ29tbWVudDI3NDk5OTE1OA== philippjfr 1550771 2017-01-25T02:06:20Z 2017-01-25T02:06:20Z NONE

Thanks @shoyer! I'll be adding more documentation about xarray support for our next release.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Mention that HoloViews supports xarray objects 202966470

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 16.205ms · About: xarray-datasette