Commons:Structured data/GLAM/Tools

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Here is a list of tools that can be used by users or GLAM-Wiki initiatives to add Structured data on Wikimedia Commons media files: tools for batch uploads or campaings and for analytics and visualizations. If you are looking for more options, there is also a complete list of batch upload tools for GLAM on Outreach Wikimedia, another list for tools in the Wikimedia ecosystem, and a separate list of uploads for Wikidata. Also worth checking out the Workflow for GLAMs page.

A not up-to-date list of GLAM tools is also available on the GLAMwiki Toolset page, as well as a spreadsheet with tools, workflows, pain points for GLAM, structured data, and Structured Commons.

For batch uploads or campaings

QuickStatements and Minefield[edit]

Currently, there are no tool that batch uploads images to Wikimedia Commons from beginning to end and that allows the use of Structured data at the same time.

One alternative to inserting Structured data into media files that are already on Wikimedia Commons is the combined usage of the Minefield and QuickStatements tools.

The Minefield tool allows the user to convert the Commons file page titles to media ids (MIDs). QuickStatements version 2 support Structured Data on Commons if the user changes the field Create new command batch for from Wikidata to Commons and, at the commands, uses M numbers (MIDs) instead of Q numbers (QIDs).

More details about this upload process is available on this page.

Add to Commons / Descriptive Claims (ACDC)[edit]

The ACDC gadget allows for mass editing of Structured data on Commons claims for a list of files or category. It also permits deletion of claims, but it needs a special flag to be enabled.

To get the gadget on Commons, go to Preferences > Gadgets > Add to Commons / Descriptive Claims (ACDC). It becomes available on your Commons' sidebar, on the Tools section.

ISA Tool[edit]

ISA is a tool for enrichment and micro-contributions that might be useful for some GLAMs. It was launched on August 2019, during the Wikimania.

  • Official pilot project for Structured Data on Commons.
  • A tool that allows anyone to add structured data to files on Commons in an easy and fun way.
  • Development and communications by Wiki In Africa, Eugene Egbe, and Histropedia.
  • Mentored by Sandra Fauconnier, Program Officer, GLAM and Structured Data at the Wikimedia Foundation.

Learn more:

For analytics and visualizations

Wikimedia Commons Query Service[edit]

The Wikimedia Commons Query Service (WCQS) is an external application, which is available on WMF Labs, uses Wikibase, and it's useful for providing analytics and visualizations for the data uploaded. It's based on the Wikidata Query Service.

It's still on a beta version and it's not always up to date. It might take a few days to be updated and for recent edits made to Structured Data on Commons to appear. If you need help, Wikidata Query Help provides the documentation needed to use it. Information about MIDs is specifically described on this page or this page. A non-beta version is going to be developed at some point in the future.

To learn more about the WCQS, see Commons:SPARQL query service. To find example queries based on Commons, access Commons:SPARQL query service/queries/examples.

GLAM-related query examples[edit]

  • Images depicting Van Gogh works

Painting files with creator (P170) set to Vincent van Gogh (Q5582):

#defaultView:ImageGrid
select ?image ?painting ?paintingLabel ?paintingDescription ?thumb with {
  select * {
    service <https://query.wikidata.org/sparql> {
      ?painting wdt:P170 wd:Q5582;
                rdfs:label ?paintingLabel;
                schema:description ?paintingDescription.
      filter (lang(?paintingLabel) = "en")
      filter (lang(?paintingDescription) = "en")
    }
  } 
} as %paintings where {
  include %paintings. 
  ?image wdt:P180 ?painting.
  
  # This is a hack to make ImageGrid work
  ?image schema:contentUrl ?url. 
  bind(iri(concat("http://commons.wikimedia.org/wiki/Special:FilePath/", wikibase:decodeUri(substr(str(?url),53)))) AS ?thumb)
}

Try it!

  • Depictions of bridges

Files with depicts (P180) set to bridge (Q12280):

# Map of some images tagged with "depicts" (P180) = "bridge" (Q12280)
#defaultView:Map
SELECT ?file ?pov_coords ?image WHERE {
  ?file wdt:P180 wd:Q12280 ;
        wdt:P1259 ?pov_coords ;
        schema:contentUrl ?url ;
  bind(iri(concat("http://commons.wikimedia.org/wiki/Special:FilePath/", wikibase:decodeUri(substr(str(?url),53)))) AS ?image)
}

Try it!

Media Search[edit]

Structured Data on Commons can be searched and visualized on Wikimedia Commons using the search bar. This is possible using the new Commons search, Media search, and on the previous one, Search.

For making use of it, search with the haswbstatement search. Use the code haswbstatement:, followed by the properties and QIDS you want to search. This is based on the structure available on Wikidata for Commons files.

Example: If you want to search for a file in which the digital representation of (P6243) is the painting Almond Blossom (Q1432536), by Vincent van Gogh, you should search for: haswbstatement:P6243=Q1432536.

It's also possible to search for Commons categories for files that use Structured Data. Apply the code incategory, followed by the category's name, the haswbstatement: code, and lastly the property you want to search related to the category.

Example: If you want to look for files using depicts (P180) in the Images from Metropolitan Museum of Art category, you should search for: incategory:Images_from_Metropolitan_Museum_of_Art haswbstatement:P180.

This is not only useful for the visualization and search of files, but it's also an easy way to know the number of files that use certain metadata. In the Images from Metropolitan Museum of Art category, for example, there are 54,389 results (July, 2021).

For more information about the development of Media Search, see Commons:Structured data/Media search. Access this page for more examples on how to search Structured Data on Commons.