intake-xarray icon indicating copy to clipboard operation
intake-xarray copied to clipboard

Name of xarray object should be name of intake object

Open jsignell opened this issue 7 years ago • 3 comments

Outputting named xarray.DataArrays would make it easier to convert to xarray.Datasets and plot.

This should be very straightforward and large reward.

jsignell avatar Sep 05 '18 20:09 jsignell

Where would the name come from? This applies only to rasterIO or also elsewhere?

martindurant avatar Sep 05 '18 20:09 martindurant

Where would the name come from?

The name is the key in the catalog. It is already an attribute on the intake object. For example:

>>>cat.us_crime.name
'us_crime'

This applies only to rasterIO or also elsewhere?

I think it should apply everywhere, maybe in other plugins as well, but I haven't explored thoroughly. The pandas analogy for an xr.DataArray is a pd.Series which can also have a name. Naming these things just makes it easier to go to the next order object (xr.Dataset or pd.DataFrame)

jsignell avatar Sep 05 '18 21:09 jsignell

I see, that makes sense.

martindurant avatar Sep 05 '18 21:09 martindurant