home / github

Menu
  • GraphQL API
  • Search all tables

issues

Table actions
  • GraphQL API for issues

2 rows where state = "open" and user = 4666753 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 2

state 1

  • open · 2 ✖

repo 1

  • xarray 2
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
668256331 MDU6SXNzdWU2NjgyNTYzMzE= 4288 hue argument for xarray.plot.step() for plotting multiple histograms over shared bins jaicher 4666753 open 0     2 2020-07-30T00:30:37Z 2022-04-17T19:27:28Z   CONTRIBUTOR      

Is your feature request related to a problem? Please describe.

I love how efficiently we can plot line data for different observations using xr.DataArray.plot(hue={hue coordinate name}) over a 2D array, and I have appreciated xr.DataArray.plot.step() for plotting histogram data using interval coordinates. Today, I wanted to plot/compare several histograms over the same set of bins. I figured I could write xr.DataArray.plot.step(hue={...}), but I found out that this functionality is not implemented.

Describe the solution you'd like

I think we should have a hue kwarg for xr.DataArray.plot.step(). When specified, we would be able to plot 2D data in the same way as xr.DataArray.plot(), except that we get a set of step plots instead of a set of line plots.

Describe alternatives you've considered

  • Use xr.DataArray.plot() instead. This is effective for histograms with many bins, but inaccurately represents histograms with coarse bins
  • Manually call xr.DataArray.plot.hist() on each 1D subarray for each label on the hue coordinate, adding appropriate labels and legend. This is fine and my current solution, but I think it would be excellent to use the same shorthand that was developed for line plots.

Additional context

I didn't evaluate the other plotting functions implemented, but I suspect that others could appropriately consider a hue argument but do not yet support doing so.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4288/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 issue
552987067 MDU6SXNzdWU1NTI5ODcwNjc= 3712 [Documentation/API?] {DataArray,Dataset}.sortby is stable sort? jaicher 4666753 open 0     0 2020-01-21T16:27:37Z 2022-04-09T02:26:34Z   CONTRIBUTOR      

I noticed that {DataArray,Dataset}.sortby() are implemented using np.lexsort(), which is a stable sort. Can we expect this function to remain a stable sort in the future even if the implementation is changed for some reason?

It is not explicitly stated in the docs that the sorting will be stable. If this function is meant to always be stable, I think the documentation should explicitly state this. If not, I think it would be helpful to have an optional argument to ensure that the sort is kept stable in case the implementation changes in the future.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3712/reactions",
    "total_count": 3,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 1
}
    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 21.585ms · About: xarray-datasette