html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/1596#issuecomment-332624901,https://api.github.com/repos/pydata/xarray/issues/1596,332624901,MDEyOklzc3VlQ29tbWVudDMzMjYyNDkwMQ==,5700886,2017-09-27T19:08:59Z,2017-09-27T19:08:59Z,CONTRIBUTOR,"Not really minimal but shows a real use:
> ```python
> from pathlib import Path
> import matplotlib.pyplot as plt
> import xarray as xr
>
> # create data path
> daily_data_path = Path(""/obs_data/"") / ""ASCAT"" / ""v1.x.x"" / ""data/Daily/Netcdf""
>
> # get data files and open mf dataset
> data_files_2016 = daily_data_path.glob(""2016/??/??/*.nc"")
> raw_data_set = xr.open_mfdataset(data_files_2016).isel(latitude=300,
> longitude=0)
>
> # Resample with filling gaps by NaN's and shift to match original time axis
> infilled_data_set = raw_data_set.resample(time=""1D"").asfreq()
> infilled_data_set.time.data += (raw_data_set.time.data[0] -
> infilled_data_set.time.data[0])
>
> # extract wind speeds
> rws = raw_data_set.wind_speed
> iws = infilled_data_set.wind_speed.rename(""resampled_wind_speed"")
>
> # and plot (with a slight offset to be able to distinguish the lines)
>
> fig, ax = plt.subplots(2, 1)
>
> (iws+1).plot(ax=ax[0]);
> rws.plot(ax=ax[0]);
> ax[0].legend([""resampled"", ""original""], loc=0, ncol=2);
>
> (iws+1).sel(time=slice(""2016-08-01"", ""2016-10-01"")).plot(ax=ax[1]);
> rws.sel(time=slice(""2016-08-01"", ""2016-10-01"")).plot(ax=ax[1]);
> ```
>
> 
>
> Note the gaps that are more clearly visible in the lower panel.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,260912521
https://github.com/pydata/xarray/issues/1596#issuecomment-332619692,https://api.github.com/repos/pydata/xarray/issues/1596,332619692,MDEyOklzc3VlQ29tbWVudDMzMjYxOTY5Mg==,4992424,2017-09-27T18:49:34Z,2017-09-27T18:49:34Z,NONE,@willirath Never hurts! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,260912521
https://github.com/pydata/xarray/issues/1596#issuecomment-332617308,https://api.github.com/repos/pydata/xarray/issues/1596,332617308,MDEyOklzc3VlQ29tbWVudDMzMjYxNzMwOA==,5700886,2017-09-27T18:41:10Z,2017-09-27T18:41:10Z,CONTRIBUTOR,Shoud I provide a minimal real-world-example?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,260912521
https://github.com/pydata/xarray/issues/1596#issuecomment-332614980,https://api.github.com/repos/pydata/xarray/issues/1596,332614980,MDEyOklzc3VlQ29tbWVudDMzMjYxNDk4MA==,5700886,2017-09-27T18:32:54Z,2017-09-27T18:32:54Z,CONTRIBUTOR,Does exactly what I need. Thanks!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,260912521
https://github.com/pydata/xarray/issues/1596#issuecomment-332519089,https://api.github.com/repos/pydata/xarray/issues/1596,332519089,MDEyOklzc3VlQ29tbWVudDMzMjUxOTA4OQ==,4992424,2017-09-27T13:23:38Z,2017-09-27T13:23:38Z,NONE,"@willirath is your time data equally spaced? If so, you should be able to use the new version of `DataArray.resample()` available on the master (and scheduled for the 0.10.0 release) which supports upsampling/infilling.
Should work something like this, assuming each timestep is a daily value on the **time** axis:
``` python
ds = xr.open_mfdataset(""paths/to/my/data.nc"")
ds_infilled = ds.resample(time='1D').asfreq()
```
That should get you nans wherever your data is missing.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,260912521