html_url,issue_url,id,node_id,user,user_label,created_at,updated_at,author_association,body,reactions,issue,issue_label,performed_via_github_app https://github.com/simonw/datasette/issues/483#issuecomment-495032818,https://api.github.com/repos/simonw/datasette/issues/483,495032818,MDEyOklzc3VlQ29tbWVudDQ5NTAzMjgxOA==,9599,simonw,2019-05-23T01:28:06Z,2019-05-23T01:28:06Z,OWNER,"Here's a UI concept: ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",447408527,Option to facet by date using month or year, https://github.com/simonw/datasette/issues/483#issuecomment-495032933,https://api.github.com/repos/simonw/datasette/issues/483,495032933,MDEyOklzc3VlQ29tbWVudDQ5NTAzMjkzMw==,9599,simonw,2019-05-23T01:28:45Z,2019-05-23T01:28:45Z,OWNER,Would this be useful for other facets? How many facet types are likely to have a small number of options that could be linked to in this way?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",447408527,Option to facet by date using month or year, https://github.com/simonw/datasette/issues/483#issuecomment-495034774,https://api.github.com/repos/simonw/datasette/issues/483,495034774,MDEyOklzc3VlQ29tbWVudDQ5NTAzNDc3NA==,45919695,jcmkk3,2019-05-23T01:38:32Z,2019-05-23T01:43:04Z,NONE,"I think that location information is one of the other common pieces of hierarchical data. At least one that is general enough that extra dimensions could be auto-generated. Also, I think this is an awesome project. Thank you for creating this.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",447408527,Option to facet by date using month or year, https://github.com/simonw/datasette/issues/259#issuecomment-495058104,https://api.github.com/repos/simonw/datasette/issues/259,495058104,MDEyOklzc3VlQ29tbWVudDQ5NTA1ODEwNA==,9599,simonw,2019-05-23T03:55:37Z,2019-05-23T03:55:37Z,OWNER,I got rid of inspect in #462 - I will still be doing many-to-many detection (initially as part of #356) but it doesn't need a separate ticket.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",322787470,inspect() should detect many-to-many relationships, https://github.com/simonw/datasette/issues/355#issuecomment-495058622,https://api.github.com/repos/simonw/datasette/issues/355,495058622,MDEyOklzc3VlQ29tbWVudDQ5NTA1ODYyMg==,9599,simonw,2019-05-23T03:58:58Z,2019-05-23T03:58:58Z,OWNER,"So the design I have so far is: `?_m2m_linktablename__linktablecolumn=value` I'm concerned that this doesn't take tables or columns with `__` in their name into account. Does that matter? Could I support this without them?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",346027040,Table view should support filtering via many-to-many relationships, https://github.com/simonw/datasette/issues/355#issuecomment-495058828,https://api.github.com/repos/simonw/datasette/issues/355,495058828,MDEyOklzc3VlQ29tbWVudDQ5NTA1ODgyOA==,9599,simonw,2019-05-23T04:00:27Z,2019-05-23T04:00:27Z,OWNER,"The alternative would be to use JSON: `?_m2m={""table"":""ad_targets"",""column"":""target_id"",""value"":""ec3ac""}`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",346027040,Table view should support filtering via many-to-many relationships, https://github.com/simonw/datasette/issues/355#issuecomment-495058964,https://api.github.com/repos/simonw/datasette/issues/355,495058964,MDEyOklzc3VlQ29tbWVudDQ5NTA1ODk2NA==,9599,simonw,2019-05-23T04:01:17Z,2019-05-23T04:01:17Z,OWNER,"I think I like this better. I don't think `?_m2m=` is the correct name for it though. `?_through={""table"":""ad_targets"",""column"":""target_id"",""value"":""ec3ac""}` feels a little more accurate.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",346027040,Table view should support filtering via many-to-many relationships, https://github.com/simonw/datasette/issues/355#issuecomment-495059236,https://api.github.com/repos/simonw/datasette/issues/355,495059236,MDEyOklzc3VlQ29tbWVudDQ5NTA1OTIzNg==,9599,simonw,2019-05-23T04:03:04Z,2019-05-23T04:03:04Z,OWNER,"This assumes that our current table has a single, unambiguous foreign key relationship with the table indicated by the `?through=` parameter. I think that's reasonable. The JSON format could be extended to allow that side of the relationship to optionally be defined there (if the foreign key relationship is missing).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",346027040,Table view should support filtering via many-to-many relationships, https://github.com/simonw/datasette/issues/355#issuecomment-495061686,https://api.github.com/repos/simonw/datasette/issues/355,495061686,MDEyOklzc3VlQ29tbWVudDQ5NTA2MTY4Ng==,9599,simonw,2019-05-23T04:21:00Z,2019-05-23T04:21:00Z,OWNER,"Filtering through one table already works - you need to know that table's primary key, then you do `?column_id=pk` against the first table. Filtering through a m2m table will be handled by the new `?_through=` parameter. I'm going to leave out filtering through a second levels of joins for the moment. Potentially that could be added later as some extra complicated JSON.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",346027040,Table view should support filtering via many-to-many relationships, https://github.com/simonw/datasette/issues/484#issuecomment-495068273,https://api.github.com/repos/simonw/datasette/issues/484,495068273,MDEyOklzc3VlQ29tbWVudDQ5NTA2ODI3Mw==,9599,simonw,2019-05-23T05:03:48Z,2019-05-23T05:04:35Z,OWNER,"Ideally we would display a limited number of m2m related records with a ""..."" if there are more than our limit. I could also show a count of the total number of records, but this would have to be agressively time-limited or it could cause extremely poor performance. This could be implemented as a SQL query for every displayed row, taking advantage of [Many Small Queries Are Efficient In SQLite](https://sqlite.org/np1queryprob.html). Provided that SQL runs against an index this should be fast to display even on a table with hundreds of rows.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",447451492,Mechanism for displaying summary of m2m relationships in rows on table view, https://github.com/simonw/datasette/issues/355#issuecomment-495077443,https://api.github.com/repos/simonw/datasette/issues/355,495077443,MDEyOklzc3VlQ29tbWVudDQ5NTA3NzQ0Mw==,9599,simonw,2019-05-23T05:52:52Z,2019-05-23T05:52:52Z,OWNER,Documentation here: https://datasette.readthedocs.io/en/latest/json_api.html#special-table-arguments,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",346027040,Table view should support filtering via many-to-many relationships, https://github.com/simonw/datasette/issues/355#issuecomment-495077528,https://api.github.com/repos/simonw/datasette/issues/355,495077528,MDEyOklzc3VlQ29tbWVudDQ5NTA3NzUyOA==,9599,simonw,2019-05-23T05:53:20Z,2019-05-23T05:53:20Z,OWNER,"Demo: https://latest.datasette.io/fixtures/roadside_attractions?_through={%22table%22:%22roadside_attraction_characteristics%22,%22column%22:%22characteristic_id%22,%22value%22:%221%22}","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",346027040,Table view should support filtering via many-to-many relationships, https://github.com/simonw/datasette/issues/355#issuecomment-495079393,https://api.github.com/repos/simonw/datasette/issues/355,495079393,MDEyOklzc3VlQ29tbWVudDQ5NTA3OTM5Mw==,9599,simonw,2019-05-23T06:02:11Z,2019-05-23T06:02:11Z,OWNER,"I'm re-opening because we need a UI mechanism for deselecting this: ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",346027040,Table view should support filtering via many-to-many relationships, https://github.com/simonw/datasette/issues/355#issuecomment-495079705,https://api.github.com/repos/simonw/datasette/issues/355,495079705,MDEyOklzc3VlQ29tbWVudDQ5NTA3OTcwNQ==,9599,simonw,2019-05-23T06:03:40Z,2019-05-23T06:04:03Z,OWNER,"I think an approach similar to how `?_where=` works would do the job here. Can address this feedback from @psychemedia while I'm at it: https://github.com/simonw/datasette/issues/429#issuecomment-483202658 ![image](https://user-images.githubusercontent.com/82988/56127017-2bf78e80-5f74-11e9-9120-9393eb5d4988.png)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",346027040,Table view should support filtering via many-to-many relationships, https://github.com/simonw/datasette/issues/483#issuecomment-495080390,https://api.github.com/repos/simonw/datasette/issues/483,495080390,MDEyOklzc3VlQ29tbWVudDQ5NTA4MDM5MA==,9599,simonw,2019-05-23T06:06:53Z,2019-05-23T06:06:53Z,OWNER,"Yes there's definitely something exciting to be done with location facets. The easiest one would be a radius-distance-from-a-point facet (5km, 10km etc). A more sophisticated thing might be possible on top of GeoJSON and SpatiaLite - that's probably something I would put in a plugin rather than shipping in Datasette itself.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",447408527,Option to facet by date using month or year, https://github.com/simonw/datasette/issues/483#issuecomment-495080591,https://api.github.com/repos/simonw/datasette/issues/483,495080591,MDEyOklzc3VlQ29tbWVudDQ5NTA4MDU5MQ==,9599,simonw,2019-05-23T06:07:53Z,2019-05-23T06:09:05Z,OWNER,"As far as URL design goes... I'm going to stick with `?_facet_date=` for this and use the not-yet-fully-baked JSON alternative syntax. Probably something like this: ?_facet_date={""column"":""created"",""interval"":""month""} Where interval can be day (the default), month or year. And maybe week? Not sure about that. Still not sure what/if I should do about exposing these options in the UI.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",447408527,Option to facet by date using month or year, https://github.com/simonw/datasette/issues/485#issuecomment-495083670,https://api.github.com/repos/simonw/datasette/issues/485,495083670,MDEyOklzc3VlQ29tbWVudDQ5NTA4MzY3MA==,9599,simonw,2019-05-23T06:21:52Z,2019-05-23T06:22:36Z,OWNER,"If a table has more than two columns we could do a betterl job at guessing the label column. A few potential tricks: * look for a column called name or title * look for the first column of type text * check for the text column with the most diversity in values","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",447469253,Improvements to table label detection , https://github.com/simonw/datasette/issues/485#issuecomment-495085021,https://api.github.com/repos/simonw/datasette/issues/485,495085021,MDEyOklzc3VlQ29tbWVudDQ5NTA4NTAyMQ==,9599,simonw,2019-05-23T06:27:57Z,2019-05-26T23:15:51Z,OWNER,"I could attempt to calculate the statistics needed for this in a time limited SQL query something like this one: https://latest.datasette.io/fixtures?sql=select+%27name%27+as+column%2C+count+%28distinct+name%29+as+count_distinct%2C+avg%28length%28name%29%29+as+avg_length+from+roadside_attractions%0D%0A++union%0D%0Aselect+%27address%27+as+column%2C+count%28distinct+address%29+as+count_distinct%2C+avg%28length%28address%29%29+as+avg_length+from+roadside_attractions ``` select 'name' as column, count (distinct name) as count_distinct, avg(length(name)) as avg_length from roadside_attractions union select 'address' as column, count(distinct address) as count_distinct, avg(length(address)) as avg_length from roadside_attractions ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",447469253,Improvements to table label detection ,