home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

1 row where author_association = "CONTRIBUTOR", issue = 287223508 and user = 1941408 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • stefraynaud · 1 ✖

issue 1

  • apply_ufunc(dask='parallelized') with multiple outputs · 1 ✖

author_association 1

  • CONTRIBUTOR · 1 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
538993551 https://github.com/pydata/xarray/issues/1815#issuecomment-538993551 https://api.github.com/repos/pydata/xarray/issues/1815 MDEyOklzc3VlQ29tbWVudDUzODk5MzU1MQ== stefraynaud 1941408 2019-10-07T12:48:01Z 2019-10-07T12:48:01Z CONTRIBUTOR

@andersy005 here is a very little demo of linear regression using lstsq (not linregress) in which only slope and intercept are kept. It is here applied to an array of sea surface temperature. I hope it can help.

python ds = xr.open_dataset('sst_2D.nc', chunks={'X': 30, 'Y': 30}) def ulinregress(x, y): # the universal function ny, nx, nt = y.shape ; y = np.moveaxis(y, -1, 0).reshape((nt, -1)) # nt, ny*nx return np.linalg.lstsq(np.vstack([x, np.ones(nt)]).T, y)[0].T.reshape(ny, nx, 2) time = (ds['time'] - np.datetime64("1950-01-01")) / np.timedelta64(1, 'D') ab = xr.apply_ufunc(ulinregress, time, ds['sst'], dask='parallelized', input_core_dims=[['time'], ['time']], output_dtypes=['d'], output_sizes={'coef': 2, }, output_core_dims=[['coef']]) series = ds['sst'][:, 0, 0].load() line = series.copy() ; line[:] = ab[0, 0, 0] * time + ab[0, 0, 1] series.plot(label='Original') ; line.plot(label='Linear regression') ; plt.legend();

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
  apply_ufunc(dask='parallelized') with multiple outputs 287223508

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