home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 138443211 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 5

  • darothen 2
  • ocefpaf 1
  • shoyer 1
  • jhamman 1
  • mathause 1

author_association 3

  • MEMBER 3
  • NONE 2
  • CONTRIBUTOR 1

issue 1

  • almost-equal grids · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
201702889 https://github.com/pydata/xarray/issues/784#issuecomment-201702889 https://api.github.com/repos/pydata/xarray/issues/784 MDEyOklzc3VlQ29tbWVudDIwMTcwMjg4OQ== jhamman 2443309 2016-03-26T04:20:10Z 2016-03-26T04:20:10Z MEMBER

@mathause - any reason to keep this open or did we sort this out?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  almost-equal grids 138443211
192357422 https://github.com/pydata/xarray/issues/784#issuecomment-192357422 https://api.github.com/repos/pydata/xarray/issues/784 MDEyOklzc3VlQ29tbWVudDE5MjM1NzQyMg== darothen 4992424 2016-03-04T16:58:59Z 2016-03-04T16:58:59Z NONE

The reindex_like() approach works super well in my case. Since only my latitudes are screwed up (and they're spaced by a tad more than a degree), a low tolerance 1e-2-1e-3 worked perfectly.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  almost-equal grids 138443211
192351311 https://github.com/pydata/xarray/issues/784#issuecomment-192351311 https://api.github.com/repos/pydata/xarray/issues/784 MDEyOklzc3VlQ29tbWVudDE5MjM1MTMxMQ== mathause 10194086 2016-03-04T16:45:02Z 2016-03-04T16:45:02Z MEMBER

That sounds good. Do you need both, methodand tolerance?

What I do at the moment is probably not as elegant:

ds.coords['lat'] = np.round(ds['lat'], 4) ds.coords['lon'] = np.round(ds['lon'], 4)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  almost-equal grids 138443211
192342165 https://github.com/pydata/xarray/issues/784#issuecomment-192342165 https://api.github.com/repos/pydata/xarray/issues/784 MDEyOklzc3VlQ29tbWVudDE5MjM0MjE2NQ== ocefpaf 950575 2016-03-04T16:23:39Z 2016-03-04T16:23:39Z CONTRIBUTOR

second = first.reindex_like(second, method='nearest', tolerance=0.001)

I really like this. Explicit and self-documenting code. I would avoid making this automatic.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  almost-equal grids 138443211
192340787 https://github.com/pydata/xarray/issues/784#issuecomment-192340787 https://api.github.com/repos/pydata/xarray/issues/784 MDEyOklzc3VlQ29tbWVudDE5MjM0MDc4Nw== shoyer 1217238 2016-03-04T16:18:17Z 2016-03-04T16:18:17Z MEMBER

This doesn't work automatically, but you can use the method='nearest' and the tolerance argument with .reindex or .reindex_like to align two datasets with different grids, i.e.,

second = first.reindex_like(second, method='nearest', tolerance=0.001)

It would be nice for this to be able to work automatically, but the challenge is picking a heuristic that does not violate the principle of least surprise. A proposed a few ideas in a related issue in pandas (https://github.com/pydata/pandas/issues/9817#issuecomment-115465360).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  almost-equal grids 138443211
192332830 https://github.com/pydata/xarray/issues/784#issuecomment-192332830 https://api.github.com/repos/pydata/xarray/issues/784 MDEyOklzc3VlQ29tbWVudDE5MjMzMjgzMA== darothen 4992424 2016-03-04T15:56:58Z 2016-03-04T15:56:58Z NONE

Hi @mathause, I actually just ran into a very similar problem to your second bullet point. I had some limited success by manually re-building the re-gridded dataset onto the CESM coordinate system, swapping out the not-exactly-but-actually-close-enough coordinates for the CESM reference data's coordinates. In my case, I was re-gridding with CDO, but even when I explicitly pull out the CESM grid definition it wouldn't match precisely.

Since there was a lot of boilerplate code to do this in xarray (although I had a lot of success defining a callback to pass in with open_dataset), it was far easier just to use NCO to copy the correct coordinate variables into the re-gridded data.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  almost-equal grids 138443211

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