home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 106595746 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

  • mathause 2
  • shoyer 1
  • max-sixty 1

issue 1

  • wrap lon coordinates to 360 · 4 ✖

author_association 1

  • MEMBER 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
455104534 https://github.com/pydata/xarray/issues/577#issuecomment-455104534 https://api.github.com/repos/pydata/xarray/issues/577 MDEyOklzc3VlQ29tbWVudDQ1NTEwNDUzNA== mathause 10194086 2019-01-17T09:34:37Z 2019-01-17T09:34:56Z MEMBER

I don't think .roll actually handles this, as wrapping changes the coordinate values. But as xarray does not support domain-specific functions it's good to close this.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  wrap lon coordinates to 360 106595746
454535041 https://github.com/pydata/xarray/issues/577#issuecomment-454535041 https://api.github.com/repos/pydata/xarray/issues/577 MDEyOklzc3VlQ29tbWVudDQ1NDUzNTA0MQ== max-sixty 5635139 2019-01-15T20:15:01Z 2019-01-15T20:15:01Z MEMBER

Closing as stale, please reopen if still relevant

(Does .roll do this now?)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  wrap lon coordinates to 360 106595746
140465411 https://github.com/pydata/xarray/issues/577#issuecomment-140465411 https://api.github.com/repos/pydata/xarray/issues/577 MDEyOklzc3VlQ29tbWVudDE0MDQ2NTQxMQ== shoyer 1217238 2015-09-15T17:07:56Z 2015-09-15T17:07:56Z MEMBER

Yes, this is similar to how I've done this in the past. Your function works fine, but I would probably use ds = ds.assign(**{lon: mod(ds[lon], 360}) to avoid modifying the existing coordinates in-place.

Also, it would be nice if we supported ds.sort_index(lon) instead of requiring an explicit reindex.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  wrap lon coordinates to 360 106595746
140457546 https://github.com/pydata/xarray/issues/577#issuecomment-140457546 https://api.github.com/repos/pydata/xarray/issues/577 MDEyOklzc3VlQ29tbWVudDE0MDQ1NzU0Ng== mathause 10194086 2015-09-15T16:40:53Z 2015-09-15T16:40:53Z MEMBER

I found a way, leaving this here for reference. Or is there something better?

``` def wrap360(ds, lon='lon'): """ wrap longitude coordinates to 0..360

Parameters
----------
ds : Dataset
    object with longitude coordinates
lon : string
    name of the longitude ('lon', 'longitude', ...)

Returns
-------
wrapped : Dataset
    Another dataset array wrapped around.
"""

# wrap -180..179 to 0..359    
ds.coords[lon] = np.mod(ds[lon], 360)

# sort the data
return ds.reindex({ lon : np.sort(ds[lon])})

```

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  wrap lon coordinates to 360 106595746

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 36.055ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows