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/pull/1272#issuecomment-331495109,https://api.github.com/repos/pydata/xarray/issues/1272,331495109,MDEyOklzc3VlQ29tbWVudDMzMTQ5NTEwOQ==,2443309,2017-09-22T16:27:28Z,2017-09-22T16:27:28Z,MEMBER,In it goes. Thanks @darothen! ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-331283075,https://api.github.com/repos/pydata/xarray/issues/1272,331283075,MDEyOklzc3VlQ29tbWVudDMzMTI4MzA3NQ==,1217238,2017-09-21T21:11:07Z,2017-09-21T21:11:07Z,MEMBER,"We just bumped numpy to 1.11, but 1.12 would be too new. Let's just add a `np.flip` backport to `core/npcompat.py`. The [whole function](https://github.com/numpy/numpy/blob/master/numpy/lib/function_base.py#L140-L209) is only a couple of lines.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-331281120,https://api.github.com/repos/pydata/xarray/issues/1272,331281120,MDEyOklzc3VlQ29tbWVudDMzMTI4MTEyMA==,4992424,2017-09-21T21:02:39Z,2017-09-21T21:10:51Z,NONE,"@jhamman Ohhh i totally misunderstood the last readout from travis-ci. Dealing with the scipy dependency is easy enough. ~However, another test fails because it uses [`np.flip()`](https://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.flip.html) which wasn't added to numpy until v1.12.0. Do we want to bump the numpy version in the dependencies? Or is there another aproach to take here?~ Nevermind, easy solution is just to use other axis-reversal methods :)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-331279024,https://api.github.com/repos/pydata/xarray/issues/1272,331279024,MDEyOklzc3VlQ29tbWVudDMzMTI3OTAyNA==,2443309,2017-09-21T20:54:51Z,2017-09-21T20:54:51Z,MEMBER,@darothen - almost there. Two or three more dependency conflicts in the tests. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-330910590,https://api.github.com/repos/pydata/xarray/issues/1272,330910590,MDEyOklzc3VlQ29tbWVudDMzMDkxMDU5MA==,4992424,2017-09-20T16:41:01Z,2017-09-20T16:41:01Z,NONE,"@jhamman done - caught me right while I was compiling GEOS-Chem, and the merge conflicts were very simple.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-330909820,https://api.github.com/repos/pydata/xarray/issues/1272,330909820,MDEyOklzc3VlQ29tbWVudDMzMDkwOTgyMA==,2443309,2017-09-20T16:37:59Z,2017-09-20T16:37:59Z,MEMBER,Thanks @darothen - can you resolve the merge conflicts?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-330840457,https://api.github.com/repos/pydata/xarray/issues/1272,330840457,MDEyOklzc3VlQ29tbWVudDMzMDg0MDQ1Nw==,4992424,2017-09-20T12:47:08Z,2017-09-20T12:47:08Z,NONE,"@jhamman Think we're good. I deferred 4 small pep8 issues because they're in parts of the codebase which I don't think I ever touched, and i'm worried they're going to screw up the merge.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-330575547,https://api.github.com/repos/pydata/xarray/issues/1272,330575547,MDEyOklzc3VlQ29tbWVudDMzMDU3NTU0Nw==,2443309,2017-09-19T15:23:54Z,2017-09-19T15:23:54Z,MEMBER,@darothen - we have a few other PRs to wrap up for 0.10 so end of the week is okay.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-330530760,https://api.github.com/repos/pydata/xarray/issues/1272,330530760,MDEyOklzc3VlQ29tbWVudDMzMDUzMDc2MA==,4992424,2017-09-19T12:58:34Z,2017-09-19T12:58:34Z,NONE,"@jhamman Gotcha, I'll clean everything up by the end of the week. If that's going to block 0.10.0, let me know and I'll shuffle some things around to prioritize this.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-329227114,https://api.github.com/repos/pydata/xarray/issues/1272,329227114,MDEyOklzc3VlQ29tbWVudDMyOTIyNzExNA==,4992424,2017-09-13T16:43:32Z,2017-09-13T16:43:32Z,NONE,@shoyer fixed.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-329162517,https://api.github.com/repos/pydata/xarray/issues/1272,329162517,MDEyOklzc3VlQ29tbWVudDMyOTE2MjUxNw==,4992424,2017-09-13T13:10:04Z,2017-09-13T13:10:04Z,NONE,Hmmm. Something is really screwy with my feature branch and making the task of cleaning up the merge difficult. I'll work on fixing this.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-329039697,https://api.github.com/repos/pydata/xarray/issues/1272,329039697,MDEyOklzc3VlQ29tbWVudDMyOTAzOTY5Nw==,4992424,2017-09-13T02:34:21Z,2017-09-13T02:34:21Z,NONE,"Try refreshing? Latest commit is 7a767d8 and has all these changes plus some more tweaks. *Daniel Rothenberg * Postdoctoral Research Associate Center for Global Change Science Massachusetts Institute of Technology *A: *77 Massachusetts Ave | E18-402A Cambridge, MA 02139 *T: *(502) 648-7513; *T: *(617) 258-0407 *E: *darothen@mit.edu *H: *www.danielrothenberg.com [image: http://www.linkedin.com/in/rothenbergdaniel/] On Tue, Sep 12, 2017 at 12:02 PM, Stephan Hoyer wrote: > *@shoyer* commented on this pull request. > ------------------------------ > > In xarray/core/resample.py > : > > > > - f = interp1d(x, y, kind=kind, axis=axis, bounds_error=True, > - assume_sorted=True) > + # Prepare coordinates by dropping non-dimension coordinates along the > + # resampling dimension. > + # note: the lower-level Variable API could be used to speed this up > + coords = OrderedDict() > + if self._obj.data_vars: > + var = list(self._obj.data_vars.keys())[0] > + da = self._obj[var].copy() > > did you push those commits yet? I'm not seeing it yet > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > , or mute > the thread > > . > ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-326689304,https://api.github.com/repos/pydata/xarray/issues/1272,326689304,MDEyOklzc3VlQ29tbWVudDMyNjY4OTMwNA==,4992424,2017-09-01T21:38:18Z,2017-09-01T21:38:18Z,NONE,"Resolved to drop auxiliary coordinates which are defined along the dimension to be re-sampled. This makes sense; if someone wants them to be interpolated or manipulated in some way, then they should promote them from coordinates to variables before doing the resampling. In response to #1328, `count()` works just fine if you call it from a `Resample` object. Works for both resampling and up-sampling, but it will preserve the shape of the non-resampled dimensions. I think that's fine, because `count()` treats NaN as missing by default, so you can immediately know in which grid cells you have missing data :) Final review, @shoyer, before merging in anticipation of 0.10.0?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-324175792,https://api.github.com/repos/pydata/xarray/issues/1272,324175792,MDEyOklzc3VlQ29tbWVudDMyNDE3NTc5Mg==,1217238,2017-08-22T23:05:49Z,2017-08-22T23:05:49Z,MEMBER,"> I've opted not to include a chart outlining the various upsampling options... This is OK by me","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-323539716,https://api.github.com/repos/pydata/xarray/issues/1272,323539716,MDEyOklzc3VlQ29tbWVudDMyMzUzOTcxNg==,4992424,2017-08-19T18:24:29Z,2017-08-19T18:24:29Z,NONE,"All set except for my one question to @shoyer above. I've opted not to include a chart outlining the various upsampling options... couldn't really think of a nice and clean way to do so, because adding it to the time series doc page ends up being really ugly and there isn't quite enough substance for its own worked example page.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-320297159,https://api.github.com/repos/pydata/xarray/issues/1272,320297159,MDEyOklzc3VlQ29tbWVudDMyMDI5NzE1OQ==,4992424,2017-08-04T16:45:56Z,2017-08-19T18:23:06Z,NONE,"Okay, it was a bit of effort but I implemented upsampling. For the padding methods I just re-index the Dataset or DataArray using the re-sampled time frequencies. I also added interpolation, but that was a bit tricky; we have to sort of break the split-apply-combine idiom to do that, so I created a `Resampler` mix-in which could contain the logic for the up-sampling. The `DatasetResampler` and `DataArrayResampler` each then implement similar logic for doing the interpolation. The up-sampling is designed to work with n-dimensional data. The padding methods work 100% with dask arrays - since we're just calling xarray methods which themselves work with dask arrays! There are some eager computations (just the calculation of the up-sampled time frequencies) but I don't think that's a major issue; the actual re-indexing/padding is deferred. Interpolation works with dask arrays too, but eagerly does the computations. Could use a review from @shoyer or @jhamman. New **TODO** list: - [ ] Add example chart to the timeseries doc page comparing the different upsampling options - [x] Additional up-sampling test cases for both `DataArray`s and `Dataset`s - [x] Code clean-up - [x] What's new","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-323500774,https://api.github.com/repos/pydata/xarray/issues/1272,323500774,MDEyOklzc3VlQ29tbWVudDMyMzUwMDc3NA==,1217238,2017-08-19T04:58:56Z,2017-08-19T04:58:56Z,MEMBER,I like your approach here! Just some various comments on the implementation.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-316404161,https://api.github.com/repos/pydata/xarray/issues/1272,316404161,MDEyOklzc3VlQ29tbWVudDMxNjQwNDE2MQ==,4992424,2017-07-19T14:24:38Z,2017-08-04T16:39:53Z,NONE,"### TODO - [x] ensure that `count()` works on `Data{Array,set}Resample` objects - [x] refactor `Data{Array,set}Resample` objects into a stand-alone file **core/resample.py** alongside **core/groupby.py** - [x] wrap `pytest.warns` around tests targeting old API - [x] move old API tests into stand-alone - [x] Crude up-sampling. Copy/pasting Stephan's earlier comment from Feb 20: > I think we need to fix this before merging this PR, since it suggests the existing functionality would only exist in deprecated form. Pandas does this with a method called .asfreq, though this is basically pure sugar since in practice I think it works exactly the same as .first (or .mean if only doing pure upsampling). --- Alright @jhamman, here's the complete list of work left here. I'll tackle some of it during my commutes this week.","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-319988645,https://api.github.com/repos/pydata/xarray/issues/1272,319988645,MDEyOklzc3VlQ29tbWVudDMxOTk4ODY0NQ==,4992424,2017-08-03T14:39:04Z,2017-08-03T14:39:04Z,NONE,"Finished off everything except upsampling. In pandas, all [upsampling](https://github.com/pandas-dev/pandas/blob/d02ef6f04466e4a74f67ad584cf38cdc6df56e42/pandas/core/resample.py#L890) works by constructing a new time index (which we already do) and then filling in the NaNs that result in the dataset with one of a few different rules. Not sure how involved this will be, but I anticipate this can all be implemented in core/resample.py","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-316398830,https://api.github.com/repos/pydata/xarray/issues/1272,316398830,MDEyOklzc3VlQ29tbWVudDMxNjM5ODgzMA==,4992424,2017-07-19T14:07:00Z,2017-07-19T14:07:00Z,NONE,I did my best to re-base everything to master... plan on spending an hour or so figuring out what's broken and at least restoring the status quo.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-315355743,https://api.github.com/repos/pydata/xarray/issues/1272,315355743,MDEyOklzc3VlQ29tbWVudDMxNTM1NTc0Mw==,4992424,2017-07-14T13:10:22Z,2017-07-14T13:10:22Z,NONE,"I think a pull against the new releases is critical to see what breaks. Beyond that, just code clean up and testing. I can try to bump this higher on my priority list.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-315180497,https://api.github.com/repos/pydata/xarray/issues/1272,315180497,MDEyOklzc3VlQ29tbWVudDMxNTE4MDQ5Nw==,2443309,2017-07-13T19:38:14Z,2017-07-13T19:38:14Z,MEMBER,@darothen - can you give a summary of what's left to do here?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-283473505,https://api.github.com/repos/pydata/xarray/issues/1272,283473505,MDEyOklzc3VlQ29tbWVudDI4MzQ3MzUwNQ==,1217238,2017-03-01T21:19:13Z,2017-03-01T21:19:13Z,MEMBER,"> I can't really find many examples of people using this as a substitute for time group-bys... it seems that's what the pd.TimeGrouper is for, in conjunction with a normal .groupby(). I think this is mostly because TimeGrouper has been around far longer than non-aggregating resample.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-283448614,https://api.github.com/repos/pydata/xarray/issues/1272,283448614,MDEyOklzc3VlQ29tbWVudDI4MzQ0ODYxNA==,4992424,2017-03-01T19:46:46Z,2017-03-01T19:46:46Z,NONE,"Should `.apply()` really work on non-aggregation functions? Based on the [pandas documentation](http://pandas.pydata.org/pandas-docs/stable/timeseries.html#resampling) it seems like ""resample"" is truly just a synonym for a transformation of the time dimension. I can't really find many examples of people using this as a substitute for time group-bys... it seems that's what the `pd.TimeGrouper` is for, in conjunction with a normal `.groupby()`. As written, non-aggregation (""transformation""?) doesn't work because the call in `_combine()` to `_maybe_reorder()` messes things up (it drops all of the data along the resampled dimension). It shouldn't be too hard to fix this, although I'm leaning more and more to making stand-alone `Data{Array,set}Resample` classes in a separate file which only loosely inherit from their `Data{Array,set}GroupBy` cousins, since they need to re-write some really critical parts of the underlying machinery. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-281208031,https://api.github.com/repos/pydata/xarray/issues/1272,281208031,MDEyOklzc3VlQ29tbWVudDI4MTIwODAzMQ==,4992424,2017-02-20T23:51:01Z,2017-02-20T23:51:01Z,NONE,"Thanks for the feedback, @shoyer! Will circle back around to continue working on this in a few days when I have some free time. - Daniel ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-281189948,https://api.github.com/repos/pydata/xarray/issues/1272,281189948,MDEyOklzc3VlQ29tbWVudDI4MTE4OTk0OA==,1217238,2017-02-20T21:50:05Z,2017-02-20T21:50:05Z,MEMBER,"> The only issue now is the signature for init() in Data{set,Array}Resample, where we have to add in two keyword arguments. Python 2.x doesn't like named arguments after *args. There are a few options here, mostly just playing with **kwargs as in this StackOverflow thread. Yes, use `pop`, e.g., `dim = kwargs.pop('dim', None)`. `pop` removes the arguments from kwargs, so you can pass on the remaining ones unchanged to the super class method.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185 https://github.com/pydata/xarray/pull/1272#issuecomment-281186680,https://api.github.com/repos/pydata/xarray/issues/1272,281186680,MDEyOklzc3VlQ29tbWVudDI4MTE4NjY4MA==,4992424,2017-02-20T21:36:06Z,2017-02-20T21:36:06Z,NONE,"Smoothed out most of the problems from earlier and missing details. Still not sure if it's wise to refactor most of the resampling logic into a new **resample.py**, like what was done with **rolling**, but it still makes some sense to keep things in **groupby.py** because we're just subclassing existing machinery from there. The only issue now is the signature for **__init__()** in `Data{set,Array}Resample`, where we have to add in two keyword arguments. Python 2.x doesn't like named arguments after *\*args*. There are a few options here, mostly just playing with *\*\*kwargs* as in [this StackOverflow thread](http://stackoverflow.com/questions/15301999/python-2-x-default-arguments-with-args-and-kwargs). ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,208215185