Using whosonfirst-data-latest.db
from https://dist.whosonfirst.org/sqlite/ - technique inspired by Paul Ford: https://twitter.com/ftrain/status/957833410017361921
If you fire up the sqlite3
CLI against an existing database you can and then mount a brand new database using attach database
- then you can create tables in that new database and populate them using a select statement, extracting data from JSON columns using the json_extract()
function.
Having populated the new table, I also create a full-text index against the name
column.
Here's an example query against the resulting database, using a wildcard to implement prefix autocomplete: https://whosonfirst-metadata-only.now.sh/whosonfirst-metadata-only-c11ebe3/whosonfirst?_search=san+fra%2A