home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where author_association = "MEMBER", issue = 264747372 and user = 1217238 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

  • shoyer · 12 ✖

issue 1

  • html repr of xarray object (for the notebook) · 12 ✖

author_association 1

  • MEMBER · 12 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
344051323 https://github.com/pydata/xarray/issues/1627#issuecomment-344051323 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDM0NDA1MTMyMw== shoyer 1217238 2017-11-13T20:42:43Z 2017-11-13T20:42:43Z MEMBER

The other thing to watch out for is if the vdom Python API is still immature and likely to lead to additional works when it changes in the future. This is somewhat of a judgment call. My sense is that they are taking a careful design to the project but it is still in the early days so it's hard to say for sure.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
344035867 https://github.com/pydata/xarray/issues/1627#issuecomment-344035867 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDM0NDAzNTg2Nw== shoyer 1217238 2017-11-13T19:47:10Z 2017-11-13T19:47:19Z MEMBER

I am OK adding new (optional) Python dependencies like vdom or Jinja2 if that makes implementing and maintaining this easier.

If we can solve the problem of generating HTML from vdom as a fallback (https://github.com/nteract/vdom/issues/43) and the vdom developers are supportive for various issues that come up, that could easily be the best option.

I would be reluctant to only support vdom output, because there are a lot of legacy notebook viewing interfaces (including various IDEs, cloud hosted notebook environments and rendering on GitHub) that could take a while (years?) to support it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
341133335 https://github.com/pydata/xarray/issues/1627#issuecomment-341133335 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDM0MTEzMzMzNQ== shoyer 1217238 2017-11-01T15:05:09Z 2017-11-01T15:05:09Z MEMBER

I guess that it is a bit late for v0.10 release which is already on track?

Yes, probably at this point. But hopefully we can do a shorter release cycle for v0.11. Also, though this is a big visual change, I'm not sure it's actually a breaking change, per se. Only notebook output will change, not programmatic use of repr().

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
340237652 https://github.com/pydata/xarray/issues/1627#issuecomment-340237652 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDM0MDIzNzY1Mg== shoyer 1217238 2017-10-29T04:54:32Z 2017-10-29T04:54:32Z MEMBER

@benbovy it seems like that discussion has stalled out... are you ready to put together that PR? :)

Personally, I'm very happy with your current version. You might even convince me to hold off on the v0.10 release to include it!

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
336484415 https://github.com/pydata/xarray/issues/1627#issuecomment-336484415 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDMzNjQ4NDQxNQ== shoyer 1217238 2017-10-13T15:23:05Z 2017-10-13T15:23:05Z MEMBER

I have a slight proposed tweak on the Dataset repr (https://jsfiddle.net/jrot9pex/1/). It makes two changes: - Changes the letter "A" to "a" for attributes. Maybe this is just me, but the capital "A" feels very loud, and reminds me of the scarlet letter! - Moves the marker "a" closer to the variable name, which makes it slightly clearer that it's associated.

Note that the info() method was added a while ago: #1176

At least in the notebook, this change would make it obsolete.

Yes, but let's keep it -- it have a nice pure text format (from ncdump) which works especially well with copy & paste.

Given your case, maybe it would be nice to add a rule to show the attribute section collapsed when the number of attributes is too long. If we allow that, then maybe it would be nice to also show the number of items in the section titles, e.g., ► Attributes (10):

Yes, I like this general idea -- though we might only show the number when it is collapsed, e.g., ► Attributes: (10)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
336279364 https://github.com/pydata/xarray/issues/1627#issuecomment-336279364 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDMzNjI3OTM2NA== shoyer 1217238 2017-10-12T21:35:39Z 2017-10-12T21:35:39Z MEMBER

Alternatively, we can imagine two drop-downs per variable, one for the attributes and one for the full array values (numpy or dask repr). Each would be shown/hidden by two distinct symbols or links, perhaps both located on the right after the preview-values so that we avoid confusion with symbol * in the normal repr.

Yes, I like that. Possibly clicking on the array values would show the larger preview.

I did play around a little with a hover drop down, but the positioning is a little hacky: https://jsfiddle.net/gux879hn/2/

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
336216861 https://github.com/pydata/xarray/issues/1627#issuecomment-336216861 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDMzNjIxNjg2MQ== shoyer 1217238 2017-10-12T17:57:45Z 2017-10-12T17:57:45Z MEMBER

One more trick we could add for the Dataset repr:

  • When hovering over data, show repr for the full array values (as a numpy array) in a box (similar to "title" text, but ideally fixed-width format).
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
336192227 https://github.com/pydata/xarray/issues/1627#issuecomment-336192227 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDMzNjE5MjIyNw== shoyer 1217238 2017-10-12T16:31:25Z 2017-10-12T16:31:25Z MEMBER

Maybe putting the + icon more to the left would do the trick (https://jsfiddle.net/9ab4c3tr/49/).

Now it just looks a little out of place :). I liked it better closer to the variable name.

Changing font-weight instead of background-color works better IMO (same link above).

Hmm, I'm not sure. I find text that moves very distracting -- I like changing background colors.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
336188295 https://github.com/pydata/xarray/issues/1627#issuecomment-336188295 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDMzNjE4ODI5NQ== shoyer 1217238 2017-10-12T16:17:09Z 2017-10-12T16:17:09Z MEMBER

Option A: embed the plain-text representation of the wrapped numpy.array (or dask.array) in a HTML container (https://jsfiddle.net/43z4v2wt/1/). The result is not that bad, although monospace and sans-serif fonts do not mix very well IMO.

I think this is probably our best option. My main suggestion is it should be possible to click somewhere (maybe on top xarray.DataArray header) to hide/show the data section.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
336169649 https://github.com/pydata/xarray/issues/1627#issuecomment-336169649 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDMzNjE2OTY0OQ== shoyer 1217238 2017-10-12T15:15:59Z 2017-10-12T15:15:59Z MEMBER

As long as we're nit-picking style....

main section titles are colored so that these are more detached from the content (not sure I really like it, though),

I slightly prefer the grayscale you had before -- the section titles are already well detached.

subtle shade variations, notably for displaying the first values for each variable,

Love it!

drop-downs for displaying attributes per variable if any (collapsed by default).

It is wonderful to expose this information! I have a slight concern that the + icons could be confusing with the * we use for index variables in the normal repr. I don't have any good ideas for fixing this yet.

hover-effect for dimensions: highlight all variables having the hovered dimension (uses Javascript)

For highlighting, maybe something a little more subtle would work well, either: 1. only highlighting the dimension names below, not the full variables, or 2. only highlight full variables with a matching name, as well as all matching dimensions.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
335979107 https://github.com/pydata/xarray/issues/1627#issuecomment-335979107 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDMzNTk3OTEwNw== shoyer 1217238 2017-10-11T23:41:49Z 2017-10-11T23:41:49Z MEMBER

OK, so bad news is that it not possible to select elements other than siblings or descendant tags with CSS. So selecting "cousin" tags like a dimension name at multiple locations in the repr is out.

But we could potentially add JavaScript for fancy hover effects. Even if it gets stripped out in many cases (for untrusted notebooks), it should degrade gracefully to the HTML only repr. My main concern would annoying prompts in the notebook interface that ask a user if they want to trust outputs or not.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372
335970768 https://github.com/pydata/xarray/issues/1627#issuecomment-335970768 https://api.github.com/repos/pydata/xarray/issues/1627 MDEyOklzc3VlQ29tbWVudDMzNTk3MDc2OA== shoyer 1217238 2017-10-11T22:48:33Z 2017-10-11T22:48:33Z MEMBER

OMG indeed this looks fantastic! We should test this on more examples, but I already love it. The underline is a great way to illustrate which variables are dimensions.

I think it's best if we keep a very lightweight implementation, i.e., pure HTML/CSS (no Javascript)

Agreed. Notebook viewers tend to sanitize out JavaScript, especially if originating from an unknown source.

highlighting on hover a specific dimension simultaneously at several places of the repr

This would also be awesome, if possible with pure CSS. I don't know, but I'm going to bug my colleague who does JavaScript visualization.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  html repr of xarray object (for the notebook) 264747372

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