id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 2278499376,PR_kwDOAMm_X85uhFke,8997,"Zarr: Optimize `region=""auto""` detection",2448579,open,0,,,1,2024-05-03T22:13:18Z,2024-05-04T21:47:39Z,,MEMBER,,0,pydata/xarray/pulls/8997,"1. This moves the region detection code into `ZarrStore` so we only open the store once. 2. Instead of opening the store as a dataset, construct a `pd.Index` directly to ""auto""-infer the region. The diff is large mostly because a bunch of code moved from `backends/api.py` to `backends/zarr.py`","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8997/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 2278510478,PR_kwDOAMm_X85uhIGP,8998,Zarr: Optimize appending,2448579,open,0,,,0,2024-05-03T22:21:44Z,2024-05-03T22:23:34Z,,MEMBER,,1,pydata/xarray/pulls/8998,Builds on #8997 ,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8998/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 2187743087,PR_kwDOAMm_X85ptH1f,8840,"Grouper, Resampler as public api",2448579,open,0,,,0,2024-03-15T05:16:05Z,2024-04-21T16:21:34Z,,MEMBER,,1,pydata/xarray/pulls/8840,"Expose Grouper and Resampler as public API TODO: - [ ] Consider avoiding IndexVariable ----- - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [x] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8840/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 2215762637,PR_kwDOAMm_X85rMHpN,8893,Avoid extra read from disk when creating Pandas Index.,2448579,open,0,,,1,2024-03-29T17:44:52Z,2024-04-08T18:55:09Z,,MEMBER,,0,pydata/xarray/pulls/8893," ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8893/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 2224297504,PR_kwDOAMm_X85rpGUH,8906,Add invariant check for IndexVariable.name,2448579,open,0,,,1,2024-04-04T02:13:33Z,2024-04-05T07:12:54Z,,MEMBER,,1,pydata/xarray/pulls/8906," @benbovy this seems to be the root cause of #8646, the variable name in `Dataset._variables` does not match `IndexVariable.name`. A good number of tests seem to fail though, so not sure if this is a good chck. - [ ] Closes #xxxx - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8906/reactions"", ""total_count"": 2, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 2, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1997636679,PR_kwDOAMm_X85frAC_,8460,Add initialize_zarr,2448579,open,0,,,8,2023-11-16T19:45:05Z,2024-04-02T15:08:01Z,,MEMBER,,1,pydata/xarray/pulls/8460,"- [x] Closes #8343 - [x] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [x] New functions/methods are listed in `api.rst` The intended pattern is: ```python after_init = initialize_zarr(store, ds, region_dims=(""x"",)) for i in range(ds.sizes[""x""]): after_init.isel(x=[i]).to_zarr(store, region={""x"": slice(i, i + 1)}) ``` cc @slevang ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8460/reactions"", ""total_count"": 5, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 3, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 2}",,,13221727,pull 2021856935,PR_kwDOAMm_X85g81gb,8509,Proof of concept - public Grouper objects,2448579,open,0,,,0,2023-12-02T04:52:27Z,2024-03-15T05:18:18Z,,MEMBER,,1,pydata/xarray/pulls/8509,"Not for merging, just proof that it can be done nicely :) Now builds on #8840 ~Builds on an older version of #8507~ Try it out! ```python import xarray as xr from xarray.core.groupers import SeasonGrouper, SeasonResampler ds = xr.tutorial.open_dataset(""air_temperature"") # custom seasons! ds.air.groupby(time=SeasonGrouper([""JF"", ""MAM"", ""JJAS"", ""OND""])).mean() ds.air.resample(time=SeasonResampler([""DJF"", ""MAM"", ""JJAS"", ""ON""])).count() ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8509/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1975400777,PR_kwDOAMm_X85efqSl,8408,Generalize explicit_indexing_adapter,2448579,open,0,,,0,2023-11-03T03:29:40Z,2023-11-03T03:53:25Z,,MEMBER,,1,pydata/xarray/pulls/8408,Use `as_indexable` instead of `NumpyIndexingAdapter`,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8408/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1902086612,PR_kwDOAMm_X85aoYuf,8206,flox: Set fill_value=np.nan always.,2448579,open,0,,,0,2023-09-19T02:19:49Z,2023-09-19T02:23:26Z,,MEMBER,,1,pydata/xarray/pulls/8206," - [x] Closes #8090 - [x] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8206/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 923355397,MDExOlB1bGxSZXF1ZXN0NjcyMTI5NzY4,5480,Implement weighted groupby,2448579,open,0,,,1,2021-06-17T02:57:17Z,2023-07-27T18:09:55Z,,MEMBER,,1,pydata/xarray/pulls/5480," - xref #3937 - [ ] Tests added - [ ] Passes `pre-commit run --all-files` - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` Initial proof-of-concept. Suggestions to improve this are very welcome. Here's some convenient testing code ``` python import xarray as xr ds = xr.tutorial.open_dataset('rasm').load() month_length = ds.time.dt.days_in_month weights = month_length.groupby('time.season') / month_length.groupby('time.season').sum() actual = ds.weighted(month_length).groupby(""time.season"").mean() expected = (ds * weights).groupby('time.season').sum(skipna=False) xr.testing.assert_allclose(actual, expected) ``` I've added info to the repr ``` python ds.weighted(month_length).groupby(""time.season"") ``` ``` WeightedDatasetGroupBy, grouped over 'season' 4 groups with labels 'DJF', 'JJA', 'MAM', 'SON'. weighted along dimensions: time by 'days_in_month' ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/5480/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1700678362,PR_kwDOAMm_X85QBdXY,7828,GroupBy: Fix reducing by subset of grouper dims,2448579,open,0,,,0,2023-05-08T18:00:54Z,2023-05-10T02:41:39Z,,MEMBER,,1,pydata/xarray/pulls/7828," - [x] Tests added Fixes yet another bug with GroupBy reductions. We weren't assigning the group index when reducing by a subset of dimensions present on the grouper This will only pass when flox 0.7.1 reaches conda-forge. ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7828/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 802525282,MDExOlB1bGxSZXF1ZXN0NTY4NjUzOTg0,4868,facets and hue with hist,2448579,open,0,,,0,2021-02-05T22:49:36Z,2022-10-19T07:27:32Z,,MEMBER,,0,pydata/xarray/pulls/4868," - [x] Closes #4288 - [ ] Tests added - [x] Passes `pre-commit run --all-files` - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4868/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 802431534,MDExOlB1bGxSZXF1ZXN0NTY4NTc1NzIw,4866,Refactor line plotting,2448579,open,0,,,0,2021-02-05T19:51:24Z,2022-10-18T20:13:14Z,,MEMBER,,0,pydata/xarray/pulls/4866," Refactors line plotting to use a `_plot1d` decorator. Next i'll use this decorator on `hist` so we can ""facet"" and ""hue"" histograms. see #4288 ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/4866/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 540451721,MDExOlB1bGxSZXF1ZXN0MzU1MjU4NjMy,3646,[WIP] GroupBy plotting,2448579,open,0,,,7,2019-12-19T17:26:39Z,2022-06-09T14:50:17Z,,MEMBER,,1,pydata/xarray/pulls/3646," - [x] Tests added - [x] Passes `black . && mypy . && flake8` - [ ] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API This adds plotting methods to GroupBy objects so that it's easy to plot each group as a facet. I'm finding this super helpful in my current research project. It's pretty self-contained, mostly just adding `map_groupby*` methods to `FacetGrid`. But that's because I make `GroupBy` mimic the underlying `DataArray` by adding `coords`, `attrs` and `__getitem__`. This still needs more tests but I would like feedback on the feature and the implementation. ## Example ``` python import numpy as np import xarray as xr time = np.arange(80) da = xr.DataArray(5 * np.sin(2*np.pi*time/10), coords={""time"": time}, dims=""time"") da[""period""] = da.time.where((time % 10) == 0).ffill(""time"")/10 da.plot() ``` ![image](https://user-images.githubusercontent.com/2448579/71194665-49f45c00-2284-11ea-96e5-9a5daec1b3a9.png) ``` python da.groupby(""period"").plot(col=""period"", col_wrap=4) ``` ![image](https://user-images.githubusercontent.com/2448579/107123905-a1290780-685d-11eb-9bae-831a7513aaed.png) ``` python da = da.expand_dims(y=10) da.groupby(""period"").plot(col=""period"", col_wrap=4, sharex=False, sharey=True, robust=True) ``` ![image](https://user-images.githubusercontent.com/2448579/71194716-5c6e9580-2284-11ea-832a-c4e7d9296390.png) ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/3646/reactions"", ""total_count"": 3, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull