home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 690624634 and user = 6628425 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

  • spencerkclark · 4 ✖

issue 1

  • problem with time axis values in line plot · 4 ✖

author_association 1

  • MEMBER 4
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
950176920 https://github.com/pydata/xarray/issues/4401#issuecomment-950176920 https://api.github.com/repos/pydata/xarray/issues/4401 IC_kwDOAMm_X844ooyY spencerkclark 6628425 2021-10-23T16:27:32Z 2021-10-23T16:27:32Z MEMBER

nc-time-axis version 1.4.0 has now been released and is available on both PyPI and conda-forge. It fixes this issue and a number of others -- see the newly added release notes and documentation for more information.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  problem with time axis values in line plot 690624634
896360492 https://github.com/pydata/xarray/issues/4401#issuecomment-896360492 https://api.github.com/repos/pydata/xarray/issues/4401 IC_kwDOAMm_X841bWAs spencerkclark 6628425 2021-08-10T22:45:20Z 2021-08-10T22:45:20Z MEMBER

This will be fixed in the next release of nc-time-axis, so I will go ahead and close this issue. Thanks for your patience @klindsay28.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  problem with time axis values in line plot 690624634
687648489 https://github.com/pydata/xarray/issues/4401#issuecomment-687648489 https://api.github.com/repos/pydata/xarray/issues/4401 MDEyOklzc3VlQ29tbWVudDY4NzY0ODQ4OQ== spencerkclark 6628425 2020-09-05T18:56:32Z 2020-09-05T18:56:32Z MEMBER

I looked into the nc_time_axis issue a bit more. It appears it is a label formatting problem. The ticks actually make sense, but are labeled in a confusing way. If I force the date format pattern to be "%Y-%m-%d" in nc_time_axis -- note there's no way to do this without modifying the source code -- I get a plot that looks like this:

We can see the ticks are really 0000-12-01, 0001-10-01, 0002-08-01, and 0003-06-01. The main problem, I think, is that nc_time_axis is choosing a monthly tick resolution, but using a format that would only make sense if the ticks had an annual resolution. So it should be picking a label format of "%Y-%m" instead of "%Y". In general it looks like there should be more work in nc_time_axis to make the logic that chooses the tick resolution and label format consistent.

I opened an issue in nc_time_axis to track this: https://github.com/SciTools/nc-time-axis/issues/48.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  problem with time axis values in line plot 690624634
686065726 https://github.com/pydata/xarray/issues/4401#issuecomment-686065726 https://api.github.com/repos/pydata/xarray/issues/4401 MDEyOklzc3VlQ29tbWVudDY4NjA2NTcyNg== spencerkclark 6628425 2020-09-02T22:40:55Z 2020-09-02T22:40:55Z MEMBER

Thanks for raising this @klindsay28; very clean example. This looks like an nc_time_axis issue, since I can reproduce it outside of xarray: ```python import cftime import matplotlib.pyplot as plt import nc_time_axis

time_vals = [cftime.DatetimeNoLeap(1+year, 1+month, 15) for year in range(3) for month in range(12)]

x_vals = [time_val.year + time_val.dayofyr / 365.0 for time_val in time_vals]

fig, ax = plt.subplots(1, 1) ax.plot(time_vals, x_vals, "-o") ```

I'll do some further work to try and diagnose what the issue is there.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  problem with time axis values in line plot 690624634

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