home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 750985364 and user = 14371165 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 1

  • Illviljan · 3 ✖

issue 1

  • Add histogram method · 3 ✖

author_association 1

  • MEMBER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1433686861 https://github.com/pydata/xarray/issues/4610#issuecomment-1433686861 https://api.github.com/repos/pydata/xarray/issues/4610 IC_kwDOAMm_X85VdFNN Illviljan 14371165 2023-02-16T20:39:54Z 2023-02-16T20:39:54Z MEMBER

Nice, I was looking at the real example too, Temp_url = 'http://apdrc.soest.hawaii.edu:80/dods/public_data/WOA/WOA13/5_deg/annual/temp' etc.., and it was triggering a load in set_dims:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add histogram method 750985364
1433670641 https://github.com/pydata/xarray/issues/4610#issuecomment-1433670641 https://api.github.com/repos/pydata/xarray/issues/4610 IC_kwDOAMm_X85VdBPx Illviljan 14371165 2023-02-16T20:24:51Z 2023-02-16T20:25:36Z MEMBER
  • Absolute speed of xhistogram appears to be 3-4x higher, and that's using numpy_groupies in flox. Possibly flox could be faster if using numba but not sure yet.

Could you show the example that's this slow, @TomNicholas ? So I can play around with it too.

One thing I noticed in your notebook is that you haven't used chunks={} on the open_dataset. Which seems to trigger data loading on strange places in xarray (places that calls self.data), but I'm not sure this is your actual problem.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
  Add histogram method 750985364
846418243 https://github.com/pydata/xarray/issues/4610#issuecomment-846418243 https://api.github.com/repos/pydata/xarray/issues/4610 MDEyOklzc3VlQ29tbWVudDg0NjQxODI0Mw== Illviljan 14371165 2021-05-22T14:46:13Z 2021-05-22T14:46:13Z MEMBER

but pyplot.hist does both the bincounting and the plotting, so it might not be simple to do that.

Should be fine I think. Matplolib explains how to use np.histogram-like results in the weights-parameter: https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.hist.html python counts, bins = np.histogram(data) plt.hist(bins[:-1], bins, weights=counts)

Some reading if wanting to do the plot by hand: https://stackoverflow.com/questions/5328556/histogram-matplotlib https://stackoverflow.com/questions/33203645/how-to-plot-a-histogram-using-matplotlib-in-python-with-a-list-of-data

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
  Add histogram method 750985364

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