home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 94787306 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 5

  • barronh 1
  • pwolfram 1
  • darothen 1
  • aidanheerdegen 1
  • zxdawn 1

author_association 2

  • CONTRIBUTOR 3
  • NONE 2

issue 1

  • add scatter plot method to dataset · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1030874975 https://github.com/pydata/xarray/issues/470#issuecomment-1030874975 https://api.github.com/repos/pydata/xarray/issues/470 IC_kwDOAMm_X849cedf zxdawn 30388627 2022-02-06T17:15:46Z 2022-02-06T17:15:46Z NONE

@aidanheerdegen Thanks for the code. I suppose it's better to mention this method for DataArray in User Guide. @dcherian Should I create a PR for example like this?

``` air = xr.tutorial.open_dataset("air_temperature")['air']

air.isel(lon=10, lat=[19, 21, 22]).plot.line(x="time", marker='o',linewidth=0.,markersize=1) ```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add scatter plot method to dataset 94787306
441486969 https://github.com/pydata/xarray/issues/470#issuecomment-441486969 https://api.github.com/repos/pydata/xarray/issues/470 MDEyOklzc3VlQ29tbWVudDQ0MTQ4Njk2OQ== aidanheerdegen 6063709 2018-11-26T00:14:46Z 2018-11-26T00:14:46Z CONTRIBUTOR

In the absence of a dedicated method, it is possible to obtain a scatterplot with the keyword options to plot.line(): rho_so_remap.plot.line(marker='o',linewidth=0.)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add scatter plot method to dataset 94787306
401405688 https://github.com/pydata/xarray/issues/470#issuecomment-401405688 https://api.github.com/repos/pydata/xarray/issues/470 MDEyOklzc3VlQ29tbWVudDQwMTQwNTY4OA== pwolfram 4295853 2018-06-29T16:27:02Z 2018-06-29T16:27:02Z CONTRIBUTOR

I agree this could be helpful... is there any interest in reviving this stale issue?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add scatter plot method to dataset 94787306
304107683 https://github.com/pydata/xarray/issues/470#issuecomment-304107683 https://api.github.com/repos/pydata/xarray/issues/470 MDEyOklzc3VlQ29tbWVudDMwNDEwNzY4Mw== darothen 4992424 2017-05-25T19:57:22Z 2017-05-25T19:57:22Z NONE

This certainly could be useful, but since this is essentially plotting a vector of data, why not just drop into pandas?

``` df = da.to_dataframe()

Could reset coordinates if you really wanted

df = df.reset_index()

df.plot.scatter('longitude', 'latitude', c=da.name) ```

Patching in this rough functionality into the plotting module should be really straightforward, maybe @jhamman has some tips?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add scatter plot method to dataset 94787306
304091977 https://github.com/pydata/xarray/issues/470#issuecomment-304091977 https://api.github.com/repos/pydata/xarray/issues/470 MDEyOklzc3VlQ29tbWVudDMwNDA5MTk3Nw== barronh 1191149 2017-05-25T18:49:29Z 2017-05-25T18:49:29Z CONTRIBUTOR

+1

Especially useful when using unstructured spatial datasets like observation stations.

import xarray as xr nstations = 9 data = np.random.random(size = nstations) longitude = np.random.random(size = nstations) + -90 latitude = np.random.random(size = nstations) + 40 da = xr.DataArray(np.random.random(nstations ), dims = ['station'], coords = dict(longitude = ('station', longitude), latitude = ('station', latitude)) da.scatter(x = 'longitude', y = 'latitude')

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  add scatter plot method to dataset 94787306

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