Skip to content

water-fountains/import2wikidata

Repository files navigation

import2wikidata

Script to import Open Data Zurich fountains into wikidata without overwriting existing data. The script generates Quickstatement commands to be run in the online interface https://tools.wmflabs.org/wikidata-todo/quick_statements.php.

The project is open source under the GNU Affero General Public License, with a profit contribution agreement applying under restricted conditions. See COPYING for information.

Process diagram

import to wikidata flowchart

Requirements

How to run

  • Clone this repository to your local machine git clone https://github.com/mmmatthew/import2wikidata.git
  • Start jupyter from a command window in the directory just created jupyter notebook
  • In your browser, open http://localhost:8888/notebooks/zurich_fountains_preprocess.ipynb (the port may be different)
  • Run the script. It should create a file quickstatement_commands*.txt

How to use the generated commands

  • Go to https://tools.wmflabs.org/wikidata-todo/quick_statements.php.
  • Authenticate yourself with your Wikidata account.
  • Copy and paste the contents of quickstatement_commands*.txt into the blank field, and run the commands
    • before 'run', check the Umlauts (opening with notepad was fine, just doubleclick distorted them)
    • if the wmflabs is slow, do not re-do it a second time, otherwise you generate duplicates
    • you might even not see that pressing the "Do it" button had an effect. Watch twice before you hit it again (duplicates!)
    • also, it takes up to hours until items you see newly inserted in the GUI also arrive in sparql queries
      • ==> wait hours between multiple attempts to run quickstatement_commands*.txt (and redo the notebook first to detect duplicates)

Field mappings

Open Data Zurich fountain properties are mapped to the following wikidata properties

  • bezeichnung -> Lde
  • brunnenart_txt -> P31
  • wasserart_txt -> P5623
  • nummer -> P528
  • historisches_baujahr -> P571

Type of water can take several values

  • Verteilnetz -> Q53633635
  • Quellwasser -> Q1881858
  • Eigene Versorgung -> Q53634173
  • Grundwasser -> Q161598

Contributions welcome

Check the project issues to find out where the current dev focus is.

See also https://github.com/water-fountains/import2wikidata/wiki

See also

https://github.com/opendatabs/csvtowikidata

About

scripts to import open government data to wikidata

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •