Skip to content

water-fountains/import2wikidata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0e3710f · Feb 29, 2020

History

74 Commits
Dec 10, 2019
Nov 14, 2019
Jan 6, 2020
Jun 23, 2018
Nov 24, 2019
Nov 25, 2019
Dec 2, 2019
Nov 30, 2019
Feb 29, 2020
Jul 10, 2018
Oct 30, 2019
Jun 25, 2018
Oct 31, 2019
Aug 30, 2018
Nov 30, 2019
Nov 30, 2019

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