Skip to content

importing Swedish protected nature data to Wikidata

License

Notifications You must be signed in to change notification settings

Wikimedia-Sverige/WLE_import

 
 

Repository files navigation

WLE-import

Importing Swedish protected nature data to Wikidata.

Harvest existing Wikidata items

reserve_harvester.py collects nature reserve items currently on Wikidata, based on a Petscan search, and matches them with Nature IDs from the source file. Articles that can't be matched are saved in separate files.

Process and upload nature areas

nature_importer.py processes data from the csv files and uploads them to Wikidata.

python3 nature_importer.py --dataset nr --offset 100 --limit 10 --upload live

dataset -- either "nr" for nature reserves or "np" for national parks.

offset -- don't start from the beginning of the file, but with an offset of a number of rows.

limit -- only process a limited number of entries.

table -- create a preview table of results and save to file.

upload -- to upload the created claims to Wikidata. You can leave it out if you want to debug the NatureArea object processing. By default this will use the Wikidata Sandbox. Add live to work on actual live Wikidata items, assuming you're 100% positive you want to do that.

About

importing Swedish protected nature data to Wikidata

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%