Wikidata contains information on many artworks of French cultural heritage.
Here, I will illustrate how Wikidata can be used to analyze this heritage and its representation in Wikidata.
I am going to comment on a query performed on Wikidata's SPARQL access point, named WDQS (https://query.wikidata.org/). Here's the query:
#defaultView:BubbleChart
# counts the artworks in the Louvre known to Wikidata, grouped by the concepts that describe them
select distinct ?depict ?depictLabel (count(?s) as ?c)
where
{
?s wdt:P9394 ?arkid;
wdt:P180 ?depict
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
group by ?depict ?depictLabel
order by desc(?c)
The language used is SPARQL, the RDF knowledge graph query language.
The first line:
#defaultView:BubbleChart
This line is a comment in the SPARQL sense. It has a particular use in WDQS: it tells WDQS what type of display we want for the result, in this case a BubbleChart. The following line is a simple comment.
The line starting with select indicates that you want to use the ?depict and ?depictLabel 'variables' described below. The count indicates that you wish to count the entities selected in the ?s variable.
The following lines between { and } are used to select data in Wikidata.
The P9394 property allows you to associate an artwork with its ID in the Louvre collections. I select the entities that have such an ID with the line:
?s wdt:P9394 ?arkid;
Property P180 is used to associate one or more concepts with an entity. These concepts will feed the ?depict
variable. They are obtained using the line:
wdt:P180 ?depict
The line
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
uses a Wikidata-specific extension. It allows you to associate a textual label with each entity, enabling it to be represented in an interface, for example. Here, entities registered in ?depict will have an associated label in ?depictLabel.
The lines after the last } are used to organize the results.
The line
group by ?depict ?depictLabel
is used to group ?c entities that share the same ?depict and ?depictLabel.
The following line
order by desc(?c)
is used to order the results in descending order of ?c.
To sum up, this query produces a list of concepts, with their associated labels, describing artworks in the Louvre and known by Wikidata, and each concept is associated with the number of artworks involved.
Below is a link to the interactive result of the query. It's a bubble chart. Clicking on a bubble displays a description of the associated concept. Hovering over a bubble displays the label and number of works concerned.