Metabase Meet & Greet Meet the WMSE team behind Metabase and other editors and friends of Metabase! Everyone is welcome, regardless if you are an active editor or simply interested in the platform. Ask questions, brainstorm and write queries, or simply chat about the future of Metabase. The first Metabase Meet & Greet will be in November - help us pick the time. |
Modelling
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).
Temporary free text fields
Occasionally, we might need to temporarily store a piece of information in free text format, e.g. if we're unsure what item to use or if it does not exist yet.
We use the property temporary free text field (P38) for this. It should be accompanied by the qualifier replaced by property (P41) that states what property should replace it.
Compare the property name string on Wikidata.
SPARQL
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")}.
}
Query to find all temporary free text fields:
PREFIX wb: <https://metabase.wikibase.cloud/entity/>
PREFIX wbt: <https://metabase.wikibase.cloud/prop/direct/>
PREFIX wbp: <https://metabase.wikibase.cloud/prop/>
PREFIX wbpq: <https://metabase.wikibase.cloud/prop/qualifier/>
SELECT DISTINCT ?item ?itemLabel ?val ?qual ?qualLabel
WHERE
{
?item wbt:P38 ?val.
OPTIONAL {?item wbp:P38 ?statement.
?statement wbpq:P41 ?qual .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "sv,en". }
}
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) and event (Q40)
- Example: annual general meeting (Q51)
- index term (Q12)
- Example: public art (Q39)
- organization (Q13)
- Example: Wikimedia Foundation (Q50)
- Wikimedia content project (Q22)
- Example: Swedish Wikipedia (Q26)
- human (Q23)
- Example: Josefine Hellroth Larsson (Q85)
- location (Q66)
- Example: Linköping (Q83)
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 and create an item there first!
- If it's not notable for Wikidata, you can still create an item in Metabase. In this case, it's acceptable to add more information (like official website (P78) or part of (P17)) to make it easier for other users to understand what it is. Make sure there's a good Label and Description as well. Example: Education Policy Center (Q23587).
- 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 insight 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
See the following:
- Modelling of documents in Metabase
- Document entity schema and Cradle
Activities and events
See the following:
See also
- Since wikibase.cloud does not support Constraints, these are instead listed on Rules and displayed on the talk page of the concerned Properties and items.