home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 233992696 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • shoyer 2
  • deeplycloudy 2
  • dopplershift 1

author_association 2

  • CONTRIBUTOR 3
  • MEMBER 2

issue 1

  • Best practice when the _Unsigned attribute is present in NetCDF files · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
309848945 https://github.com/pydata/xarray/issues/1444#issuecomment-309848945 https://api.github.com/repos/pydata/xarray/issues/1444 MDEyOklzc3VlQ29tbWVudDMwOTg0ODk0NQ== deeplycloudy 1325771 2017-06-20T18:35:11Z 2017-06-20T18:35:23Z CONTRIBUTOR

I'm dropping a quick note here to flag that PR #1453 has been written to address this issue. I have used the draft PR in earnest as part of some ongoing analyses of the data that led me to raise the issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Best practice when the _Unsigned attribute is present in NetCDF files 233992696
306848675 https://github.com/pydata/xarray/issues/1444#issuecomment-306848675 https://api.github.com/repos/pydata/xarray/issues/1444 MDEyOklzc3VlQ29tbWVudDMwNjg0ODY3NQ== deeplycloudy 1325771 2017-06-07T16:25:01Z 2017-06-07T16:29:33Z CONTRIBUTOR

Ah, I see the distinction concerning the xarray implementation being made in the earlier discussion. There certainly are some tradeoffs being made by the data provider, and I'm far enough removed from those decisions that there's not much I can do.

Thanks for the clarification on the background discussion and the willingness to consider support for the attribute. It's my first time dealing with xarray internals, but given that there's a reference implementation in NetCDF4-python, I'm willing to have a go at a PR for this.

If I had to take a guess, it belongs in conventions.py, fitting with the logic beginning line 789 where the mask_and_scale is handled. It could be built into the MaskedAndScaledArray class, though perhaps a new UnsignedIntArray class might be preferred?

The docstrings note that the implementation is designed around CF-style data. As noted above, this attribute is outside the CF conventions, so I might note that exception in a comment in the code.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Best practice when the _Unsigned attribute is present in NetCDF files 233992696
306834764 https://github.com/pydata/xarray/issues/1444#issuecomment-306834764 https://api.github.com/repos/pydata/xarray/issues/1444 MDEyOklzc3VlQ29tbWVudDMwNjgzNDc2NA== shoyer 1217238 2017-06-07T15:39:55Z 2017-06-07T15:39:55Z MEMBER

HDF5 doesn't come without its own draw backs...such as vastly more complicated (and admittedly more capable) on-disk format.

Yes, of course. But I thought netCDF4-extended meant NetCDF on HDF5, making use of all the HD5 features. So I didn't think that was the tradeoff here.

Also, while unsigned types are a feature of the netCDF4/HDF5, strictly speaking, the netCDF4 unsigned types are not compatible with any released version of the CF specification

Sure, though if you're strictly following CF, you probably would use valid_min/valid_max/valid_range instead of _Unsigned...

Anyways, again I don't really have an objection here. This attribute can be interpreted in a pretty unambiguous way, so adding support for this would be mostly harmless.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Best practice when the _Unsigned attribute is present in NetCDF files 233992696
306832308 https://github.com/pydata/xarray/issues/1444#issuecomment-306832308 https://api.github.com/repos/pydata/xarray/issues/1444 MDEyOklzc3VlQ29tbWVudDMwNjgzMjMwOA== dopplershift 221526 2017-06-07T15:32:03Z 2017-06-07T15:32:03Z CONTRIBUTOR

HDF5 doesn't come without its own draw backs...such as vastly more complicated (and admittedly more capable) on-disk format. We should not presume to know better than the data providers what their trade-offs are.

Also, while unsigned types are a feature of the netCDF4/HDF5, strictly speaking, the netCDF4 unsigned types are not compatible with any released version of the CF specification (see list of acceptable data types here: http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html#_data_types).

So it's not exactly as simple as you'd like it to be.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Best practice when the _Unsigned attribute is present in NetCDF files 233992696
306712888 https://github.com/pydata/xarray/issues/1444#issuecomment-306712888 https://api.github.com/repos/pydata/xarray/issues/1444 MDEyOklzc3VlQ29tbWVudDMwNjcxMjg4OA== shoyer 1217238 2017-06-07T07:34:05Z 2017-06-07T07:34:05Z MEMBER

To clarify: I didn't want to let NetCDF4-python parse this attribute, because it would break an invariant in our data model. I'm not opposed to supporting this separately in xarray (using xarray's machinery for handling netcdf conventions).

I will say though that this convention makes little sense to me for netcdf4/hdf5 files, which already provide native support for unsigned types, so separately I would also encourage this data provider to change their practices here :).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Best practice when the _Unsigned attribute is present in NetCDF files 233992696

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