home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

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

  • pascalgross 2
  • jthielen 1
  • max-sixty 1

author_association 3

  • NONE 2
  • CONTRIBUTOR 1
  • MEMBER 1

issue 1

  • swap dimensions with multi-dimensional coordinates · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
530242012 https://github.com/pydata/xarray/issues/3299#issuecomment-530242012 https://api.github.com/repos/pydata/xarray/issues/3299 MDEyOklzc3VlQ29tbWVudDUzMDI0MjAxMg== jthielen 3460034 2019-09-11T06:32:44Z 2019-09-11T20:47:29Z CONTRIBUTOR

Based on your input and expected result, I would guess that you are looking to regrid your data from the x/y curvilinear grid of your GRIB weather data to a new rectilinear (lon/lat) grid?

If so, I would suggest using xESMF (example here), since xarray itself does not appear to support this type of interpolation yet. As an example, given the dimension names you currently have and expect in the output, your code could look something like the following:

```python import xesmf as xe

...load data...

ds_xy_grid = ds_xy_grid.rename(latitude='lat', longitude='lon') ds_out = xr.Dataset({'lat': (['lat'], np.linspace(44.77, 56.14, 421)), 'lon': (['lon'], np.linspace(2.976, 19.84, 461)}) regridder = xe.Regridder(ds_xy_grid, ds_out, 'bilinear') ds_lonlat_grid = regridder(ds_xy_grid) ds_lonlat_grid = ds_lonlat_grid.rename(lat='latitude', lon='longitude') ```

(updated as per comment below)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  swap dimensions with multi-dimensional coordinates 491719758
530288406 https://github.com/pydata/xarray/issues/3299#issuecomment-530288406 https://api.github.com/repos/pydata/xarray/issues/3299 MDEyOklzc3VlQ29tbWVudDUzMDI4ODQwNg== pascalgross 3106851 2019-09-11T08:56:24Z 2019-09-11T08:56:24Z NONE

@jthielen Thank you! This is pretty much what I was looking for.

If someone else sees this: your line regridder = xe.Regridder(ds_xy_grid, ds_out) is missing the method e.g. regridder = xe.Regridder(ds_xy_grid, ds_out, 'bilinear')

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  swap dimensions with multi-dimensional coordinates 491719758
530231603 https://github.com/pydata/xarray/issues/3299#issuecomment-530231603 https://api.github.com/repos/pydata/xarray/issues/3299 MDEyOklzc3VlQ29tbWVudDUzMDIzMTYwMw== pascalgross 3106851 2019-09-11T05:54:59Z 2019-09-11T05:54:59Z NONE

I don't see how .rename would work for me - could you give me an example?

Expected result is something like: <xarray.Dataset> Dimensions: (latitude: 421, longitude: 461) Coordinates: time datetime64[ns] 2015-05-10T12:00:00 step timedelta64[ns] 00:00:00 heightAboveGround int64 10 latitude float64 44.77 44.77 44.77 ... 56.14 56.14 56.14 longitude float64 2.976 3.011 3.046 ... 19.75 19.8 19.84

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  swap dimensions with multi-dimensional coordinates 491719758
530112996 https://github.com/pydata/xarray/issues/3299#issuecomment-530112996 https://api.github.com/repos/pydata/xarray/issues/3299 MDEyOklzc3VlQ29tbWVudDUzMDExMjk5Ng== max-sixty 5635139 2019-09-10T20:48:40Z 2019-09-10T20:48:40Z MEMBER

I think you're looking for .rename. If not, could you post a MCVE as per the issue template please?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  swap dimensions with multi-dimensional coordinates 491719758

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