{"html_url": "https://github.com/simonw/datasette/issues/203#issuecomment-381446554", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/203", "id": 381446554, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MTQ0NjU1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-15T23:25:54Z", "updated_at": "2018-04-15T23:26:03Z", "author_association": "OWNER", "body": "I built a prototype of the `convert_units()` custom SQL function as a plugin over in https://github.com/simonw/datasette/issues/14#issuecomment-381446511", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313837303, "label": "Support for units"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/203#issuecomment-381348849", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/203", "id": 381348849, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MTM0ODg0OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-14T18:12:52Z", "updated_at": "2018-04-14T18:12:52Z", "author_association": "OWNER", "body": "I think I'm going to hold on to the custom sql function idea for the moment and implement it as an example plugin.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313837303, "label": "Support for units"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/203#issuecomment-381330075", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/203", "id": 381330075, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MTMzMDA3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-14T13:41:53Z", "updated_at": "2018-04-14T13:41:53Z", "author_association": "OWNER", "body": "Presumably units only work for numeric fields? If that's the case then automatically processing them if the incoming query string argument has a unit suffix makes total sense to me.\r\n\r\nHere's a pretty crazy idea: what if we exposed unit conversion to SQL as a custom SQLite function? That way it would be possible to optionally use units in actual custom SQL queries. \r\n\r\nI'd have to think quite carefully about performance implications here - wouldn't want a poorly considered unit calculation over a 500,000 row table to lock up the server. But I think the 1s query time limit might still prevent that.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313837303, "label": "Support for units"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/203#issuecomment-381300386", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/203", "id": 381300386, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MTMwMDM4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-14T03:35:56Z", "updated_at": "2018-04-14T03:35:56Z", "author_association": "OWNER", "body": "In #204 you said \"I'd like to add support for using units when querying but this is PR is pretty usable as-is.\" - I'm fascinated to hear more about how this could work.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313837303, "label": "Support for units"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/203#issuecomment-381300336", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/203", "id": 381300336, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MTMwMDMzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-14T03:35:02Z", "updated_at": "2018-04-14T03:35:02Z", "author_association": "OWNER", "body": "This is really cool - I'm very impressed by pint.\r\n\r\nI'd like to figure out a sensible opt-in way to expose this in the JSON output as well. Maybe with a `&_units=true` parameter?\r\n\r\nWe should definitely expose the units section from the table metadata in the output of https://wtr-api.herokuapp.com/wtr-663ea99/license_frequency.json", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313837303, "label": "Support for units"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/203#issuecomment-380951920", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/203", "id": 380951920, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MDk1MTkyMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-12T21:36:38Z", "updated_at": "2018-04-12T21:36:38Z", "author_association": "OWNER", "body": "This also feeds into the visualization features I want to add - we could use this kind of metadata to automatically apply meaningful labels to graphs.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313837303, "label": "Support for units"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/203#issuecomment-380951815", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/203", "id": 380951815, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MDk1MTgxNQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-12T21:36:10Z", "updated_at": "2018-04-12T21:36:10Z", "author_association": "OWNER", "body": "I like this. I'd like to be able to attach a full description to a column as well. We could support these in `metadata.json`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 313837303, "label": "Support for units"}, "performed_via_github_app": null}