home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "NONE" and issue = 731681563 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 1

  • nbCloud91 4

issue 1

  • Alternative way to deal scale_factor and add_offset for opening datasets. · 4 ✖

author_association 1

  • NONE · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
719596138 https://github.com/pydata/xarray/issues/4548#issuecomment-719596138 https://api.github.com/repos/pydata/xarray/issues/4548 MDEyOklzc3VlQ29tbWVudDcxOTU5NjEzOA== nbCloud91 73609114 2020-10-30T14:47:18Z 2020-10-30T14:47:18Z NONE

Edited the snippet (correction). xr.decode_cf(ds) to ds=xr.decode_cf(ds)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Alternative way to deal scale_factor and add_offset for opening datasets. 731681563
719585877 https://github.com/pydata/xarray/issues/4548#issuecomment-719585877 https://api.github.com/repos/pydata/xarray/issues/4548 MDEyOklzc3VlQ29tbWVudDcxOTU4NTg3Nw== nbCloud91 73609114 2020-10-30T14:29:48Z 2020-10-30T14:45:29Z NONE

Yes your sparse answer did help. But to apply the fix to all add_offset for the different DataArrays within the DataSet I have to loop through them. So what I am doing to 'open' a file is. ``` python ds = xr.open_dataset('XYZ.hdf.hdfeos',mask_and_scale=False, engine='pynio')

for dataarray in ds.data_vars: if hasattr(getattr(ds, dataarray),'add_offset'): fix_offset=-getattr(getattr(ds, dataarray),'add_offset')*(getattr(getattr(ds,dataarray),'scale_factor')) getattr(ds,dataarray).attrs['add_offset']=fix_offset

ds = xr.decode_cf(ds) ```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Alternative way to deal scale_factor and add_offset for opening datasets. 731681563
719538707 https://github.com/pydata/xarray/issues/4548#issuecomment-719538707 https://api.github.com/repos/pydata/xarray/issues/4548 MDEyOklzc3VlQ29tbWVudDcxOTUzODcwNw== nbCloud91 73609114 2020-10-30T13:01:39Z 2020-10-30T13:01:39Z NONE

Ah thank you very much @kmuehlbauer . I do realise this is not a proper forum for asking these questions, stackoverflow is suggested, but there seems to be very less activity over there related to questions on xarray. Closing this issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Alternative way to deal scale_factor and add_offset for opening datasets. 731681563
718929664 https://github.com/pydata/xarray/issues/4548#issuecomment-718929664 https://api.github.com/repos/pydata/xarray/issues/4548 MDEyOklzc3VlQ29tbWVudDcxODkyOTY2NA== nbCloud91 73609114 2020-10-29T18:09:25Z 2020-10-29T18:09:25Z NONE

what I do now is xr.open_dataset(filename,mask_and_scale=False). Then I get all the variables as some kind of int8 or int16 and then use the 2nd formula mentioned above for each data-array, since add_offset attributes are different for different variables. I did not get what you meant by "fix the add_offset", you don't mean editing all the datafiles?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Alternative way to deal scale_factor and add_offset for opening datasets. 731681563

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