This node script takes a SQL database of Wikidata locations and extracts the data into a JSON file for further consumption.
- Get a geo dump from
https://dumps.wikimedia.org/
(I usedhttps://dumps.wikimedia.org/enwiki/20230401/enwiki-20230401-geo_tags.sql.gz
) - Make sure you have
sqlite3
andgawk
installed on your system - Bring your sql file into this directory and name it
input.sql
- Run
npm install
- Run
node index.js