Modelling
Page under which Object modelling descriptions will be hosted:
Basic ontology
On the top of the Metabase ontology is the following item:
Which has the immediate sub-item:
Query to find all items that are instance of (P5) or one or the other:
PREFIX wd: <https://metabase.wikibase.cloud/entity/>
PREFIX wdt: <https://metabase.wikibase.cloud/prop/direct/>
SELECT ?item ?wikidata_iri ?itemLabelEN ?itemLabelSV ?itemDescEN ?itemDescSV
WHERE
{
{?item wdt:P5 wd:Q3.}
UNION
{?item wdt:P5 wd:Q10.}
OPTIONAL {?item wdt:P1 ?wikidataQ}
BIND(URI(concat("http://www.wikidata.org/entity/", ?wikidataQ)) AS ?wikidata_iri)
OPTIONAL {?item rdfs:label ?itemLabelEN filter (lang(?itemLabelEN) = "en")}.
OPTIONAL {?item rdfs:label ?itemLabelSV filter (lang(?itemLabelSV) = "sv")}.
OPTIONAL {?item schema:description ?itemDescEN filter (lang(?itemDescEN) = "en")}.
OPTIONAL {?item schema:description ?itemDescSV filter (lang(?itemDescSV) = "sv")}.
}
Properties
Whenever possible, we aim to create properties whose scope duplicates that of properties in Wikidata. By using same as on Wikidata (P1), we then link to the equivalent Wikidata property. This lowers the threshold for Wikidata editors to start participating.
For example: organizer (P14), language of work or name (P20), number of participants (P28).
Metabase internal properties
We sometimes have a need for properties that do not have direct equivalents on Wikidata. For example when we need to describe the activities of the Wikimedia movement in more detail than what's relevant for Wikidata.
These properties shall have instance of (P5) → Metabase internal property (Q24).
For example: WMSE project ID (P9), Wikimedia platform(s) affected (P13), sorted under programmatic area (P10).
Query to find all internal properties:
PREFIX wd: <https://metabase.wikibase.cloud/entity/>
PREFIX wdt: <https://metabase.wikibase.cloud/prop/direct/>
SELECT ?item ?itemLabelEN ?itemLabelSV ?itemDescEN ?itemDescSV
WHERE
{
?item wdt:P5 wd:Q24.
OPTIONAL {?item rdfs:label ?itemLabelEN filter (lang(?itemLabelEN) = "en")}.
OPTIONAL {?item rdfs:label ?itemLabelSV filter (lang(?itemLabelSV) = "sv")}.
OPTIONAL {?item schema:description ?itemDescEN filter (lang(?itemDescEN) = "en")}.
OPTIONAL {?item schema:description ?itemDescSV filter (lang(?itemDescSV) = "sv")}.
}
Metabase vs. Wikidata
As we do not aim to duplicate the information on Wikidata, there's a number of item types that only contain a Wikidata QID, using same as on Wikidata (P1). These are:
- activity (Q8)
- index term (Q12)
- organization (Q13)
- Wikimedia content project (Q22)
- human (Q23)
- event (Q40)
- location (Q66)
By using federated queries, we can still access information about these types of entities from Wikidata, without hosting the data ourselves.
See some examples of federated queries.
Index terms
An index term (Q12) is a keyword that we use to describe e.g. the topic of a document or the focus area of a project.
For example: museum collection (Q18), public art (Q39), authority control (Q17).
Organizations
An organization (Q13) could be a Wikimedia chapter, a GLAM or any other organized social entity.
For example: Wikimedia Foundation (Q50), Wikimedia Sverige (Q9), Nationalmuseum (Q15).
Humans
We only create items about people when these are needed to describe authorship/speaker/event or project responsibility. And only when this information is already publicly available, any affiliation would also need to have been publicly communicated. Since the main affiliation might not always apply, it can be superseded by a qualifier on an item-by-item basis.
For example: Alicia Fagerving (Q46), André Costa (Q30).
Item types primarily offloaded on Wikidata
For the following item types we expect little or no information on Metabase. Required are only same as on Wikidata (P1) and instance of (P5) if they exist on Wikidata.
- Organizations
- If not on Wikidata, consider if it might anyway be relevant for Wikidata. Else add a Label and an additional instance of (P5) statement to an index term describing the type of organisation.
- Locations: It is enough to stay at a town level of granularity, e.g. Stockholm (Q78) rather than Norrsken House. This is enough to get an insights about the geographical spread of activities.
- Humans
- If not on Wikidata see humans for allowed modelling
Metabase-specific items
Projects
A project could be:
- a formal one officially implemented by an organization (a Wikimedia chapter, a GLAM, or other)
- an informal one implemented by a self-organized group (such as participants in a Wikiproject), or an individual (a volunteer Wikimedian)
See the following:
- Modelling of projects in Metabase
- Generic project entity schema and Cradle
- Wikimedia Sverige project entity schema and Cradle
Documents
Activities and events