home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "MEMBER" and issue = 181534708 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 2

  • shoyer 4
  • fmaussion 2

issue 1

  • DataArray resample does not work if the time coordinate name is different from the corresponding dimension name. · 6 ✖

author_association 1

  • MEMBER · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
343530337 https://github.com/pydata/xarray/issues/1041#issuecomment-343530337 https://api.github.com/repos/pydata/xarray/issues/1041 MDEyOklzc3VlQ29tbWVudDM0MzUzMDMzNw== shoyer 1217238 2017-11-10T17:07:17Z 2017-11-10T17:07:17Z MEMBER

@chrwerner Yes, exactly.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray resample does not work if the time coordinate name is different from the corresponding dimension name. 181534708
343525358 https://github.com/pydata/xarray/issues/1041#issuecomment-343525358 https://api.github.com/repos/pydata/xarray/issues/1041 MDEyOklzc3VlQ29tbWVudDM0MzUyNTM1OA== shoyer 1217238 2017-11-10T16:48:10Z 2017-11-10T16:48:10Z MEMBER

@chrwerner From an implementation perspective, resample works virtually identically to passing in an explicit array of values to groupby(). If you can make your arrays of "10 year interval" labels, you should be able to make this work.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray resample does not work if the time coordinate name is different from the corresponding dimension name. 181534708
252307570 https://github.com/pydata/xarray/issues/1041#issuecomment-252307570 https://api.github.com/repos/pydata/xarray/issues/1041 MDEyOklzc3VlQ29tbWVudDI1MjMwNzU3MA== shoyer 1217238 2016-10-07T17:07:40Z 2016-10-07T17:07:40Z MEMBER

It seems like we should just make resample() work for non-dimension coordinates. I don't think there's any reason in principle why that shouldn't work.

To make sel() efficient, we need to compute a hash table. So I think it's somewhat reasonable to require setting levels you want to select on to be part of a (multi)index.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray resample does not work if the time coordinate name is different from the corresponding dimension name. 181534708
252294581 https://github.com/pydata/xarray/issues/1041#issuecomment-252294581 https://api.github.com/repos/pydata/xarray/issues/1041 MDEyOklzc3VlQ29tbWVudDI1MjI5NDU4MQ== fmaussion 10050469 2016-10-07T16:13:00Z 2016-10-07T16:13:00Z MEMBER

Just an idea: what about adding a keyword to resample() (and maybe also to sel())? Something like:

python ds.resample('D', by_coord='time')

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray resample does not work if the time coordinate name is different from the corresponding dimension name. 181534708
252293208 https://github.com/pydata/xarray/issues/1041#issuecomment-252293208 https://api.github.com/repos/pydata/xarray/issues/1041 MDEyOklzc3VlQ29tbWVudDI1MjI5MzIwOA== fmaussion 10050469 2016-10-07T16:07:00Z 2016-10-07T16:07:41Z MEMBER

but I feel like it searches for the coordinate with the same name as the supplied dimension. Probably searching for a coordinate containing only the dimension specified in resample could do the trick.

Note that this is not limited to .resample() but also to .sel(). Indexing over a non-dimension coordinate is something I also needed to do (https://groups.google.com/forum/#!searchin/xarray/fabien%7Csort:relevance/xarray/KTlG2snZabg/5V1vs3ODBAAJ). But after looking into the implementation, I understand that it's quite complicated for xarray to keep track of all possible coordinates linked to one specific dimension. And what if there are more than one coordinate?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray resample does not work if the time coordinate name is different from the corresponding dimension name. 181534708
252150731 https://github.com/pydata/xarray/issues/1041#issuecomment-252150731 https://api.github.com/repos/pydata/xarray/issues/1041 MDEyOklzc3VlQ29tbWVudDI1MjE1MDczMQ== shoyer 1217238 2016-10-07T04:32:25Z 2016-10-07T04:32:25Z MEMBER

Does a2.resample("D", "time") work in your second example? I agree that the error message could be more helpful here, but I think this is working as intended -- if you only supply the name of a dimension with integer labels, xarray has no way to know how what times to use for resampling.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray resample does not work if the time coordinate name is different from the corresponding dimension name. 181534708

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