Wikidata

ASECS 2025, DH Caucus Session

Alice McGrath

2025-04-05

Outline

  1. Overview of Wikidata
  2. Structure of Wikidata statements
  3. Queries and other uses
  4. Editing Wikidata

Slides: atmcgrath.github.io/workshops/wikidata

What is Wikidata?

Wikidata.org

“A collaboratively edited multilingual knowledge graph hosted by the Wikimedia Foundation”

Linked Open Data

The Linked Open Data Cloud

View the interactive LOD cloud here

How does it work?

Concepts

  • Data should be described in a standardized way
  • URIs refer to the definition of a data category
  • Interoperability

Wikidata statements

  • “The sky is blue”

  • “The sky has the color blue”

  • Semantic triple:

    • Subject - the sky - Q527
    • Predicate - has the color - P462
    • Object - blue - Q1088

Examples: Clarissa

  • Statements about Clarissa: Q980534
    • Instance of (P31) written work (Q47461344)
    • genre (P136) epistolary novel (Q465821)
    • author (P50) Samuel Richardson (Q295941)

Eliza Haywood

  • ID Q1559438
  • instance of (P31) human (Q5)
  • image (P18)
  • occupation (P106) novelist (Q6625963)
    • Also poet, playwright, actor, editor, philosopher
  • VIAF cluster ID (P214): 64027723

Other properties

What can you do with Wikidata?

The Wikidata API

screenshot of timeline game

The game Wikitrivia by Tom J. Watson uses the Wikidata API

Uses

  • Building open-source web resources
  • Add data and images easily with digital publishing tools like Juncture
  • Enhance a dataset: add Wikidata entity IDs to discover more information - e.g. Bryn Mawr edit-a-thon
  • Dataset discovery: add identifiers from other data resources to wikidata

Wikidata Queries

Query structure

Get the names of all cats in wikidata

SELECT ?item ?itemLabel # give me the item id and the item label
WHERE # in instances where
{
  ?item wdt:P31 wd:Q146. # instance of cat
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } 
  # the item label should be in english
}

Queries for an author

Editing Wikidata

Getting started

Resources