Wikidata:WikiProject Linked Data for Production/Practical Wikidata for Librarians

Background edit

Practical Wikidata for Librarians arose from a group of librarians and archivists at the Blacklight-LD working meeting at Stanford in September 2019 (notes available here). The goal of the group is to gather together, organize, and expand resources for librarians interested in editing Wikidata, and to provide a space to develop shared data models and best practices. The hope is that sharing these resources will prevent duplicative work at different institutions, and provide stepping stones for librarians interested in working with Wikidata but seeking some direction on where to get started.

Join the LD4 Slack channel #practical-wikidata.

Getting started edit

Create a Wikimedia account

Set user language preferences edit

Policies edit

General list of policies and guidelines

Communication Spaces edit

Where to go to ask questions, get news, chat with fellow Wikidatans

Adding references edit

Project recipes edit

Instructions and examples for starter projects, including:

Data modeling edit

Wikidata does not have formal data models (yet), but several WikiProjects have created guidelines for describing entities in particular domains.

Some WikiProjects related to GLAM resources:

The Stanford Wikidata Working Group has been developing data models for internal projects that may also be helpful as a reference.

Modeling GLAM institutions on Wikidata lists common properties for GLAM institutions; recommends using the property pair part of (P361) and has part(s) (P527) for hierarchical relationships between organizations

Remediation edit

Constraint reports edit

Many properties in Wikidata have defined constraints, or rules that the data using those properties should follow. For example, an item that has the property Library of Congress authority ID (P244) with the value "135832" violates the constraint that values of Library of Congress authority ID (P244) must begin with 1-2 letters followed by 8-10 digits. On an item page, values that violate a property's constraints are marked by a ? in a circle next to the value. Wikidata also automatically generates reports of items that don't follow the defined rules, which link directly to the items in need of remediation.

A few places to get started:

Replacing the P value at the end of the URL with the P value of another property will bring up the constraint report for that property. Note that the constraint reports do not reflect changes to Wikidata instantaneously. A SPARQL query will reflect the current state of the data.

Deletion vs. deprecation of incorrect identifiers edit

Wikidata allows users to correct inaccurate data either by deleting the information altogether, or by deprecating the statement. When remediating identifiers, deprecation has the advantage of making a positive statement that a particular identifier is not associated with the item, deterring others from re-adding the incorrect identifier. When deprecating a statement, it is helpful to add a qualifier stating the reason for deprecated rank (P2241).

Some common reasons for deprecating identifiers:

Tools edit

Gadgets edit

Gadgets are plug-ins to enhance Wikidata display and editing. To add gadgets, go to the Preferences page while logged in and click the "Gadgets" tab.

Some useful gadgets to enable:

 
This is what it looks like to add today's date in Wikidata using the currentDate Gadget. It works with the retrieved (P813) property, which is usually a qualifier for Web link references.
 
This is what it looks like to add references with the DuplicateReferences Gadget enabled. When it is enabled, you will see a copy link next to a reference that has been added, and an insert reference link will appear as an option in the add reference space
 
This GIF shows derived statements that can be seen when the relatedItems Gadget is enabled.
  • Merge: Easily merge duplicate items.
  • labelLister: edit labels, descriptions and aliases for multiple languages at once without changing your main language
  • RequestDeletion: adds a link at the top of each item to request a deletion on Wikidata:Requests for deletions.
  • Descriptions: Hover over items and properties to see the label.
  • KeyShortcuts: Provides a few keyboard shortcuts: press L and D to start editing an entity's label and description respectively, S, I and J to scroll to the statements, sitelinks and identifiers sections respectively, A to start adding a new statement.
  • Transliteration: Appends approximate transliteration of page titles to each site link
  • Reasonator: Adds a link to Reasonator on every item.
  • Site ID to interwiki: Streamline display of interwiki links.
  • Protection indicators: See when an entity is protected from editing.
  • EasyQuery: Add a shortcut (displayed as three dots next to a statement value) that runs a query for any other items to which that statement applies.
  • Drag'n'drop: Add statements and references from Wikidata or Wikipedia by dragging and dropping them.
    • Demos
    • Tip: If you don't see the reference or statement you've just added, try refreshing the page.
  • currentDate: Automatically adds the date of today while using the property retrieved (P813). See GIF →
  • DuplicateReferences: Adds a link to copy references and add them to other statements on the same item. See GIF →
  • relatedItems: Adds a button to the bottom of item pages to display inverse statements. See GIF →
  • Recoin: Displays an icon at the top of the page representing the relative completeness of the item's information, and adds a dropdown list of the most relevant properties not present in the item description.
  • QuickEditCounter: Add a counter with the total number of edits you have made to your Contributions page.
  • Redirect image links to Commons for files that are hosted there.
  • Move Claim moves a statement to a different item or or copies a statement to the same item

User Scripts edit

User scripts are short computer scripts written by Wikidata users that give additional functionality to the Wikidata user interface. Users can list the scripts they would like to add on a special page. Access your own special page via Special:Mypage/common.js, which will redirect you to your own common.js page to add scripts. Step by step slides with screenshots. Some scripts you may find helpful:

  • Mix'n'Match script looks for possible matches in the Mix’n’Match catalogs for the item you are working with
importScript( 'User:Magnus_Manske/mixnmatch_gadget.js' );
  • VIAF script allows you to explore the members of a VIAF cluster (codes and labels) just passing over the value of P214
importScript( 'User:Bargioni/viaf.js' );
  • moreIdentifiers script allows you to add IDs from VIAF clusters in a semi-automatic way and to report errors possibly present in the VIAF clusters themselver (i.e. a cluster regarding a subject X contains an ID regarding a subject Y); the settings of the gadget are partially customizable (see User:Bargioni/moreIdentifiers for more information)
importScript( 'User:Bargioni/moreIdentifiers defaultconf.js' );
importScript( 'User:Bargioni/moreIdentifiers.js' );
  • CreateNewItem adds a "create new item" link in the dropdown menu when you want to add an item to a property, but the item does not exist
importScript( 'User:Efly/Gadget-CreateNewItem.js' );
  • UseAsRef script allows you to add references to statements using one external ID as source (see User:Bargioni/UseAsRef for more information)
importScript( 'User:Bargioni/UseAsRef.js' );
  • WikiBridge adds a tabbed section to Wikidata items showing some paragraphs from Wikipedias chosen by the Babel languages of the logged-in user (see User:Bargioni/WikiBridge.js for the code)
importScript( 'User:Bargioni/WikiBridge_conf.js' );
importScript( 'User:Bargioni/WikiBridge.js' );</nowiki>
  • Open Street Map script searches Open Street map for an object with the same Qnumber
importScript('User:Mxn/overpass.js');
  • IdentifierInput script lets you paste in a full URL value for an identifier property and automatically strips the URL down to the identifier
importScript('User:1Veertje/identifierInput.js');
  • Duplicate Item script duplicates an item
importScript( 'User:Magnus_Manske/duplicate_item.js' );
  • Rearrange the order of values in a statement to an order you prefer
importScript( 'User:Tohaomg/rearrange_values.js' );
  • Mirador script to enable ProjectMirador IIIF viewer for items using IIIF Manifest (P6108)
importScript( 'User:Btwashburn/iiif-mirador.js' );
  • Sort and display taxon common names in alphabetical order, arranged by language in alphabetical order
importScript( 'User:Nikki/SortTaxonCommonNames.js');
  • Adds a small notability indicator to the top right of an item showing how well the item satisfies the three notability criteria. Left to right, the three columns indicate sitelinks, identifiers and references, and structural need. The middle column shows identifiers at the top and references at the bottom.
importScript( 'User:Bovlb/notability.js' );
  • Adds a button to the top right of a Wikidata item which allows you to copy the QID with one click.
importScript( 'User:Abbe98/copy-qid.js' );

Games edit

Wikidata users have created multiple games for editing Wikidata, some of which are focused on remediation and reconciliation. You may need a WiDAR account to access these games (you can create an account via the game log in).

Demonstrating value edit

  • Scholia - multiple visualizations of information related to researchers, such as publications, awards, and relationships. Data can be viewed by individual author, institution, or other categories.

Facilitating editing edit

  • Cradle - templates to create new Wikidata items based on item type. Use templates already created or create one by editing the Wikidata:Cradle page. Follow the steps outlined below.

How to Create a Cradle Template edit

When setting up a template for Cradle, prepare by gathering the properties. Order from the most common properties (like P31) to properties which may not be used for every record but are still relevant enough to include. While Cradle doesn't do references, it does understand certain kinds of expectations for fields, e.g. a Time or a URL or an Identifier.

  1. Define Header 2 for new section: use double == to surround data.
  2. Put each Property on a new line, beginning with a ;. Example ;P31.
  3. To make a field mandatory, put |mandatory at the end.
  4. To limit or suggest possible values for a property, use either :hardselect: to create a required set of values or :softselect: to create a suggested set of values (while still allowing the person creating the item to search). Separate possible values with commas (no space). e.g.:
;P31:hardselect:Q5|mandatory or ;P31:softselect:Q1643932,Q160738,Q16645768|mandatory or ;P39:softselect:Q723682,Q1240569,Q212071,Q1255921,Q140686.
;P31:hardselect:Q5|mandatory Instance of: Human. mandatory. No other option.
;P31:softselect:Q1643932,Q160738,Q16645768|mandatory Instance of: tabletop role-playing game, or role-playing game, or storygame. Mandatory. But you can fill in another option.
;P39:softselect:Q723682,Q1240569,Q212071,Q1255921,Q140686 Instance of: dean, professor emeritus, rector, president, chair person. Not mandatory. You can fill in another option.
Sample Cradle Template edit

The following is the sample Cradle template I created for tabletop role-playing games:

== tabletop role-playing game ==
;P31:softselect:Q1643932,Q160738,Q16645768|mandatory
;P50
;P577
;P123
;P4151
;P856
;P7226

Monumental GLAM tool edit

  • The Monumental GLAM tool displays data about cultural heritage institutions through Wikidata, Wikipedia, and Wikimedia Commons. It allows you to browse and edit Wikidata items near your location or search for an institution by name or location. This is an easy way to find institutions. If you are adding an email address through the tool, be sure to add the prefix mailto: to avoid an error, ie. mailto:info@example.org

Browser Extensions edit

  • Entity Explosion - Discover links and information about the same topic on other websites via live searches of data from Wikidata..

Listeria edit

Author Disambiguator Tool edit

Queries edit

Querying Wikidata can seem daunting if you are not familiar with SPARQL. It can be helpful to use a query that someone else has written as a starting point and substitute properties and items that you are interested in.

Library-related sample queries

Training Resources edit

Curricula edit

Wiki Education's Wikidata Curriculum - modules that give a comprehensive overview of Wikidata

Wikidata for Librarians Curriculum - outline only of a possible Wikidata curriculum for librarians

Learn Wikidata - course for information professionals in English, French, Chinese, and Spanish

Introduction to the Basics edit

Wikidata Tours - step by step tutorials on Wikidata items, statements, references

Wikidata Activities - step by step tutorials on adding common properties to Wikidata items, including coordinates, images, inception dates, official websites, and administrative territory

A Gentle Introduction to Wikidata for Absolute Beginners - 3 hour introduction with first half hour explaining basic concepts, second half hour looking at the anatomy of items on Wikidata, followed by a live demo of editing Wikidata

Introduction for librarians webinar - 2018 OCLC webinar led by Andrew Lih and Rob Fernandez

Introduction to Wikidata in Portuguese

Creating item and editing Wikidata in Spanish

Introduction to Wikidata and wikiprojects of interest to librarians in Spanish

Querying edit

Introduction to Querying Wikidata with SPARQL video tutorial - easy to follow in depth introduction

Discussions edit

IFLA's WikiCite and Libraries Discussion Series on open citations, knowledge equity, language revitalisation, open access to scholarly publications, linking and visualising bibliographic data as they relate to Wikidata and Wikibase

Lists of resources edit

Wikidata Educational Resources

Wikidata Training Resources

GLAM WikiProjects edit