User:John Cummings/Using online tools to import data into Wikidata

For information on the benefits of importing please see Wikidata:Data_donation
To discuss importing data into Wikidata please see Wikidata:Partnerships and data imports

This page has been created to help people to understand and use the tools available to import data from external sources into Wikidata.


How do you add new data to a spreadsheet you previously used to create new items? How do you get the list of items? Is it generated in Mix n Match somehow?

Workflow edit

  1. Define which of the data you have is suitable for Wikidata
  2. Does the data you want to import constitute a copyrightable dataset?
  3. Creating Items
  4. Creating Properties
  5. Adding properties to items (with references)
  6. Adding values to items under a property (with references)

Will take you through the process of adding Items, Properties and Values to Wikidata

Structure of Wikidata edit

How Wikidata is structured and how to divide the data you want to import into items, properties and values.

Importing data edit

Items edit

Create items


Properties edit

Propose necessary properties -check first that a suitable property does not already exist

Add properties to items

Create properties

Values edit

Currently there is no way to add values using online tools, they must be added using a bot.

Create bot account and wait for it to be flagged


Methods edit

Online tools edit

 
  • Autolist 2
  • Mix n' Match
  • Quick Statements

What is suitable for Wikidata

Properties

Famous examples tend to be very well covered, give you an idea of the kind of properties that are suitable for the subject

E.g HMS Titanic


A guide for using these tools to import https://www.wikidata.org/wiki/User:John_Cummings/Using_online_tools_to_import_data_into_Wikidata


  • Outline workflow for importing data (perhaps slit into different kinds of data e.g Items, Properties, Values
  • Something to say where to go if you need help

Formatting the data to import into Wikidata 1 spreadsheet

Importing data is split of ? processes and uses 2 tools Mix n’ Match which matches and creates the items listed in the data and QuickStatements which adds the information about those items

Example dataset

UNESCO data about ???

How to get data from an external database into Wikidata Process

Note: When matching the data to an existing identifier e.g ISO codes make sure there are no duplicates, so that two separate items are not combined into one Wikidata item. E.g ISO language codes do not recognise dialects in as much detail as the UNESCO Atlas of the World's Languages in danger.

Existing dataset How to format an Excel sheet Importing the spreadheet into Mix n’ Match importer https://tools.wmflabs.org/mix-n-match/import.php Using Mix n’ Match (Finding existing items and creating new ones) Using Quick Statements (adding properties, qualifiers, values and references)

1. Exporting existing datasets

2. Formatting Excel sheet Creating spreadsheets to match data in Wikidata

  • Each column corresponds to a property
  • Each row corresponds to an item
  • The entries in each row are the values

If you are including an ??special characters?? Ensure all characters are displaying correctly.

3. Importing spreadsheet into Mix n’ Match importer Something about asking for help and setting out what you plan to do somewhere

https://tools.wmflabs.org/mix-n-match/import.php

4. Using Mix n’ Match What is Mix n’ Match

https://meta.wikimedia.org/wiki/Mix'n'match/Manual

If you make any mistakes what to do

5. Using Quick Statements http://tools.wmflabs.org/wikidata-todo/quick_statements.php FAQ Copyright What data is suitable?


Other options for importing data to Wikidata


Manual data entry edit

 

Anyone can add data to Wikidata by simply manually adding the data

  • How to use Wikidata tools
  • Where to ask for help


Wikidata API edit

 
  • What is it
  • How to use it
  • Asking for permission?
  • Where to ask for help

Bots edit

 
  • Bots are ......
  • What does your website need to allow a bot to harvest data
  • How the bot process works

Creating a bot requires coding skills. There are various frameworks in programming languages like Python, Perl or PHP available, with Pywikibot being a popular choice. Bots need to go through an approval process and you should check that they were approved. Wikidata has an extensive explanation for coders on how to create a bot with examples: Creating a bot