home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 260912521 and user = 5700886 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

  • willirath · 3 ✖

issue 1

  • Equivalent of numpy.insert for DataSet / DataArray? · 3 ✖

author_association 1

  • CONTRIBUTOR 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
332624901 https://github.com/pydata/xarray/issues/1596#issuecomment-332624901 https://api.github.com/repos/pydata/xarray/issues/1596 MDEyOklzc3VlQ29tbWVudDMzMjYyNDkwMQ== willirath 5700886 2017-09-27T19:08:59Z 2017-09-27T19:08:59Z CONTRIBUTOR

Not really minimal but shows a real use:

```python from pathlib import Path import matplotlib.pyplot as plt import xarray as xr

create data path

daily_data_path = Path("/obs_data/") / "ASCAT" / "v1.x.x" / "data/Daily/Netcdf"

get data files and open mf dataset

data_files_2016 = daily_data_path.glob("2016/??/??/*.nc") raw_data_set = xr.open_mfdataset(data_files_2016).isel(latitude=300, longitude=0)

Resample with filling gaps by NaN's and shift to match original time axis

infilled_data_set = raw_data_set.resample(time="1D").asfreq() infilled_data_set.time.data += (raw_data_set.time.data[0] - infilled_data_set.time.data[0])

extract wind speeds

rws = raw_data_set.wind_speed iws = infilled_data_set.wind_speed.rename("resampled_wind_speed")

and plot (with a slight offset to be able to distinguish the lines)

fig, ax = plt.subplots(2, 1)

(iws+1).plot(ax=ax[0]); rws.plot(ax=ax[0]); ax[0].legend(["resampled", "original"], loc=0, ncol=2);

(iws+1).sel(time=slice("2016-08-01", "2016-10-01")).plot(ax=ax[1]); rws.sel(time=slice("2016-08-01", "2016-10-01")).plot(ax=ax[1]); ```

Note the gaps that are more clearly visible in the lower panel.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Equivalent of numpy.insert for DataSet / DataArray? 260912521
332617308 https://github.com/pydata/xarray/issues/1596#issuecomment-332617308 https://api.github.com/repos/pydata/xarray/issues/1596 MDEyOklzc3VlQ29tbWVudDMzMjYxNzMwOA== willirath 5700886 2017-09-27T18:41:10Z 2017-09-27T18:41:10Z CONTRIBUTOR

Shoud I provide a minimal real-world-example?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Equivalent of numpy.insert for DataSet / DataArray? 260912521
332614980 https://github.com/pydata/xarray/issues/1596#issuecomment-332614980 https://api.github.com/repos/pydata/xarray/issues/1596 MDEyOklzc3VlQ29tbWVudDMzMjYxNDk4MA== willirath 5700886 2017-09-27T18:32:54Z 2017-09-27T18:32:54Z CONTRIBUTOR

Does exactly what I need. Thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Equivalent of numpy.insert for DataSet / DataArray? 260912521

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