home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

23 rows where "created_at" is on date 2017-11-19 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url

issue 9

  • Filter UI on table page 7
  • Consider data-package as a format for metadata 3
  • Redesign JSON output, ditch jsono, offer variants controlled by parameter instead 3
  • UI support for running FTS searches 3
  • ?_group_count=country - return counts by specific column(s) 2
  • Filtered tables should show count of all matching rows, if fast enough 2
  • Detect foreign keys and use them to link HTML pages together 1
  • Link to JSON for the list of tables 1
  • Filtered table view should show a count 1

user 3

  • simonw 21
  • rgieseke 1
  • yschimke 1

author_association 3

  • OWNER 21
  • CONTRIBUTOR 1
  • NONE 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
345552358 https://github.com/simonw/datasette/issues/122#issuecomment-345552358 https://api.github.com/repos/simonw/datasette/issues/122 MDEyOklzc3VlQ29tbWVudDM0NTU1MjM1OA== simonw 9599 2017-11-19T21:45:38Z 2017-12-05T19:09:52Z OWNER

For the overall shape of the rows:

?_shape=lists (default), ?_shape=objects, ?_shape=object (primary key as object keys)

For getting back extra keys:

?_extras=schema,query,timing

For expanding columns:

?_expand_all=1

Or ?_expand=qSpecies&_expand=qCaretaker

The template view will only be allowed to work with data it can request using extra options.

That leaves one sighted nasty edge-case: the default view will expand all columns, but the .json view of it won't?

I think that's OK. The default view won't include the extras used by the template to render the page either.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Redesign JSON output, ditch jsono, offer variants controlled by parameter instead 275092453  
345559864 https://github.com/simonw/datasette/issues/86#issuecomment-345559864 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTU1OTg2NA== simonw 9599 2017-11-19T23:35:48Z 2017-11-19T23:35:48Z OWNER

I need a nicer abstraction around the concept of filters. It needs to be able to:

  • convert querystring parameters into filters
  • convert filters into a querystring
  • iterate through currently applied filters
  • convert selected filters into a human description (e.g. for a title)
  • expand filters that involve a foreign key
  • add filters
  • remove filters
  • define different types of filters

It should replace my current build_where_clauses implementation, in particular this bit:

https://github.com/simonw/datasette/blob/a5881e105a02830d26f07e98177248d5910893da/datasette/utils.py#L38-L56

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345552500 https://github.com/simonw/datasette/issues/122#issuecomment-345552500 https://api.github.com/repos/simonw/datasette/issues/122 MDEyOklzc3VlQ29tbWVudDM0NTU1MjUwMA== simonw 9599 2017-11-19T21:47:27Z 2017-11-19T21:47:27Z OWNER

To start with, I could just ditch the .jsono in favour of the new _shape argument.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Redesign JSON output, ditch jsono, offer variants controlled by parameter instead 275092453  
345552440 https://github.com/simonw/datasette/issues/122#issuecomment-345552440 https://api.github.com/repos/simonw/datasette/issues/122 MDEyOklzc3VlQ29tbWVudDM0NTU1MjQ0MA== simonw 9599 2017-11-19T21:46:43Z 2017-11-19T21:46:43Z OWNER

This calls for refactoring the code so the table view, the row view and the custom SQL view share as much logic as possible.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Redesign JSON output, ditch jsono, offer variants controlled by parameter instead 275092453  
345538016 https://github.com/simonw/datasette/issues/127#issuecomment-345538016 https://api.github.com/repos/simonw/datasette/issues/127 MDEyOklzc3VlQ29tbWVudDM0NTUzODAxNg== simonw 9599 2017-11-19T18:22:45Z 2017-11-19T18:22:45Z OWNER

I implemented a basic version of this in f59c840e7db8870afcdeba7a53bdea07bb674334 for custom SQL.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filtered tables should show count of all matching rows, if fast enough 275135719  
345537315 https://github.com/simonw/datasette/issues/44#issuecomment-345537315 https://api.github.com/repos/simonw/datasette/issues/44 MDEyOklzc3VlQ29tbWVudDM0NTUzNzMxNQ== simonw 9599 2017-11-19T18:11:27Z 2017-11-19T18:11:27Z OWNER

This would enable faceted search - moving it to the search milestone.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
?_group_count=country - return counts by specific column(s) 269731374  
345537268 https://github.com/simonw/datasette/issues/134#issuecomment-345537268 https://api.github.com/repos/simonw/datasette/issues/134 MDEyOklzc3VlQ29tbWVudDM0NTUzNzI2OA== simonw 9599 2017-11-19T18:10:48Z 2017-11-19T18:10:48Z OWNER

Dupe of #127

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filtered table view should show a count 275176094  
345533274 https://github.com/simonw/datasette/issues/131#issuecomment-345533274 https://api.github.com/repos/simonw/datasette/issues/131 MDEyOklzc3VlQ29tbWVudDM0NTUzMzI3NA== simonw 9599 2017-11-19T17:17:37Z 2017-11-19T17:18:05Z OWNER

Demo: https://sf-trees.now.sh/sf-trees-ebc2ad9/Street_Tree_List?_search=grove+st

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI support for running FTS searches 275166669  
345526517 https://github.com/simonw/datasette/issues/131#issuecomment-345526517 https://api.github.com/repos/simonw/datasette/issues/131 MDEyOklzc3VlQ29tbWVudDM0NTUyNjUxNw== simonw 9599 2017-11-19T15:48:28Z 2017-11-19T15:48:28Z OWNER

Since SQLite supports column specifications in the MATCH body itself, there's no need to provide a separate mechanism for specifying columns in the query string: https://sqlite.org/fts5.html#fts5_column_filters

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI support for running FTS searches 275166669  
345526171 https://github.com/simonw/datasette/issues/131#issuecomment-345526171 https://api.github.com/repos/simonw/datasette/issues/131 MDEyOklzc3VlQ29tbWVudDM0NTUyNjE3MQ== simonw 9599 2017-11-19T15:44:30Z 2017-11-19T15:44:30Z OWNER

Relevant SQLite docs:

  • https://sqlite.org/fts5.html
  • https://www.sqlite.org/fts3.html
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
UI support for running FTS searches 275166669  
345509500 https://github.com/simonw/datasette/issues/97#issuecomment-345509500 https://api.github.com/repos/simonw/datasette/issues/97 MDEyOklzc3VlQ29tbWVudDM0NTUwOTUwMA== yschimke 231923 2017-11-19T11:26:58Z 2017-11-19T11:26:58Z NONE

Specifically docs should make it clearer this file exists

https://parlgov.datasettes.com/.json

And from that you can build https://parlgov.datasettes.com/parlgov-25f9855.json

Then https://parlgov.datasettes.com/parlgov-25f9855/cabinet.json

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Link to JSON for the list of tables  274022950  
345503897 https://github.com/simonw/datasette/issues/105#issuecomment-345503897 https://api.github.com/repos/simonw/datasette/issues/105 MDEyOklzc3VlQ29tbWVudDM0NTUwMzg5Nw== rgieseke 198537 2017-11-19T09:38:08Z 2017-11-19T09:38:08Z CONTRIBUTOR

Thanks, I wrote this very simple reader because the default approach as described on the Datahub pages seemed to complicated. I had metadata from the datapackage.json attached to the returned DataFrames but removed this due to some attribute handling change in the latest Pandas version.

This could also be useful for getting from Data Package to SQL db: https://github.com/frictionlessdata/tableschema-sql-py

I maintain a few climate science related dataset at https://github.com/openclimatedata/

The Data Retriever (mainly ecological data) by @ethanwhite et al. is also using the Data Package format for metadata and has some tooling for different dbs:

https://frictionlessdata.io/articles/the-data-retriever/ https://github.com/weecology/retriever

The Open Power System Data project also has a couple of datasets that show nicely how CSV is great for assembling and then already make SQLite files available. It's one of the first data sets I tried with Datasette, perfect for the use case of getting an API for putting power stations on a map ...

https://data.open-power-system-data.org/

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Consider data-package as a format for metadata 274314940  
345497689 https://github.com/simonw/datasette/issues/86#issuecomment-345497689 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NzY4OQ== simonw 9599 2017-11-19T07:27:40Z 2017-11-19T07:27:40Z OWNER

I'll have to refactor the foreign key annotating code to be usable in other contexts - at the moment it only works for annotating displays of rows, but I need to use it to resolve selected filters as well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345497534 https://github.com/simonw/datasette/issues/86#issuecomment-345497534 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NzUzNA== simonw 9599 2017-11-19T07:23:33Z 2017-11-19T07:23:33Z OWNER

"Tablename: 3,567 rows where status = 3 (published) and n > 55"

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345497453 https://github.com/simonw/datasette/issues/86#issuecomment-345497453 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NzQ1Mw== simonw 9599 2017-11-19T07:21:22Z 2017-11-19T07:21:22Z OWNER

I'm going to be a bit classier about this and auto generate a title for the page that describes the currently applied filters.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345496540 https://github.com/simonw/datasette/issues/86#issuecomment-345496540 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NjU0MA== simonw 9599 2017-11-19T06:59:40Z 2017-11-19T06:59:40Z OWNER

OK,I've figured out how to do an initial version of this without JavaScript. I'll provide three form fields labell d "add filter":

  • a select box of all of the columns
  • a select box of the available operations
  • a value box

Submit those and the site will redirect you to a correctly populated querystring for that filter.

If you have filters applied, those will display as prepopulated form field triples.

For foreign key reference filters, I will display the resolved value next to the text box containing the numeric ID. In the future this can get a select2 style treatment.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345495046 https://github.com/simonw/datasette/issues/127#issuecomment-345495046 https://api.github.com/repos/simonw/datasette/issues/127 MDEyOklzc3VlQ29tbWVudDM0NTQ5NTA0Ng== simonw 9599 2017-11-19T06:17:42Z 2017-11-19T06:17:42Z OWNER

Maybe I should support &_count=1 to handle this - that would be easy to Ajax-in in conjenction with the other filters.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filtered tables should show count of all matching rows, if fast enough 275135719  
345494971 https://github.com/simonw/datasette/issues/44#issuecomment-345494971 https://api.github.com/repos/simonw/datasette/issues/44 MDEyOklzc3VlQ29tbWVudDM0NTQ5NDk3MQ== simonw 9599 2017-11-19T06:15:39Z 2017-11-19T06:15:39Z OWNER

It would be great if this could support foreign key references and automatically resolve and hyperlink them if they are detected.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
?_group_count=country - return counts by specific column(s) 269731374  
345494918 https://github.com/simonw/datasette/issues/86#issuecomment-345494918 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NDkxOA== simonw 9599 2017-11-19T06:14:17Z 2017-11-19T06:14:17Z OWNER

If the selected relationship is a foreign key reference, we should resolve that foreign key and display it on the page.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345494775 https://github.com/simonw/datasette/issues/86#issuecomment-345494775 https://api.github.com/repos/simonw/datasette/issues/86 MDEyOklzc3VlQ29tbWVudDM0NTQ5NDc3NQ== simonw 9599 2017-11-19T06:09:43Z 2017-11-19T06:09:43Z OWNER

Now that we have foreign key support (#85) this is even more important, since foreign key support actively encourages linking to filtered table views.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Filter UI on table page 273703829  
345494724 https://github.com/simonw/datasette/issues/85#issuecomment-345494724 https://api.github.com/repos/simonw/datasette/issues/85 MDEyOklzc3VlQ29tbWVudDM0NTQ5NDcyNA== simonw 9599 2017-11-19T06:08:19Z 2017-11-19T06:08:19Z OWNER

This is working really nicely now:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Detect foreign keys and use them to link HTML pages together 273678673  
345494052 https://github.com/simonw/datasette/issues/105#issuecomment-345494052 https://api.github.com/repos/simonw/datasette/issues/105 MDEyOklzc3VlQ29tbWVudDM0NTQ5NDA1Mg== simonw 9599 2017-11-19T05:49:53Z 2017-11-19T05:49:53Z OWNER

https://github.com/rgieseke/pandas-datapackage-reader

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Consider data-package as a format for metadata 274314940  
345493344 https://github.com/simonw/datasette/issues/105#issuecomment-345493344 https://api.github.com/repos/simonw/datasette/issues/105 MDEyOklzc3VlQ29tbWVudDM0NTQ5MzM0NA== simonw 9599 2017-11-19T05:28:49Z 2017-11-19T05:28:49Z OWNER

Looks like there are a ton of interesting datasets packaged in this way at http://datahub.io/docs/core-data - see also https://github.com/datasets

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Consider data-package as a format for metadata 274314940  

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])
, [performed_via_github_app] TEXT);
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 1951.474ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows