Wikidata:WikiProject Linked Data for Production/Practical Wikidata for Librarians
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.
Set user language preferencesEdit
- Wikimedia language codes (primarily ISO 639-1)
- Main Wikidata multilingual help page
- Babel extension to set user language preferences
Instructions and examples for starter projects, including:
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:
- Wikidata:WikiProject Archival Description
- Wikidata:WikiProject Authority control
- Wikidata:WikiProject Biographical Identifiers
- Wikidata:WikiProject Books
- Wikidata:WikiProject Cultural heritage
- Wikidata:WikiProject Libraries
- Wikidata:WikiProject Movies
- Wikidata:WikiProject Music
- Wikidata:WikiProject Periodicals
- Wikidata:WikiProject Source MetaData
- Wikidata:WikiProject Theatre
- Wikidata:WikiProject Universities
- Wikidata:WikiProject Video games
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 or parts (P527) for hierarchical relationships between organizations
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:
- Violations for Library of Congress authority ID (P244)
- Violations for FAST ID (P2163)
- Violations for VIAF ID (P214)
- Violations for ISNI (P213)
- Violations for SNAC Ark ID (P3430)
- Violations for ULAN ID (P245)
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 identifiersEdit
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:
- applies to other person (Q35773207) - the identifier is associated with a different entity from the Wikidata item
- conflation (Q14946528) - the identifier does not differentiate between two or more Wikidata items
- withdrawn identifier value (Q21441764) - the identifier was valid in the past but is no longer operative at the source
- deprecated identifier value (Q67125514) - the identifier is retained but marked as deprecated at the source
- unrecognized identifier value (Q54976355) - the identifier is not found at the source
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:
- 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.
- 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.
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
- IdentifierInput script lets you paste in a full URL value for an identifier property and automatically strips the URL down to the identifier
- Duplicate Item script duplicates an item
importScript( 'User:Magnus_Manske/duplicate_item.js' );
- Move Claim moves or copies a statement to the same one or a different one
- 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
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).
- Mix-n-Match - match Wikidata items against external authorities
- The Distributed Game - multiple ways to generate Wikidata entries from unstructured data
- 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.
- 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 TemplateEdit
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.
- Define Header 2 for new section: use double
==to surround data.
- Put each Property on a new line, beginning with a
- To make a field mandatory, put
|mandatoryat the end.
- 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|mandatoryInstance of: Human. mandatory. No other option.
;P31:softselect:Q1643932,Q160738,Q16645768|mandatoryInstance 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,Q140686Instance of: dean, professor emeritus, rector, president, chair person. Not mandatory. You can fill in another option.
Sample Cradle TemplateEdit
The following is the sample Cradle template I created for tabletop role-playing games:
- == tabletop role-playing game ==
Monumental GLAM toolEdit
- 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:firstname.lastname@example.org
- Entity Explosion - Discover links and information about the same topic on other websites via live searches of data from Wikidata..
- Generate tables using Wikidata items
- Recorded presentation by Rob Fernandez at LD4 Wikidata Affinity Group Call
Author Disambiguator ToolEdit
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.
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 BasicsEdit
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 to Querying Wikidata with SPARQL video tutorial - easy to follow in depth introduction
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