1 of 73

Managing Wikimedia Projects through Wikidata

2 of 73

What are we learning here?

  • How to effectively organise activities and projects using Wikidata
  • … and some other tools

to be able to:

  • efficiently organise edit-a-thons
  • welcome (new) volunteers
  • with a minimum of manual work
  • and a maximum of results
  • … that you can measure
  • … and reuse (machine readable)

3 of 73

Prerequisites

The easy part (what we already know ?):

  • Know Wikipedia
  • Know a bit of Wikidata
  • Have a Wikimedia user account
  • Know a bit how edit-a-thons are organised
  • Know a bit of the Campaign dashboard

4 of 73

Willingness to learn some technical stuff

  • OpenRefine: tool to perform data validation, manipulate data, and load data into Wikidata
  • QuickStatements to load data into Wikidata (optional)
  • Wikidata Query obtain reports from Wikidata
  • ListeriaBot: automatically generate Wikipedia tables
  • Pywikibot update Wikidata and other Wikimedia platforms (optional)
  • other Toolforge applications (optional; from the WMF Cloud infrastructure)

5 of 73

Agenda for today

  • Presentation
  • Demo showing:
    • Wikidata
    • OpenRefine
    • Wikidata Query
    • ListeriaBot
    • Wikipedia
    • Campaign dashboard
      • Users subscribing (to a session)
      • Create user accounts (possibly on demand => resolve IP blocks; spam)
      • Logging and monitoring user activity (automatically)
      • Giving feedback and coaching
  • Questions and answers
  • Exercises
  • Support

6 of 73

Learning Clinic plan

  1. Link items to their WikiProject in Wikidata
    1. Generated through OpenRefine
  2. Write a Wikipedia project page
    • Programs and events dashboard (session subscribe button)
      1. Let users subscribe to the session
    • Describe your project on a project page (venue, goals, methods, type of participants)
    • Link a subpage containing the topics table:
      • on a separate page; not to duplicate static content in the page history
      • Item list is automatically generated by ListeriaBot
      • Red and blue links to Wikipedia pages in “your” language
  3. Organise the edit-a-thon
    • Amend Wikipedia, Wikidata, Wikimedia Commons
  4. Monitor the participants through the events dashboard
    • Provide feedback, and coaching to the participants
  5. Publish the user draft pages on Wikipedia
  6. Scripts to amend user welcome pages, automatic registering of sitelinks, etc.
  7. Generate statistics; reporting the results

7 of 73

Methodology developed by Wikimedia Belgium

… during the COVID-19 period (2020)

… requiring to fallback to virtual writing sessions

This way of working still pays off to prepare and organise effective onsite sessions…

8 of 73

Interactions between major platforms

9 of 73

10 of 73

WikiProject flow and timeline

Partner(s)�Project leader(s)�Subject�Budget

Meeting place�Infrastructure�Catering�Security, Friendly spaces

Idea�Concept�Initiative�Requirements

Inventory building�(list of items/pages)�Categories�Excel, OpenRefine, Wikidata

Invitations�Participant registration�Account creation�Number of participants

Activity (physical, virtual)�Presentation, demo�Follow-up�Reporting

11 of 73

Prototype flowchart

Designed by Geertivp.

Presented at the EU GLAM meeting in Prague, 15 September 2022.

12 of 73

Wiki Project management overview

Yearly plan

Project plans

Partners

Strategy

Budget

Volunteers

Experts

Employees

Project setup

Contact a partner

GLAM - Education

Choose a topic

Choose a venue

Multiple sessions?

Gather items

Gather attributes

In Excel or Google Spreadsheet

Project execution

Have the writing session

Make documentation available

References

Write down your experiences

Document the results

(Yearly) metrics

Number of users

Number of articles

Number of photos

Number of sessions

User retention

Repeated sessions

Photo reuse

Project evaluation

What did work?

What could be better?

Spread the news

Newsletters

Page view statistics

13 of 73

Wiki Project setup

Data gathering

Contact a partner

GLAM?

Education?

Choose topic

Choose a venue

Multiple sessions?

Gather items

Gather attributes

In Excel or Google Spreadsheet

OpenRefine

Reconcile

Map to Properties

Amend items

Create items

Link with “Maintained by Wiki Project”

This is the cornerstone of the methodology…

Wikidata

Create the Wiki project

Amend the items manually

Link to the Wikipedia project page

ListeriaBot

Create a subpage

(to not copy static content)

Can have multiple sublists (subproject or query filters)

Wikidata Query

Obtain the list of items

Separate lists?

Or with a filter (by type of instance)

You might use subtables

14 of 73

Wiki Project execution

Program and Events

(Outreach DB)

Create a campaign

Create a program

Create an event

Include some documentation

e.g. link to the project page

Wikipedia project page

Describe the session

Document the venue

Blue subscribe button

List of topics (ListeriaBot subpage)

Session

User register in Outreach dashboard

Users create a user account

Users request a user account

(avoid the proxy server blacklist)

Have the writing session

Statistics

Gather project statistics

Publish the results

Public relations

(local) Newspapers

Project report

Magazines

Newsletters

Meta

Follow-up

Create user welcome pages (script)

(minimum 1 article)

Give feedback to the participants

Publish the draft pages

Monitor deletion by moderators

Evaluate the project

15 of 73

So we need a project page?

  • on Wikipedia, Wikimedia Commons, and/or Wikidata, …
  • in the Project namespace
  • with (hierarchical) Subpages
    • e.g. GLAM > Country > Campaign > Program > Session
  • Unique project page (sub-page per session date => archive; include pages)
    • Partner organisation
    • Venue (place, date)
    • Target public
    • Description of activity and subject
    • List of subject items
    • Subscribe button to Programs and Events Dashboard

Example: Wiki Women Design

16 of 73

What is a WikiProject?

Any collaborative project run by volunteers (Wikipedians, Wikimedians) using the Wikimedia platforms.

Goal: gathering, building, structuring, making available free accessible knowledge.

Typically set up by a country (Chapter) or a (thematic) user group.

Often in collaboration with a library, archive, museum, cultural or heritage group (GLAM).

Requires a venue (class room, Wi-Fi, internet access, projector, possibly food and drinks).

Requires a (small/larger) budget. Can be a repeated session.

Inviting Wikipedians to write on Wikipedia and/or take photographs + coaching.

Supported by using Wikipedia, Wikidata, Wikimedia Commons, and Wikimedia related tools.

17 of 73

Activity types

  • simple edit-a-thon (edit marathon, Wikithon)
  • thematic activities, integrated project (museum collection, heritage)
  • (bigger) conference (hackathon, tools)
  • article translation (make your own culture available)
  • training (education project)
  • photo-taking campaign (Wiki Loves…)
  • long-term campaign
    • multiple consecutive related events and activities during the year
      • with one, or multiple organisations

18 of 73

Usage of main tools in time order (summary)

Excel

OpenRefine

Data gathering:

  • catalog?
  • manually?

Data modelling

How to structure?

Data validation

Prepare the upload

Data scheme

Wikidata

Data Upload

Automated via OpenRefine?

Amend the items manually if needed

Any other useful data?

Linked Open Data

Registering existing images (P18)

Wikidata Query

ListeriaBot

Write your query

Execute your query

Get list of items

Map the properties

Validate, verify

Decide on the model:

  • one list?
  • sublists?

Create a project table

Wikipedia

Wikimedia

Have the session

User training

Monitor user activity

Coach the users

Amend articles

Rename mature articles to the main namespace

Sitelinks to Wikidata

Events Dashboard

Create a campaign

Create a program

Create sessions

  • single?
  • multiple?

Let users subscribe

Account creation

User assignments

19 of 73

Used platforms

(in time sequence)

Excel or Google Spreadsheets: compile a list of subjects (data gathering)�Wikidata: create WikiProject; data store and GUI to update items�OpenRefine: reconcile and register the subjects into Wikidata�QuickStatements: to load data into Wikidata (optional)�Pywikibot: automatically update Wikidata (optional)�Wikidata Query: get simple lists of items�ListeriaBot: generate a table of subjects with attributes (red and blue links)�Wikipedia: to create the project page�Programs and Events dashboard: user participation and monitoring�(amend) WikipediaWikimedia Commons + Photo campaigns�Programs and Events dashboard (reporting)�Cloud services (optional)�Excel or Google Spreadsheet

20 of 73

21 of 73

The concept is extremely simple

Spawning multiple possibilities…

P6104: Maintained by WikiProject

Very simple concept…

But the implementation might be more difficult…

You need to define your own ad hoc data model first.

Nothing physical in the database; it is only in your mind...

22 of 73

Wikidata statement (example)

Object or value

Q112662904

WikiProject

Belgian politics

Subject

Q476596

Alexander De Croo

Property

P6104

Maintained by

WikiProject

23 of 73

From Online document to Linked open data

5-star diagram from Tim Berners-Lee

24 of 73

Triplestore?

Wikidata as a triplestore:

One huge single table with 3 columns

No proactive data model => ad hoc community-built data model

Specific and unique for every single project

Linked open data technology (URI-based)

Objects linked via internet protocols (permanent identifiers)

25 of 73

Wikidata simply explained

Triplestore: Hierarchical system (universal database)

Q: Subject: Q-number

P: Predicate, relation: Statement = P-number (property)

Object: Contributing object = Q-number or value

Each object is in turn a subject…

hierarchical = tree structure, recursive

26 of 73

Hierarchy of predicates

Each object is in turn a subject…

hierarchical = tree structure, recursive

Q-number, QID, item number: Unique ID for a Wikidata object

P-number, Property: Wikidata property, relation (extensible)

Statement: Expressing the attribute of a subject using Q/P/V triples

27 of 73

Technology: Wikibase

Wikibase is the software without data…

Developed by Wikimedia Deutschland (2012-)

Forms of Wikibase:

  • (Wikimedia) Wikidata (2012)
  • SDC (Structured Data on Commons; 2018)
    • => Digital metadata for media files
  • Private instance (2019; create your own Properties and relationships)

28 of 73

Wikidata datastore

Wikidata is a (non-relational) database

Eventual complete (always work in progress => the world is never finished)

https://www.wikidata.org/wiki/Special:WhatLinksHere/Q106604493

Triplestore

Central place to administer items:

  • Upload an Excel or Google Spreadsheets
    • via OpenRefine and/or QuickStatements
  • Manual edits, using the GUI
  • Pywikibot edits (automated edits)

29 of 73

Main property for our purpose

P6104: Maintained by WikiProject

https://www.wikidata.org/wiki/Property:P6104

A Wikidata property allows linking Wikidata items to a WikiProject.

As a consequence, several applications can be served:

  • Wikidata Query
  • ListeriaBot generated tables: unique for each Wikipedia language
    • Same SPARQL Query
    • Sitelinks!
  • Guiding the participants
  • Project reporting
  • Maintenance of items, Wikipedia pages, SDC (Structured Data on Commons)

30 of 73

How to use it?

Central property: P6104 - Maintained by WikiProject

One item could be handled by multiple Wiki projects and activities.

One item corresponds to one lemma (Wikipedia page)

Possibly on multiple Wikipedia languages (Wikidata sitelinks!)

Images on Wikidata Commons can possibly link to Wikidata item numbers

(SDC = Structured data on Commons, P180 = depicts)

31 of 73

Related properties

Articles are (linked to) items

  • Typically using P6104 to the project (maintained by WikiProject)
  • or equivalent properties:
    • P195: collection
    • P361: part of
    • P373: Commons category
    • P485: archive
    • P972: artwork catalog
    • P2354: subject list
    • P5008: focus list for Wikimedia project
    • P6379: works in collection
  • or any other property capable of generating a list of item numbers

32 of 73

Create a WikiProject in Wikidata

To be created manually, once:

  • Label(s)
  • Description
  • Statements:
    • Country
    • Organiser (Affiliate, partners)
    • Participants (institutions)
    • Start date, end date
    • (internet, external) Websites
  • Language sitelinks to Wikipedia project pages
    • Possibly in multiple languages (Belgium has 3 official + English…)

33 of 73

Example Wiki Project

34 of 73

List of Wiki projects by Chapter

SELECT ?wikiproject ?wikiprojectLabel WHERE {

?wikiproject wdt:P31 wd:Q16695773;

wdt:P664 wd:Q18398868.

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,nl,fr,en,de". }

}

https://w.wiki/62Gu

35 of 73

Gather the list of items for a project (activity, session)

  • Excel file
  • CSV or XML file
  • Google Spreadsheet

You can often request an extract from the museum catalog system

(often Adlib or successor Axiell Collections)

including additional attributes.

  • Please request a CC0 public domain license from the Museum
    • filter proprietary attributes
  • Add a reference P248 or P195 to the museum collection

36 of 73

Creative Commons licences

  • Commercial use explicitly permitted
  • No prior approval required
  • (relatively) simple
  • Non-repudiation

Acronym

Description

Non-commercial use

CC0 / PD

Public domain

Allowed

CC BY

Attribution, credits

CC BY-NC

CC BY-SA

Share alike

CC BY-NC-SA

CC BY-ND

Non derivative

CC BY-NC-ND

©

All Rights Reserved

Exceptions for education

37 of 73

OpenRefine

  • Typically: Gather items via Excel or Google Spreadsheet
    • Export from other system (mind the copyright)
  • Import the spreadsheet
    • Data cleanup (powerful)
  • Data remains on local machine
    • Worksheets can’t be shared
    • Export/import possible
  • Reconcile (search or create Q-numbers)
  • Upload to Wikidata - apply a filter to do so:
    • First amend existing items
      • Pay attention not to create duplicates
    • Then create new items
  • Add additional statements (based on columns)
    • Map the Column names onto Properties
  • In all cases, add a statement P6104 - Maintained by WikiProject
    • Linking your items to your project => you will need this to amend Wikipedia pages
  • Need to install OpenRefine on your laptop
    • Windows, Linux, ChromeOS
    • you might also use PAWS

More information: OpenRefine

38 of 73

Map attributes to Wikidata Properties

For any column you want to register the attribute, you need a unique property.

Maybe there doesn’t exist a convenient property yet?

Then you need to request the creation of a new one.

Example: https://www.wikidata.org/wiki/Property:P10672 (raw material processed)

https://www.wikidata.org/wiki/Wikidata:Property_proposal/uses_natural_resource (approval)

You need to obtain community consensus and approval.

Can be a long and painful process…

not everyone will understand why you need the property…

39 of 73

Upload to Wikidata (example)

40 of 73

Reconcile

Functionality:

  • Convert a value into a unique item number
  • Obtain information from Wikidata
  • Access other Wikibase or LoD systems (Wikimedia Commons)

Possibility to amend items or create new items

Pay attention not to create duplicates…

Search variant names (synonyms)

First create the subjects = depending objects

41 of 73

OpenRefine reconciliation (example)

42 of 73

OpenRefine Wikidata export (example)

43 of 73

Wikidata Query Project items

wikibase:sitelinks ?linkcount.

wikibase:sitelinks ?linkcount.

SELECT ?item ?linkcount WHERE {

?item wdt:P6104 wd:Q114422535;

wikibase:sitelinks ?linkcount.

MINUS { ?item wdt:P31 wd:Q5. }

}

https://w.wiki/62HA

44 of 73

ListeriaBot

Automatic tool to automatically generate Wikipedia tables,

based on a (very simple) Wikidata Query to obtain a list of item numbers (rows),

adding a (virtual unlimited) list of properties for each item (columns).

Only used in e.g. the Project namespace (never on the main namespace).

Possibility to discriminate between e.g. persons, buildings, or other objects (different properties)

Possibility to segment the items, e.g. by city within a region (same properties)

45 of 73

ListeriaBot usage

Build a Wikipedia target list on Wikipedia in the Project namespace

  • Based on Wikidata Query (SPARQL)
  • Per Wikipedia language
    • See what pages (do not) exist (red and blue links)
  • You choose the properties to show (depending on the instance)
    • Buildings
    • Persons
    • ...
  • Automatically updated
  • Bridge to Wikipedia
    • articles to be created (red links)
    • articles to be amended (blue links)
    • possibly by instance type (sublists => manually, or automatically = group by section)

46 of 73

Example Wikidata Query about people

SELECT ?item ?linkcount WHERE {

?item wdt:P6104 wd:Q114422535;

wikibase:sitelinks ?linkcount;

wdt:P31 wd:Q5.

}

|columns=P18,item,label:name,P735,P734,alias/en:alias,description:description,P937:workplace,P19,P20,P569:birth,P570:death,P27:nationality,P101,P106,P108,P800,P39,P166,P103,?linkcount:pages,P21:gender,P990:voice

47 of 73

Example Wikidata Query excluding people

SELECT ?item ?linkcount WHERE {

?item wdt:P6104 wd:Q114422535;

wikibase:sitelinks ?linkcount.

MINUS { ?item wdt:P31 wd:Q5. }

}

|columns=P18,item,label:name,alias/en:alias,P138,description:description,P101,P10672:processes,P1056,P131:city,P276,P6375,P625:geolocation,P159:mainoffice,P112:founder,P571:created,P576:closed,P1365,P1366,P7888,?linkcount:links

48 of 73

Example sublist by section

49 of 73

Create a list based on a Wikimedia Commons Category

  • Use AWB (AutoWikiBrowser) to obtain a list of item names within this category
  • Reconcile this list with OpenRefine
  • Create missing items
  • Add the P6104 statement to your project
  • Create a ListeriaBot project page

50 of 73

Create a Wikipedia Project page

Describe your project on a project page:

  • Add a Participate blue button (to Outreach Campaign & Events session)
    • Add a summary of event description and an inverse links to the project page
  • Describe Venue, date, subject
    • Tip: create an infobox
  • Explain the goals and methods of your project
  • Add a link to the subject list
    • on a separate subpage; because of the possible long history list

https://nl.wikipedia.org/wiki/Wikipedia:GLAM/Industriemuseum_Gent/Wiki_Café/Fotocollectie_Serck_nv

51 of 73

Use the Campaign dashboard

  • You can create campaigns/programs/sessions
    • Owned by an organisation
    • Managed by event coordinator(s)
  • You can select the participating Wikimedia platforms/languages
  • You can mention coaches and partners
  • Register participants
  • Create user accounts (on demand => bypass the IP blocks)
  • Register wanted (“assigned”) pages to each participant
  • List created/edited Wikipedia pages
  • Follow-up and coaching the participants

https://outreachdashboard.wmflabs.org/courses/Wikimedia_Belgium/Wiki_Café_Industriemuseum_(2022-11-03)/home

52 of 73

How dashboard activities are planned (hierarchical 1:M)

Session

event or activity

Physical or online activity

Date - venue

Participants

Subjects

Project page

Documentation

Support

Campaign

List of programs

By institution

By type of activity

By country

Program

List of sessions or activities

By activity type for an institution

53 of 73

Results

  • Wikipedia pages
  • Wikimedia Commons upload
  • Wikidata updates

Statistics:

  • number of users (new, recurring)
  • number of pages (new, amended)
  • number of uploaded images
  • number of photos used
  • number of page views

54 of 73

Campaign statistics

55 of 73

Activity reporting

Most easy is the Campaign summary report

56 of 73

All items for one Organisation

SELECT DISTINCT ?item WHERE {

?item wdt:P6104 ?wikiproject.

?wikiproject wdt:P31 wd:Q16695773;

wdt:P664 wd:Q18398868.

}

57 of 73

Wikidata Query and visualisation example

You can use graphical tools to represent items:

https://w.wiki/4Cyd

58 of 73

Graph of Wiki Projects

59 of 73

Wikimedia Commons photo campaigns

You can include a photo upload campaign:

See:

60 of 73

Wikimedia Commons

Create a photo campaign and/or photo contest

Examples:

61 of 73

Other results

  • Wikidata updates
  • Wikipedia pages (ListeriaBot)
  • Wikimedia Commons uploads
  • Image reuse (article illustrations)
  • other projects (Wikibooks, Wikivoyage)

62 of 73

The complete story

63 of 73

Other tools

  • Quarry: write SQL queries to obtain detailed reports
  • Pywikibot: program to update Wikimedia

64 of 73

Quarry

Advanced reporting

SQL Queries on Dump files…

65 of 73

Pywikibot

  • Module based on the Python programming language
  • All Wikimedia platforms are accessible in read or write

Tool to update Wikidata using Python scripts.

Usage:

  • Mass update Wikidata: any Label, Description, Alias, or statement
    • Examples: Copy label, Create person, Create firstname, Create lastname, Add statement
  • Reporting, communication:
    • Obtain list of user(name)s who wrote articles/categories
    • Send e-mail to Wikipedians (requires interface moderator right)

Prerequisites and techniques:

  • Programming skills
  • Linux admin skills to install the software (unless using PAWS)
  • Huge volumes require the bot right
  • Source code archive

66 of 73

Two metrics platforms?

There are two platforms to generate statistics

Difference between Outreach Programs and events and the Events Metrics

Similar but different with important overlap?

=> systems could/should be merged? Or is there a specific/intended difference?

67 of 73

Group discussion

  • Who uses a project tool for events?
  • Which tool?
  • Experiences?
  • Advantages/disadvantages
  • Missing functionality?
  • Does the approach presented now add value for you?
  • Did you understand it?
  • Do you have questions?
  • Is there a need for follow-up, e.g. a training session?

68 of 73

Exercises

  1. Choose a subject
  2. Contact a partner organisation (venues, dates, activities)
  3. Gather items
  4. Reconcile with OpenRefine
  5. Upload to Wikidata
  6. Wikidata Query
  7. ListeriaBot
  8. Create a Campaign, Program & Events
  9. Write a project page
  10. Organise the event
  11. Report on the results (Program & Events Dashboard, project page, …)

69 of 73

More reading

70 of 73

Follow-up and coaching

71 of 73

Credits

72 of 73

Images

73 of 73

Legal conditions

  • Wikimedia Belgium wants to encourage and support the use and development of Wikipedia and related projects.
  • It manages projects within the jurisdiction of Belgium
  • The association Wikimedia Belgium shares similar objectives with the Wikimedia Foundation and other Wikimedia organisations, but it has no statutory link with them.
  • Wikimedia Belgium is not responsible for the content of Wikipedia and related projects
  • The Wikimedia logos are owned by the Wikimedia Foundation