home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

1 row where type = "issue" and user = 59711987 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

type 1

  • issue · 1 ✖

state 1

  • open 1

repo 1

  • xarray 1
id node_id number title user state locked assignee milestone comments created_at updated_at ▲ closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
607229563 MDU6SXNzdWU2MDcyMjk1NjM= 4008 Can Resample dim be spatial and not just datetime? chfite 59711987 open 0     4 2020-04-27T04:47:12Z 2022-04-16T15:00:50Z   NONE      

Hi, I'll go ahead and preface that I know very little about xarray source code, but I do use xarray often in my work. I hope someone can provide insight into an answer for my question.

Essentially, I have a 2D DataArray with dimensions lat and lon that I want to spatially coarsen to a lower resolution. I have the coarsened 1D coordinates that I would want my grid to be coarsened to, and I was wanting to use the DataArray.resample function and then use .mean() to get my coarsened array. The documentation notes that the resampled dim can only be of type datetime. Is there a particular reason that this the case? Why is there not a capability to resample spatially with lat and lon coordinates? Maybe there is a good reason that is beyond my little knowledge of xarray source code, but I'm curious to know why that is the case or if there is work ongoing to get a capability of resampling how I mentioned?

If there is a specific reason why one can't resample along a dim like lat and lon, is there another type of xarray function that would work well for my needs? Would groupby_bins be something that would work better for what I'm wanting? And can anyone post or guide me to a good example of spatially coarsening an array using groupby_bins?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4008/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 issue

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 20.895ms · About: xarray-datasette