Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stalker314314/wiki-climate

Climate data scraper from Wikipedia/Wikidata
https://github.com/stalker314314/wiki-climate

climate climate-data pymongo python python-3 pywikibot requests sparql wiki wikidata wikipedia wikipedia-api

Last synced: about 2 months ago
JSON representation

Climate data scraper from Wikipedia/Wikidata

Awesome Lists containing this project

README

        

# Wiki climate

Tool with which climate data can be extracted from Wikipedia for all cities.

Accompanying code to analysis [what is best city to live in](https://www.kaggle.com/brankokokanovic/best-city-to-live-in). Latest (October 2018) data can be seen at [Kaggle](https://www.kaggle.com/brankokokanovic/wiki-climate/home).

Works by obtaining cities using SPARQL/Wikidata and then query Wikipedia (using pywikibot) to parse those weatherbox boxes.
Data is stored in Mongo and can be exported to JSON with:

```
mongo.exe --quiet temp --eval "printjson(db.cities.find({}, {'_id':0}).toArray())" > wiki-climate.json
```