Cleveland Museum of Art Open Access project

On January 23, 2019, the Cleveland Museum of Art announced their Open Access initiative to release more than 30,000 high-quality images from their collection under a CC0 license, as well as 60,000+ metadata records. One of their goals was to ensure their works had widespread use, including presence on the most popular reference site in the world, Wikipedia and its sister projects.

A team of Wikimedia community members assisted on the CMA launch, with Andrew Lih (User:Fuzheado) leading the creation of Wikidata records and guiding the CMA in uploading their prominent holdings to Wikimedia Commons. A Wikimedia blog post gives a nice summary.

Here are a series Wikidata queries to show items created and images uploaded as part of this initiative. The full Wikidata query can be explored by clicking on the "Wikidata Query Service" link/icon on each block.

We start by loading up the requisite libraries for showing SPARQL queries in this notebook.

import urllib.parse
from IPython.display import IFrame
baseurl='https://query.wikidata.org/embed.html#'

def wdq(query='',width=800,height=500):
  return IFrame(baseurl+urllib.parse.quote(query), width=width, height=height)

Wikidata presence

This was the rare occasion to debut both images and Wikidata records simultaneously for a GLAM open content initiative. Wikidata already had more than 4,000 records from CMA associated with the project Sum of All Paintings, and the museum highlighted 4,000 more records of their prominent holdings that we uploaded using their API using their accession numbers. A current count of all CMA accession numbers in Wikidata yields more than 8,000 items.

wdq("""SELECT (COUNT(?item) as ?count) 
WHERE { ?item p:P217 [ ps:P217 ?id ; pq:P195 wd:Q657415 ] OPTIONAL { ?item wdt:P31 ?inst } }
""",width=300,height=70)

Image grid of Wikidata items

This query shows a gallery of roughly 4,000 new images and items uploaded to Wikidata, which represents the CMA's most prominent holdings, either on display or on loan.

In addition to importing these records from the CMA API, extra work needed to be done to map the lexical artist name to the exact corresponding Wikidata entry. This reconciliation process was handled with a custom Python script using the Wikidata reconciliation API.

wdq(width=1000,height=600,query="""
#defaultView:ImageGrid
SELECT DISTINCT ?item ?itemLabel ?id ?img WHERE {
  ?item p:P217 [ps:P217 ?id; pq:P195 wd:Q657415] .
  ?item wdt:P5008 wd:Q60729883 .
  OPTIONAL { ?item wdt:P18 ?img } .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
""")

Histogram of different types of CMA artworks

What types of artworks do we have from CMA? The Sum of All Paintings (SOAP) project has ingested many paintings already, contributing a large showing in that category. However, without the SOAP contributions, sculpture actually makes up most of the holdings in this data set.

wdq("""
#defaultView:BubbleChart
# Show histogram of artwork types/instances for a GLAM entity
SELECT ?q ?qLabel (COUNT(?q) as ?count) WHERE {
    # Replace the below with the GLAM institution
    BIND (wd:Q657415 AS ?institution)
    # IF the institution has a dedicated property/identifier, try this:
    # ?item wdt:P3634 ?id .
    ?item wdt:P195 ?institution .
    ?item wdt:P31 ?q .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
GROUP BY ?q ?qLabel
ORDER BY DESC (?count)
LIMIT 50
""")
wdq("""
#defaultView:BubbleChart
# Show histogram of artwork types/instances for a GLAM entity
SELECT ?q ?qLabel (COUNT(?q) as ?count) WHERE {
    # Replace the below with the GLAM institution
    BIND (wd:Q657415 AS ?institution)
    ?item wdt:P5008 wd:Q60729883 .
    ?item wdt:P31 ?q .
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
GROUP BY ?q ?qLabel
ORDER BY DESC (?count)
LIMIT 50
""")

Most represented artists in CMA dataset

Which artists are most represented in CMA's holdings in Wikidata? Photographer Carl Robert Pope, Japanese artist Aoki Shukuya and Russian jeweler Peter Carl Fabergé.

wdq(width=1000,height=800,query="""
#defaultView:BubbleChart
# Show histogram of creators for all artworks that match GLAM entity
SELECT ?q ?qLabel (COUNT(?q) as ?count) WHERE {
    # Replace with the GLAM institution
    BIND (wd:Q657415 AS ?institution)
    ?item p:P217 [ps:P217 ?id; pq:P195 ?institution] .
    ?item wdt:P170 ?q . # Creators
    FILTER NOT EXISTS { ?item wdt:P170 wd:Q4233718 } # Filter out anonymous
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
GROUP BY ?q ?qLabel
ORDER BY DESC (?count)
LIMIT 30
""")

Timeline of most prominent artists at CMA

wdq(width=1000,height=1000,query="""
#defaultView:Timeline
# Show histogram of creators for all artworks that match GLAM entity
SELECT DISTINCT ?q ?qLabel ?count ?dob ?img WHERE
{
    {
      SELECT ?q (COUNT(?q) as ?count) WHERE {
        # Replace with the GLAM institution
        BIND (wd:Q657415 AS ?institution)
        ?item p:P217 [ps:P217 ?id; pq:P195 ?institution] .
        ?item wdt:P170 ?q . # Creators
        FILTER NOT EXISTS { ?item wdt:P170 wd:Q4233718 } # Filter out anonymous
      } 
    GROUP BY ?q ?qLabel
    } 
    OPTIONAL { ?q wdt:P569 ?dob }
    OPTIONAL { ?q wdt:P18 ?img }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
ORDER BY DESC (?count)
LIMIT 50
""")

Map of place of birth for most prominent artists in CMA

wdq("""
#defaultView:Map
# Show place of birth locations for most prominent artists
SELECT DISTINCT ?q ?qLabel ?pobLabel ?coord ?img WHERE
{
    {
      SELECT ?q (COUNT(?q) as ?count) WHERE {
        # Replace with the GLAM institution
        BIND (wd:Q657415 AS ?institution)
        ?item p:P217 [ps:P217 ?id; pq:P195 ?institution] .
        ?item wdt:P170 ?q . # Creators
        FILTER NOT EXISTS { ?item wdt:P170 wd:Q4233718 } # Filter out anonymous
      } 
    GROUP BY ?q ?qLabel
    } 
    OPTIONAL { ?q wdt:P19 ?pob . ?pob wdt:P625 ?coord }
    OPTIONAL { ?q wdt:P18 ?img }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} 
ORDER BY DESC (?count)
LIMIT 50
""")