Main Page

From KBTestWikibase
Jump to navigation Jump to search

Unofficial Wikibase sandbox for the national library of The Netherlands.


This Wikibase sandbox is for playing, experimenting, learning about the functionalities, possibilities and limitations etc. of Wikibase, and knowledge sharing activities resulting from these learnings. It is maintained by Olaf Janssen, the Wikimedia coordinator of the KB, mainly as a tool for experimentation, learning, skill-building, knowledge sharing and consultancy about Wikibase, both towards KB staff, (inter)national Wiki(base) communities, GLAMs, KB network partners, as well as other 3rd parties. It does not contain any offical data(sets) of the KB, and the data can be changed/deleted at any time. This instance is not supported by the KB, nor is it part of the official KB IT infrastructure. If you are interested in the official Wikibase instance of the KB, please visit xxx.

Quick links

Eigenschappen (properties) (namespace 122)

Basiseigenschappen voor personen

Basiseigenschappen voor werken

Items (namespace 120)

Basisitems algemeen

Basisitems voor personen

Basisitems voor werken


  • Statements can also be expanded upon, annotated, or contextualized with the addition of optional qualifiers, references, and ranks.
  • The core part of a statement without references and ranks is also called claim. A claim without qualifiers is also referred to as snak. (= simplest P-Q pair)


om (het API-matig schrijven van) onze KB-datamodellen te testen en te verbeteren. Het zijn 1e, naieve schetsen, "praatstukken" om bij de datamodellering te helpen.


Voer voor discussie:
Let op: Q20 beschrijft de fysieke centsprent , zie en KB-catalogus/32226085X.
Er is ook een PPN voor de gedigitaliseerde centsprent, zie en KB-catalogus/380352362, maar dat is een ander, digitaal object, een digitaal bestand, een jpg.
De conceptuele vraag die we i.h.k.v. EMMA moeten beantwoorden is hoe de fysieke en gedigitaliseerde objecten zich tot elkaar moeten verhouden, dus hoe we die relatie in onze Wikibase willen gaan vastleggen. Het aanmaken van 2 aparte Qitems , 1 voor de fysieke prent (PPN=32226085X), en 1 voor het jpg-bestand (PPN=380352362) - dus zoals het op dit moment ook in de GGC en KB-catalogus gebeurt, is mi (=Olaf) niet wenselijk, maar daar moeten we (mn. Danielle en ik) met de KB-metadata-experts een keer voor gaan zitten.
De GGC/KB-catalogus is hierin ook niet zuiver. Als je bv naar de beschrijving van het digitale ding ("de jpg") kijkt op, dan staan daar nog allerlei velden in die met het fysieke ding te maken hebben. Bv bij "Jaar van vervaardiging" - het jaar waarin de jpg gemaakt is - zou ik "2009" ipv "[tussen 1869 en 1886]" verwachten, want in de 19e eeuw kon men nog helemaal geen jpgs maken. Bij de beschrijving van het digitale bestand zou ik properties als resolutie, kleurdiepte, bestandsformaat (jpg, png, tiff..), EXIF-info, URL etc. verwachten.


Basale Qitems die mensen van vlees en bloed beschrijven

Openstaande issues (Phabricator):

Openstaand vragen:

  • Welke datamodel zit er achter de personen die we in onze Wikibase gaan beschrijven? Moeten/kunnen we aansluiten bij (hergebruik maken van) reeds bestaande datamodellen over personen en persoonsnamen?



PREFIX wd: <>
PREFIX wds: <>
PREFIX wdv: <>
PREFIX wdt: <>
PREFIX wikibase: <>
PREFIX p: <>
PREFIX ps: <>
PREFIX xsd: <>


Interactie via de API

Endpoint / base URL

Via URLs

Via Python

Nog verder bekijken, waarschijnlijk relevant

Reconciliation service for this Wikibase

Snelheid van bulk data-importeren

  • Fast Bulk Import Into Wikibase - Importing a large amount of Items into Wikibase can be a challenge. This post provides a high level overview of different importing approaches and their performance. project updates documenation

Our unboxing experience and first findings

The text below is a transcript of the presentation KB's Unboxing Experience

In June-July 2022 the KB created and configured this instance on Many of the steps we needed to take in the setup process were as to be expected when working with fresh MediaWiki instances in general, and Wikidata in particular. However, some steps were not immediately logical, manifest, clearly documented or simply beyond our (then) knowledge and experience. We created a presentation in which we share experiences and first impressions of unboxing, setting up, configuring and tweaking our sandbox instance. We also present solutions for most of the issues we encountered.

Below is an overview of the most important issues we encountered. The numbering refers to the corresponding slides in the presentation:

Setting up our test instance (slide 2 - slide 13)
SOLUTION: There is no solution yet.
Setting up basic content (Ps and Qs) via the GUI (slide 14 - slide 29)
SOLUTION: In order to be able to add the Wikidata URL to (for instance) P3 ("is a unique exmple of"), we used the User:Ookgezellig admin account to temporarily upgrade the User:OlafJanssen account to admin privileges as well.
  • IMPORTANT: the Wikidata URL in P3 must be formatted as, and NOT as, and NOT as, or any other mix of these incorrect URL syntaxes. This is important for correctly functioning, abbreviated display of these URLs in the Wikibase query service ("wd:P31", as can be seen in the query result
  • ISSUE: When adding statements to a Q-item such as Theun de Vries, by default the statements are (and remain) displayed in the same order as you originally added them. This is different from Wikidata, where in the corresponding Wikidata item about Theun de Vries the statements are displayed in a custom, fixed order, with "Instance of" and "Image" on top, and a list of external identifiers at the bottom of the page, irrespective of the exacty order these statements were originally added to this Wikidata item.
SOLUTION: This issue was solved by adding the page MediaWiki:Wikibase-SortedProperties to the Wikibase, in which the custom order of statements can be specified. This is the same as in Wikidata, see MediaWiki:Wikibase-SortedProperties and the manual on Wikidata. Please note that the required page cache purging needed for this functionality to kick in can be actively triggered via Special:Purge.
SPARQL and REST APIs (slide 30 - slide 43)
SOLUTION: Instead one must use a <sparql tryit="1">...</sparql> wrapper, as demonstrated in this example.
Or equivalently, using a format argument, eg Special:EntityData?id=Q29&format=json for a JSON respons.
  • For simple interaction with the Wikibase API via Python, the wikibase-api Python library can be used . Read the docs for more details.
Examples on how to use this library are available at +
Three problems we encounterd, yet unsolved (slide 44 - slide 52)
  • ISSUE: Regular user accounts with default privileges are not allowed to add URLs to items
SOLUTION: See discussion above
  • ISSUE: Creation of common.js and common.css pages on instances is not allowed. On Wikidata, users (eg. User:OlafJanssen) can create personal common.js and common.css pages for adding custom functionalities and layout to their Wikidata interfaces. On, this is currently not possible.
SOLUTION: No solution yet, see Phabricator T310787.
SOLUTION: PHP scripts or direct SQL tools such as RaiseWikibase, as further outlined in the article. At the moment these solutions are not considered nor used by the KB.
Where to get help? (slide 53 - slide 58)
  1. issues on Phabricator:
  2. updates:
  3. user documentation:
  4. Telegram for quick help:
  5. Wikibase-cloud mailing list: