home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 365961291 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • shoyer 3
  • huard 1
  • spencerkclark 1

author_association 2

  • MEMBER 4
  • CONTRIBUTOR 1

issue 1

  • WIP: sketch of resample support for CFTimeIndex · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
460019498 https://github.com/pydata/xarray/pull/2458#issuecomment-460019498 https://api.github.com/repos/pydata/xarray/issues/2458 MDEyOklzc3VlQ29tbWVudDQ2MDAxOTQ5OA== shoyer 1217238 2019-02-03T03:21:52Z 2019-02-03T03:21:52Z MEMBER

Implemented in https://github.com/pydata/xarray/pull/2593

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  WIP: sketch of resample support for CFTimeIndex 365961291
427056750 https://github.com/pydata/xarray/pull/2458#issuecomment-427056750 https://api.github.com/repos/pydata/xarray/issues/2458 MDEyOklzc3VlQ29tbWVudDQyNzA1Njc1MA== shoyer 1217238 2018-10-04T15:12:07Z 2018-10-04T15:12:07Z MEMBER

I never saw clear use-cases for TimeGrouper but I could be convinced. On Thu, Oct 4, 2018 at 2:51 PM David Huard notifications@github.com wrote:

Do you think there would be a benefit to implementing a TimeGrouper class based on panda's ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/pull/2458#issuecomment-427006309, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKS1rj2dc2Fk1el8e5kjU5VQGs5759jks5uhgRKgaJpZM4XEUir .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  WIP: sketch of resample support for CFTimeIndex 365961291
427054269 https://github.com/pydata/xarray/pull/2458#issuecomment-427054269 https://api.github.com/repos/pydata/xarray/issues/2458 MDEyOklzc3VlQ29tbWVudDQyNzA1NDI2OQ== spencerkclark 6628425 2018-10-04T15:05:20Z 2018-10-04T15:05:20Z MEMBER

Do you think there would be a benefit to implementing a TimeGrouper class based on panda's ?

My instinct would be to first pursue the simple approach that @shoyer has started here. If it turns out that passing a pandas.Series rather than a pandas.Grouper instance in line 236 of groupby.py prevents us from replicating some important behavior of resample, then it might be something to think about.

As of yet, while there are a few details that need to be added to Stephan's implementation (e.g., as he notes in the to-do comment, proper handling of the closed, label, and base arguments; there is some other complexity regarding how to handle gaps in the time series, etc.), I do not (yet) see any reason why these couldn't be handled with some modifications to the current approach. The logic in TimeGrouper is definitely a good reference for how to handle the different arguments to resample, but if we can, I think it would be nice to avoid the complexity of defining a new Grouper class.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  WIP: sketch of resample support for CFTimeIndex 365961291
427006309 https://github.com/pydata/xarray/pull/2458#issuecomment-427006309 https://api.github.com/repos/pydata/xarray/issues/2458 MDEyOklzc3VlQ29tbWVudDQyNzAwNjMwOQ== huard 81219 2018-10-04T12:51:21Z 2018-10-04T12:51:21Z CONTRIBUTOR

Do you think there would be a benefit to implementing a TimeGrouper class based on panda's ?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  WIP: sketch of resample support for CFTimeIndex 365961291
426681357 https://github.com/pydata/xarray/pull/2458#issuecomment-426681357 https://api.github.com/repos/pydata/xarray/issues/2458 MDEyOklzc3VlQ29tbWVudDQyNjY4MTM1Nw== shoyer 1217238 2018-10-03T15:30:45Z 2018-10-03T15:30:45Z MEMBER

Inspired by @spencerkclark's suggestion, I tried another version based on cftime_range and reindex with method='pad'. This one seems to be working in more cases: ```python In [7]: times = xarray.cftime_range('2000', periods=30, freq='MS')

In [8]: da = xarray.DataArray(range(30), [('time', times)])

In [9]: times Out[9]: CFTimeIndex([2000-01-01 00:00:00, 2000-02-01 00:00:00, 2000-03-01 00:00:00, 2000-04-01 00:00:00, 2000-05-01 00:00:00, 2000-06-01 00:00:00, 2000-07-01 00:00:00, 2000-08-01 00:00:00, 2000-09-01 00:00:00, 2000-10-01 00:00:00, 2000-11-01 00:00:00, 2000-12-01 00:00:00, 2001-01-01 00:00:00, 2001-02-01 00:00:00, 2001-03-01 00:00:00, 2001-04-01 00:00:00, 2001-05-01 00:00:00, 2001-06-01 00:00:00, 2001-07-01 00:00:00, 2001-08-01 00:00:00, 2001-09-01 00:00:00, 2001-10-01 00:00:00, 2001-11-01 00:00:00, 2001-12-01 00:00:00, 2002-01-01 00:00:00, 2002-02-01 00:00:00, 2002-03-01 00:00:00, 2002-04-01 00:00:00, 2002-05-01 00:00:00, 2002-06-01 00:00:00], dtype='object')

In [10]: da.resample(time='12MS').mean() Out[10]: <xarray.DataArray (time: 3)> array([ 5.5, 17.5, 26.5]) Coordinates: * time (time) object 2000-01-01 00:00:00 ... 2002-01-01 00:00:00

In [11]: da.resample(time='6MS').mean() Out[11]: <xarray.DataArray (time: 5)> array([ 2.5, 8.5, 14.5, 20.5, 26.5]) Coordinates: * time (time) object 2000-01-01 00:00:00 ... 2002-01-01 00:00:00

In [12]: da.resample(time='3MS').mean() Out[12]: <xarray.DataArray (time: 10)> array([ 1., 4., 7., 10., 13., 16., 19., 22., 25., 28.]) Coordinates: * time (time) object 2000-01-01 00:00:00 ... 2002-04-01 00:00:00 ```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  WIP: sketch of resample support for CFTimeIndex 365961291

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 81.969ms · About: xarray-datasette