home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where issue = 787732195 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 6

  • Illviljan 4
  • mathause 2
  • dcherian 1
  • keewis 1
  • pep8speaks 1
  • github-actions[bot] 1

author_association 3

  • MEMBER 8
  • CONTRIBUTOR 1
  • NONE 1

issue 1

  • Add dataset line plot · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
882121363 https://github.com/pydata/xarray/pull/4820#issuecomment-882121363 https://api.github.com/repos/pydata/xarray/issues/4820 IC_kwDOAMm_X840lBqT github-actions[bot] 41898282 2021-07-18T21:53:42Z 2021-07-24T22:58:15Z CONTRIBUTOR

Unit Test Results

6 files           6 suites   50m 26s :stopwatch: 16 200 tests 14 465 :heavy_check_mark: 1 735 :zzz: 0 :x: 90 396 runs  82 221 :heavy_check_mark: 8 175 :zzz: 0 :x:

Results for commit 1dfad9fa.

:recycle: This comment has been updated with latest results.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195
778592089 https://github.com/pydata/xarray/pull/4820#issuecomment-778592089 https://api.github.com/repos/pydata/xarray/issues/4820 MDEyOklzc3VlQ29tbWVudDc3ODU5MjA4OQ== pep8speaks 24736507 2021-02-13T09:49:51Z 2021-07-24T22:33:10Z NONE

Hello @Illviljan! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2021-07-24 22:33:10 UTC
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195
778596102 https://github.com/pydata/xarray/pull/4820#issuecomment-778596102 https://api.github.com/repos/pydata/xarray/issues/4820 MDEyOklzc3VlQ29tbWVudDc3ODU5NjEwMg== Illviljan 14371165 2021-02-13T10:25:13Z 2021-02-13T10:25:13Z MEMBER

I think this is ready now.

I'm not super happy with the docs, I think copying makes sense but it doesn't match completely at the moment. I was thinking that can be solved by rewriting the dataarray version in a smarter way.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195
778310773 https://github.com/pydata/xarray/pull/4820#issuecomment-778310773 https://api.github.com/repos/pydata/xarray/issues/4820 MDEyOklzc3VlQ29tbWVudDc3ODMxMDc3Mw== keewis 14808389 2021-02-12T16:52:01Z 2021-02-12T16:52:01Z MEMBER

the reason for the docs failure is a intersphinx issue. We fixed that some time ago so you should be able to merge in master to get the build to pass.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195
775390720 https://github.com/pydata/xarray/pull/4820#issuecomment-775390720 https://api.github.com/repos/pydata/xarray/issues/4820 MDEyOklzc3VlQ29tbWVudDc3NTM5MDcyMA== Illviljan 14371165 2021-02-08T19:34:46Z 2021-02-08T19:35:57Z MEMBER

I think making the dataset plots a thin wrapper for the dataarray plot functions is the way to go. I think most things for the lineplot works as intended now. I'm not sure about the decorator though. It's a bit too simple compared to _dsplot at the moment.

Supporting linewidth in plots should be possible but this is for a future pr I think. I did a small proof of concept here: ```python def _lineplot(ds, x, y, hue, linewidth): if len(ds[y].dims) > 3: raise NotImplementedError("too many dims.")

fig, ax = plt.subplots(1, 1)
for i, width in enumerate(ds[linewidth]):
    # Filter along linewidth:
    dsi = ds.isel(**{linewidth: i})

    # Values to plot:
    xplt = dsi[x]

    # if xplt has no dims:
    (xdim,) = xplt.dims
    (huedim,) = dsi[hue].dims
    yplt = dsi[y].transpose(..., xdim, huedim)

    # Set plot properties:
    len_lines = len(ds[hue])
    cmap = plt.get_cmap("viridis", len_lines)
    colors = plt.cycler(color=cmap(np.arange(len_lines)))
    lw = plt.cycler(lw=[1 + i * 3])
    ax.set_prop_cycle(colors * lw)

    # p = xr.broadcast(xplt, yplt)
    plt.plot(xplt, yplt, label=width.values)
    plt.legend()

# ax.plot doesn't return a mappable that fig.colorbar can parse. Create
# one and return that one instead:
norm = plt.Normalize(vmin=ds[hue].min(), vmax=ds[hue].max())
primitive = plt.cm.ScalarMappable(cmap=plt.get_cmap("viridis"), norm=norm)
fig.colorbar(mappable=primitive)

return fig, ax

ds = xr.tutorial.scatter_example_dataset() ds1 = ds.sel(z=0) _lineplot(ds=ds1, x="y", y="A", hue="w", linewidth="x") ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195
767765210 https://github.com/pydata/xarray/pull/4820#issuecomment-767765210 https://api.github.com/repos/pydata/xarray/issues/4820 MDEyOklzc3VlQ29tbWVudDc2Nzc2NTIxMA== Illviljan 14371165 2021-01-26T19:12:16Z 2021-01-26T19:12:16Z MEMBER

Added a variant using dataarray, it's much cleaner although the wrappers had to be redone. I think we can move ds.plot.scatter to the dataarray side as well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195
766909309 https://github.com/pydata/xarray/pull/4820#issuecomment-766909309 https://api.github.com/repos/pydata/xarray/issues/4820 MDEyOklzc3VlQ29tbWVudDc2NjkwOTMwOQ== dcherian 2448579 2021-01-25T15:47:19Z 2021-01-25T15:47:19Z MEMBER

I wonder if it would be easier to construct a DataArray and then use DataArray.plot.line so everything is going through the same code path

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195
766687715 https://github.com/pydata/xarray/pull/4820#issuecomment-766687715 https://api.github.com/repos/pydata/xarray/issues/4820 MDEyOklzc3VlQ29tbWVudDc2NjY4NzcxNQ== mathause 10194086 2021-01-25T09:41:36Z 2021-01-25T09:41:36Z MEMBER

Not really. It just looked very drafty ;-)

My inclination would be to not allow setting lw and ms via a variable or coordinates - you should then probably use a scatterplot. That would also take care of your 4th point.

hue only works with coordinates.

I think that's fine. It's always possible to extend later.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195
766095911 https://github.com/pydata/xarray/pull/4820#issuecomment-766095911 https://api.github.com/repos/pydata/xarray/issues/4820 MDEyOklzc3VlQ29tbWVudDc2NjA5NTkxMQ== Illviljan 14371165 2021-01-23T15:26:42Z 2021-01-23T15:26:42Z MEMBER

I've added a little todo list of things I've noticed, @mathause. Did you have something else in mind?

I wouldn't mind some more examples and matplotlib solutions if anyone has done any nice looking line plots with xarray before.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195
765023068 https://github.com/pydata/xarray/pull/4820#issuecomment-765023068 https://api.github.com/repos/pydata/xarray/issues/4820 MDEyOklzc3VlQ29tbWVudDc2NTAyMzA2OA== mathause 10194086 2021-01-22T00:12:08Z 2021-01-22T00:12:08Z MEMBER

This looks like a good start but is also still very preliminary so I converted to a "work in progress".

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add dataset line plot 787732195

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