3. Wikidata
The free and open knowledge base
Repo Fringe 2016
Ewan McAndrew - @emcandre
Navino Evans - @NavinoEvans
Link to presentation
tinyurl.com/j4bnr3s
4. Google had its own free and open
knowledge base… Freebase
6. This means that Google’s ‘Knowledge Graph’ is
now powered, not exclusively but ever
increasingly, by Wikidata.
“The primary issue with Google’s knowledge panels is
that they aren’t terribly knowledgeable: They provide
information but often leave out any context on where that
information came from….”
Caitlin Dewey, The Washington Post – 11 May 2016
7. The need for digital provenance
“Since Google frequently does
not cite its sources…. there’s no
way for users to double-check
“answers” for bias or error, which
doubtlessly exist.”
Caitlin Dewey, The Washington Post
– 11 May 2016
8. Wikidata – the new Rosetta Stone
“Data is beautiful. Data is information.”
9. Wikidata
Wikidata is a free linked
database of knowledge that
can be read and edited by both
humans and machines.
Wikidata acts as central storage
for the structured data of its
Wikimedia sister projects
including Wikipedia,
Wikivoyage, Wikisource, and
others.
10. ● repository of the world's knowledge
● database anyone can read and edit
● multi-lingual
● designed to deal with the reality Wikipedia
has to deal with
● free and open source software.
●All data on Wikidata is CC-0 licenced.
What is Wikidata actually?
11. English Wikipedia “only includes only includes 30%
of the items entered in the other 287 languages.”*
“The promise of linked open data seems to have
finally arrived.”
18. All available DataTypes
• Item
• String
• Time
• Globe co-ordinate
• URL
• Quantity
Datatypes are used in statements to represent data
• Commons media
• Monolingual text
• External identifier
• Property
• Mathematical
expression
See wikidata.org/wiki/Special:ListDatatypes
19. Wikidata key stats – data and community
Offical Wikidata stats | Third party stats tool | 2015/2016 progress report
• 19.5 million items
• 100 million statements
• 361 million edits
• 16,500 active editors
Growth of statements and references since launch
Date retrieved 31st July 2016
23. What all this Linked Data means….
• Using Wikidata we can now query
Wikipedia as never before.
e.g. Show me all the architects with UK
Citizenship grouped by place of
education.
• The Wikidata game gamifies the
experience of adding an item to
improve Wikidata a little at a time,
simply & easily.
• Inventaire builds on Wikidata by
allowing people to share their
favourite books, thereby adding to the
open knowledge on books & authors.
• The BFI, MOMA and Ted Talks are all
now migrating their data to Wikidata.
26. List of paintings by Jacob van Ruisdael
(Part of Sum of All Paintings project)
27. “First task is to use Metadata for 3000 images from the Welsh Landscape collection,
which are available on Wikimedia Commons, to create detailed linked data……
then work with the Library and volunteers in the Wikidata community to explore new
ways of exploring and analysing the data and associated images.”
National Library of Wales have a Wikidata Visiting Scholar.
A world first.
29. SPARQL endpoint for querying Wikidata
Who’s birthday is today?
Useful links
Wikidata Query Service Beta – Official query service
SPARQL Query Examples
WDQ – Third party query service which is simple to learn
People born on this day →
List of countries ordered by the number of their cities with female mayor →
Children of Genghis Khan →
30. Practical session – Let’s improve Wikidata!
What are we doing?
Adding some missing data to Wikidata items for
‘Women who were educated at Edinburgh
University’
What data to add?
Our practical session will focus on adding the
place of birth (P19)
31. Practical session – Instructions
Adding birth locations (P19)
List of items with missing birth place →
Finding the data
1. Click on link above and click “run” when you arrive on the pag
2. Click on Wikidata link for any item (rightmost column in results)
3. Click on link to the Wikipedia article (from Wikidata item page)
4. Find the birth location (if present) – use the most precise location you can find (e.g. choose an area
within a city over the city itself)
5. Go back to your Wikidata item page
Adding the statement
6. Scroll to bottom of the page and click “+ add”
7. Type “place of birth” in the “property” box
8. In the box to the right, type in the location and select from the dropdown results
9. Click save to add the statement to the item
32. How to get data from Wikidata
•Data dump
Large scale download/processing of data
•API
Get data on individual or small groups of items
•SPARQL endpoint
Run advanced queries
See main data access page for a complete overview
41. Visualising results from practical
On the Wikidata Query Service…
Women educated at Uni of Edinburgh query
Multiple visualisations available after loading and clicking run
On a Histropedia query timeline app,
using the Wikidata Query Service…
Colour coded by place of birth (P19)
Colour coded by country of Citizenship (P27)
In Japanese, with fallback of Arabic, Russian, then English
45. Developer links
#wikidata on chat.freenode.net
wikidata-l@lists.wikimedia.org
Wikidata – The New Rosetta Stone (article).
Google closes Freebase (article).
Google’s sketchy attempt to control the world’s knowledge (article).
api @ wikidata.org/w/api.php
sandbox @ wikidata.org/wiki/Special:ApiSandbox
The Wikidata Game: https://tools.wmflabs.org/wikidata-game/distributed/
PHP
Wikibase API Library: github.com/addwiki/wikibase-api
SPARQL abstraction: github.com/Benestar/asparagus
Python
Wiki bot Framework: mediawiki.org/wiki/Manual:Pywikibot/Wikidata
C# .NET
Wikibase API Library: github.com/Benestar/wikibase.net
46. WANT MORE WIKIDATA?
Join us later for the Wikidata Advanced Query
Workshop at 2.15pm
•2.15pm to 3pm – WIKIDATA – ADVANCED QUERY
WORKSHOP (Holyrood).
Navino Evans, Wikidata Volunteer and Co-founder of Histropedia.
Ewan McAndrew, Wikimedian at Edinburgh University.
47. Practical session – Instructions
Adding birth dates (P569)
List of items with missing birth date →
Finding the data
1. Click on link above and click “run” when you arrive on the pag
2. Click on Wikidata link for any item (rightmost column in results)
3. Click on link to the Wikipedia article (from Wikidata item page)
4. Find the date of birth (if present)
5. Go back to your Wikidata item page
Adding the statement
6. Scroll to bottom of the page and click “+ add”
7. Type “date of birth” in the “property” box
8. On the box to the right, add the date (many normal formats are accepted)
9. Click save to add the statement to the item