Help/Events and activities

From MetaBase
Jump to navigation Jump to search

About this page

This page explains how to describe events and activities in Metabase, such as workshops, presentations, conferences and campaigns.

Event types

Every event has a type. Some examples of event types are:

See the list of all available event types.

Online, physical and hybrid events

It is useful to know whether an event took place physically, online, or both. For this reason, every event has two instance of (P5) statements:

  1. one for the type of event, for example conference (Q42) or edit-a-thon (Q41)
  2. one for how the event was held, which is one of:

Events with parts

Some events are made up of smaller events that have their own items. Link them in both directions:

  • On the larger event, add has part(s) (P35) with the smaller event as the value.
  • On the smaller event, add part of (P17) with the larger event as the value.

Conferences and campaigns are the most common examples.

Conferences

In this section, GLAM Wiki 2023 (Q22660) is used as the example.

Sessions

Sessions with several activities

A session can contain several separate activities. For example, one session might contain three presentations on the same topic, given by different speakers. They belong together because the conference program groups them as one session.

Campaigns

A campaign (Q22217) is a common type of activity organized by Wikimedians. Examples are WikiGap 2021 (Q22430) and Wiki Loves Monuments 2023 in Italy (Q22600).

A campaign takes place over a set period of time, often a long one. It can include parts such as:

Link these parts with has part(s) (P35) and part of (P17), as described above.

Campaigns with one part

Some campaigns have several parts. For example, WikiGap 2021 in Sweden (Q22508) includes several edit-a-thons. Other campaigns have only one part. For example, Wiki Loves Monuments 2019 in Sweden (Q22623) has only one part, Wiki Loves Monuments 2019 in Sweden ‒ contest (Q22384), so in practice the two are the same thing.

Always model the campaign and its parts as separate items, even when there is only one part. There are two reasons for this:

  • A campaign can grow. For example, a national Wiki Loves Monuments campaign could also include edit-a-thons and seminars.
  • Using the same model every time makes the data easier to query and the model easier to remember.

Properties

Required

Required if it exists

Required for physical events

Required for some event types

Highly recommended

Optional: content and structure

Optional: media

Optional: links and notes

Optional: outcomes

SPARQL

All events, with dates and locations

PREFIX wb: <https://metabase.wikibase.cloud/entity/>
PREFIX wbt: <https://metabase.wikibase.cloud/prop/direct/>
SELECT DISTINCT ?item ?itemLabel ?where ?whereLabel ?when 
WHERE
{
?item wbt:P5/wbt:P4* wb:Q40 .
OPTIONAL {?item wbt:P23 ?when}
OPTIONAL {?item wbt:P27 ?where}
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
}

Try it!


All conferences

PREFIX wb: <https://metabase.wikibase.cloud/entity/>
PREFIX wbt: <https://metabase.wikibase.cloud/prop/direct/>
SELECT DISTINCT ?item ?itemLabel ?where ?whereLabel ?when ?start ?end
WHERE
{
?item wbt:P5/wbt:P4* wb:Q42 .
OPTIONAL {?item wbt:P23 ?when}
OPTIONAL {?item wbt:P27 ?where}
OPTIONAL {?item wbt:P6 ?start}
OPTIONAL {?item wbt:P7 ?end}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,sv". }
}

Try it!


Everything that is part of GLAM Wiki 2023, with dates, people and main subjects

PREFIX wb: <https://metabase.wikibase.cloud/entity/>
PREFIX wbt: <https://metabase.wikibase.cloud/prop/direct/>
SELECT ?item ?itemLabel (GROUP_CONCAT(DISTINCT ?typeLabel; SEPARATOR = ", ") AS ?types) ?when (GROUP_CONCAT(DISTINCT ?personLabel; SEPARATOR = ", ") AS ?persons) (GROUP_CONCAT(DISTINCT ?mainsubjectLabel; SEPARATOR = ", ") AS ?topics)
WHERE
{
?item wbt:P17* wb:Q22660.
?item wbt:P5 ?type.
OPTIONAL {?item wbt:P23 ?when}
OPTIONAL {?item wbt:P32 ?person} # leader, eg in a workshop
OPTIONAL {?item wbt:P33 ?person} # speaker, eg in a presentation
OPTIONAL {?item wbt:P19 ?person} # author, eg of a video
OPTIONAL {?item wbt:P15 ?mainsubject}
  SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en,sv,es".
    ?item rdfs:label ?itemLabel.
    ?person rdfs:label ?personLabel.
    ?mainsubject rdfs:label ?mainsubjectLabel.
    ?type rdfs:label ?typeLabel.
  }
}
GROUP BY ?item ?itemLabel ?types ?when
ORDER BY ?itemLabel

Try it!