home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 88075523 and user = 1217238 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

  • shoyer · 3 ✖

issue 1

  • Tools for converting between xray.Dataset and nested dictionaries/JSON · 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
239305276 https://github.com/pydata/xarray/issues/432#issuecomment-239305276 https://api.github.com/repos/pydata/xarray/issues/432 MDEyOklzc3VlQ29tbWVudDIzOTMwNTI3Ng== shoyer 1217238 2016-08-11T21:54:51Z 2016-08-11T21:54:51Z MEMBER

Fixed by #917

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Tools for converting between xray.Dataset and nested dictionaries/JSON 88075523
234584649 https://github.com/pydata/xarray/issues/432#issuecomment-234584649 https://api.github.com/repos/pydata/xarray/issues/432 MDEyOklzc3VlQ29tbWVudDIzNDU4NDY0OQ== shoyer 1217238 2016-07-22T16:03:23Z 2016-07-22T16:07:20Z MEMBER

.3. Couldn't this make the dict blow up for large datasets? Maybe there could be a flag that lets the user decide whether to leave the data in its current form (could use self.data in case it is a dask array)

Which use cases for this functionality would want the numpy/dask array? If you're planning on serializing to JSON or a similar format, then you'll need to add a custom decoder/encoder to handle arrays.

.6. The trouble with xarray.DataArray is that it doesn't require a name but it can have one. Is that something that we would want to preserve?

Yes, we should preserve the name is possible (serialization formats are much more useful if they are not lossy). Fortunately, None is a perfectly valid value when translated into JSON (as null). So I think we could simply use that as a default.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Tools for converting between xray.Dataset and nested dictionaries/JSON 88075523
234472262 https://github.com/pydata/xarray/issues/432#issuecomment-234472262 https://api.github.com/repos/pydata/xarray/issues/432 MDEyOklzc3VlQ29tbWVudDIzNDQ3MjI2Mg== shoyer 1217238 2016-07-22T07:18:36Z 2016-07-22T07:18:36Z MEMBER

Yes, I think this is still of interest, though of course the devil is in the details. 1. Do we make this look closer to the xarray.Dataset data model (coords, data_vars, attrs, dims) or netCDF (variables, attributes, dimensions)? 2. If the later -- do we go so far as to encode all data types (e.g., dates and times) according to CF conventions? 3. Do we save data in the form of nested lists or in a numpy array? 4. Do we output directly output to JSON or just a dict? 5. Do we include dims or dimensions (providing dimension sizes) as a top level field/check? 6. How does the format differ for xarray.DataArray? Do we even bother with DataArray?

My inclinations: 1. Mirror xarray.Dataset 2. NA 3. Use nested lists of native Python types, e.g., generated with numpy's .tolist() method. 4. Just a dict, to preserve flexibility for different serialization formats. 5. Yes, sanity checks are important. 6. Probably not a bad idea to cover xarray.DataArray, too, but the format should be clearly distinct (not reusing variables as a top level key).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Tools for converting between xray.Dataset and nested dictionaries/JSON 88075523

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