Wikidata:WikiProject Linked Data for Production/2020-October-02 Wikidata Working Hour

October 2, 2020 Wikidata Working Hour edit

Friday, October 2, 2020 at 11:30 am PDT / 2:30 pm EDT / 18:30 UTC / 8:30 pm CEST

Logistics edit

Join via Zoom: https://stanford.zoom.us/j/96834575868?pwd=YURqRmpicnNjVG5ZTDc4R0hFdUM3UT09 Password: 680128

Create a Wikimedia account if you don't already have one

Metrics edit

Login to the Event Dashboard with your Wikimedia account to keep track of your edits today

Resources edit

Rob Fernandez on Listeria edit

Presentation: https://commons.wikimedia.org/wiki/File:Listeria_presentation_LD4_Wikidata_Affinity_Group_2020.pdf

Notes: https://docs.google.com/document/d/1GeKcUNdoWKwKz0T-bxR6GG6EM8FLzEHuvv9aOIYLZZ8/edit?usp=sharing

Recording: https://stanford.zoom.us/rec/share/IIvevG-Z2x-qCYr2Lhtc0mLQYUBphhXGCmPnpP9tTH_YOSGv7RN823czxuv2VBB6.r7NO0HUVQDnDE3_4?startTime=1599580267000

Merrilee Proffitt, Chris Cyr, and Rob Fernandez on OCLC Holdings edit

Presentation: https://drive.google.com/file/d/128b43K8jF7Xt9yd36dM9dodbFiF2JePU/view?usp=sharing

Notes: https://docs.google.com/document/d/1sU8ltbkYeo5Vg43qR-U7Pff0K2eMjF82SLZrkf3-EAQ/edit?usp=sharing

Recording: https://drive.google.com/file/d/16JH8J8hvxH3c7BdiCcl_Tsy_AEK9OYcZ/view

Getting Started edit

You can experiment with Listeria on your own user page Special:Mypage or create a subpage of your user page Special:Mypage/Listeria

SPARQL Queries for generating lists edit

You'll need a SPARQL query to use. You can use your own or try and/or adapt this one:

The following query uses these:


Query Resources edit

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

Building SPARQL Queries by Navino Evans

wikibooks:SPARQL - great reference for creating SPARQL queries

Wikidata:Request_a_query - you can try requesting a query if you are having trouble creating one

Listeria edit

Now on your user page or the subpage you've created use the Wikidata List template with your SPARQL query:

{{Wikidata list
|sparql= SELECT ?item WHERE
{
  ?item wdt:P31 wd:Q5.
  ?item wdt:P106 wd:Q27532437.
}
|wdq=
|sort=P570
|columns=label:name,P18,description,P569,P570,P106,item
|thumb=70
|min_section=2
|summary=itemnumber
}}




{{wikidata list end}}

See page 4 of Rob's presentation for an explanation of the template: https://commons.wikimedia.org/wiki/File:Listeria_presentation_LD4_Wikidata_Affinity_Group_2020.pdf

Remember you must use the variable ?item in your query.

Questions from September 14th Wikidata Working Hour edit

Recording: https://stanford.zoom.us/rec/share/NtfcC_uCbpLJohQnQgMfqGwSx6-OkJGBwXekqluhmoqu8ePaR37Yx9wGDNCsn0be.vKryjLyJJsm1mVCK?startTime=1600095923000

Each Listeria template needs to be on a separate page.

However, you can pull in a Listeria template from one page to another.

You can have multiple tables merged into one page: https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Women_in_Red/Missing_articles_by_education/US_-_land-grant_universities

You can use different Listeria templates in different tabs.

There is not a header parameter to pull in a header for the template, but you could use Wiki text or do something like was done on this page:

How are people using Listeria?

Article shared: Libraries think they are notable: Using WorldCat holdings data to fill gaps in Wikipedia: https://hangingtogether.org/?p=8222

Documentation edit

Wikidata:Listeria

Dynamic Lists edit

https://listeria.toolforge.org/dynamic.html#

Get OCLC Holdings with OpenRefine edit

Github: https://github.com/OCLC-Developer-Network/WikidataHoldingsMatching


Steps edit

This OpenRefine code is intended to be used with Wikidata items, based on the example of the Women in Red project below. It should work with any set of Wikidata items, however, as long as it is formatted according to the steps below.

https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Women_in_Red/Missing_articles_by_occupation/University_teachers Highlight the entire set of WikiData items from the webpage

2.) Copy it

3.) Paste it into a new Excel spreadsheet

4.) The code was created with the assumption that the spreadsheet should has the following columns:

  1. , name, image, description, country of citizenship, date of birth, date of death, place of birth, place of death, item, site links.

(If the spreadsheet does not have these columns, the code should work as long as the Wikidata QID item is in Column H)

5.) Ensure that the column with the QID is titled "item". Save the spreadsheet.

6.) Open the OpenRefine program

7.) Select "Create Project", then "This Computer", then "Browse". Select the file on your computer, and click "Next". Then click "Create project".

8.) On the left panel, click on the "Undo/Redo" tab. Click "Apply" on the lower part of the left panel.

9.) Highlight all of the text from the "Library Holdings OpenRefine Code" document, copy it, and paste it in the "Paste an extracted JSON history of operations to perform:" section of OpenRefine. Click "Perform Operations".

10.) Wait for the process to complete. Depending on the size of the list, this could take several hours.