issue_comments

6 rows where user = 127565 sorted by updated_at descending

View and edit SQL

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

user

  • wragge · 6

author_association

id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue
641908346 https://github.com/simonw/datasette/issues/394#issuecomment-641908346 https://api.github.com/repos/simonw/datasette/issues/394 MDEyOklzc3VlQ29tbWVudDY0MTkwODM0Ng== wragge 127565 2020-06-10T10:22:54Z 2020-06-10T10:22:54Z NONE

There's a working demo here: https://github.com/wragge/datasette-test

And if you want something that's more than just proof-of-concept, here's a notebook which does some harvesting from web archives and then displays the results using Datasette: https://nbviewer.jupyter.org/github/GLAM-Workbench/web-archives/blob/master/explore_presentations.ipynb

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
base_url configuration setting 396212021
604249402 https://github.com/simonw/datasette/issues/712#issuecomment-604249402 https://api.github.com/repos/simonw/datasette/issues/712 MDEyOklzc3VlQ29tbWVudDYwNDI0OTQwMg== wragge 127565 2020-03-26T06:11:44Z 2020-03-26T06:11:44Z NONE

Following on from @betatim's suggestion on Twitter, I've changed the proxy url to include 'absolute'.

proxy_url = f'{base_url}proxy/absolute/8001/'

This works both on Binder and locally, without using the path_from_header option. I've updated the demo repository. Sorry @simonw if I've led you down the wrong path!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
base_url doesn't entirely work for running Datasette inside Binder 588108428
604225034 https://github.com/simonw/datasette/issues/712#issuecomment-604225034 https://api.github.com/repos/simonw/datasette/issues/712 MDEyOklzc3VlQ29tbWVudDYwNDIyNTAzNA== wragge 127565 2020-03-26T04:40:08Z 2020-03-26T04:40:08Z NONE

Great! Yes, can confirm that this works on Binder. However, when I try to run the same code locally, I get an Internal Server Error when I try to access Datasette.

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
  File "/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
    return await self.app(scope, receive, send)
  File "/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/datasette_debug_asgi.py", line 24, in wrapped_app
    await app(scope, recieve, send)
  File "/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/datasette/utils/asgi.py", line 174, in __call__
    await self.app(scope, receive, send)
  File "/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/datasette/tracer.py", line 75, in __call__
    await self.app(scope, receive, send)
  File "/Volumes/Workspace/mycode/datasette-test/lib/python3.7/site-packages/datasette/app.py", line 746, in __call__
    raw_path = dict(scope["headers"])[path_from_header.encode("utf8")].split(b"?")[0]
KeyError: b'x-original-uri'
INFO:     127.0.0.1:49320 - "GET / HTTP/1.1" 500 Internal Server Error
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
base_url doesn't entirely work for running Datasette inside Binder 588108428
604166918 https://github.com/simonw/datasette/issues/394#issuecomment-604166918 https://api.github.com/repos/simonw/datasette/issues/394 MDEyOklzc3VlQ29tbWVudDYwNDE2NjkxOA== wragge 127565 2020-03-26T00:56:30Z 2020-03-26T00:56:30Z NONE

Thanks! I'm trying to launch Datasette from within a notebook using the jupyter-server-proxy and the new base_url parameter. While the assets load ok, and the breadcrumb navigation works, the facet links don't seem to use the base_url. Or have I missed something?

My test repository is here: https://github.com/wragge/datasette-test

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
base_url configuration setting 396212021
602907207 https://github.com/simonw/datasette/issues/394#issuecomment-602907207 https://api.github.com/repos/simonw/datasette/issues/394 MDEyOklzc3VlQ29tbWVudDYwMjkwNzIwNw== wragge 127565 2020-03-23T23:12:18Z 2020-03-23T23:12:18Z NONE

This would also be useful for running Datasette in Jupyter notebooks on Binder. While you can use Jupyter-server-proxy to access Datasette on Binder, the links are broken.

Why run Datasette on Binder? I'm developing a range of Jupyter notebooks that are aimed at getting humanities researchers to explore data from libraries, archives, and museums. Many of them are aimed at researchers with limited digital skills, so being able to run examples in Binder without them installing anything is fantastic.

For example, there are a series of notebooks that help researchers harvest digitised historical newspaper articles from Trove. The metadata from this harvest is saved as a CSV file that users can download. I've also provided some extra notebooks that use Pandas etc to demonstrate ways of analysing and visualising the harvested data.

But it would be really nice if, after completing a harvest, the user could spin up Datasette for some initial exploration of their harvested data without ever leaving their browser.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
base_url configuration setting 396212021
593026413 https://github.com/simonw/datasette/issues/573#issuecomment-593026413 https://api.github.com/repos/simonw/datasette/issues/573 MDEyOklzc3VlQ29tbWVudDU5MzAyNjQxMw== wragge 127565 2020-03-01T01:24:45Z 2020-03-01T01:24:45Z NONE

Did you manage to find an answer to this? I've got a notebook to help people generate datasets on the fly from an API, so it would be cool if they flick it to Datasette for initial exploration.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Exposing Datasette via Jupyter-server-proxy 492153532

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,
   [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 · Query took 24.777ms · About: github-to-sqlite