Wikidata:WikiProject DH Tool Registry/How to Use
How To Use
editWe see three usecases for the Wikidata items encoded according to our basic data model: Searching for tools, creating Wikidata items for tools, and using Wikidata as a backend for your own application to make that data more accessible to users, or integrate that data into a larger database or application.
Search and Explore
editItems created in Wikidata that fulfill the requirements of our basic data model can be searched and explored through several means:
1. The search slot on the Wikidata Main page. This search is named "Linked Open Data Interface". It provides a basic search to cast a wide net, e.g. searching for a software using its name. The advanced search provides a large number of possible constraints to your search, e.g. addressing specific parts of the Wikidata website and the Wikidata database.
2. The Wikidata Query Service provides a web interface for SPARQL queries. See the following section for sample SPARQL queries, all of which provide a link to the results as well as to the wikidata query builder.
3. The wikidata query builder makes it possible to construct detailed queries without the need to write SPARQL code. The Query Builder has an autocomplete feature for the property and value fields, which can be helpful for exploring. In order to use the Query Builder to search for tools according to our data model, use the mandatory properties for constructing a query. Or you can start with a simple query using just one property. See this example in the Query Builder for a search for items used for network analysis. After having run the query on the query builder page, you can generate a short link pointing to your query and you can go see the actual SPARQL query on the Query Service page. Both links appear below the search interface and before the results.
4. The Wikibase API provides a RESTful API which can be used for queries.
Example Queries
editAll methods with a TaDiRAH ID
editSELECT DISTINCT
?method ?methodLabel ?tadirahID ?methodDesc
WHERE {
?method wdt:P9309 ?tadirahID. # select all items that have a TaDiRAH ID
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?method rdfs:label ?methodLabel; # get the labels. this line is not strictly necessary
schema:description ?methodDesc. # get the description
}
}
ORDER BY ?tadirahID
LIMIT 200
Short-URL to the result: https://w.wiki/9T9R
All software items that have at least one TaDiRAH ID (indirectly via Property:P366)
editSELECT DISTINCT
?method ?methodLabel ?tadirahID
(?methodColor AS ?rgb)
?tool ?toolLabel ?toolDesc
?image # order is relevant for the graph display.
WITH {
SELECT DISTINCT
?tool ?method ?methodColor
WHERE {
# select all items that have a TaDiRAH ID
?method wdt:P9309 ?tadirahID.
BIND("7eb8ff" AS ?methodColor) # set rgb colour for method nodes
# select all items which are linked to the methods through `has use`
?tool wdt:P366 ?method;
# limit tools to software in the broadest sense
wdt:P31/wdt:P279* wd:Q7397.
}
LIMIT 3000
} AS %tools
WHERE {
INCLUDE %tools
# retrieve the logos and images for those tools that have them
OPTIONAL { ?tool (wdt:P154| wdt:P18) ?image .}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?tool rdfs:label ?toolLabel;
schema:description ?toolDesc.
?method rdfs:label ?methodLabel.
}
}
ORDER BY ?toolLabel
LIMIT 5000
Short-URL to the result: https://w.wiki/A5pW
Count the software items assigned to each TaDiRAH class.
edit#title: Tools for Digital Humanities: most frequent TaDiRAH classes
#defaultView:BubbleChart
SELECT DISTINCT
?tadirahID
(COUNT(DISTINCT ?tool) AS ?toolCount)
(URI( CONCAT ("https://reasonator.toolforge.org/?&q=", STRAFTER(STR(?method), STR(wd:) ))) as ?link) # link to the wikidata item through reasonator
?methodDesc
WITH {
SELECT DISTINCT
?tool ?method ?tadirahID
WHERE {
# select all items that have a TaDiRAH ID and are therefore assumed to be methods
?method wdt:P9309 ?tadirahID.
# select all items which are linked to these methods through `has use`
?tool wdt:P366 ?method;
# limit tools to software in the broadest sense
wdt:P31/wdt:P279* wd:Q7397.
}
LIMIT 3000
} AS %tools
WHERE {
INCLUDE %tools
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?method rdfs:label ?methodLabel.
?method schema:description ?methodDesc.
}
}
GROUP BY ?tadirahID ?link ?method ?methodDesc
ORDER BY DESC(?toolCount)
LIMIT 100
Short-URL to the result: https://w.wiki/9vbD
Create Items
editAs of the time of implementing this WikiProject (Autumn 2023), the number of software tools used in digital humanities research encoded in Wikidata is very small. We very much would like to encourage anyone working in a DH support role or DH teaching role, who sees potential in a common tool registry and can think of how to use this for their own work, to create items for software they know and that have usecases in DH. We consider the following workflow as appropriate for registering a tool:
- Does the tool already have a Wikidata entry (does a Wikidata entity already exist)?
- If yes, is the metadata of the existing entity consistent with the basic data model for the tool registry?
- If yes - great! Nothing more to do.
- If not, add the missing metadata to the existing entity.
- If yes, is the metadata of the existing entity consistent with the basic data model for the tool registry?
- If not, create a new item providing at least the mandatory metadata according to the data model. You will need a Wikidata account for creating new items.
For more information on how to edit existing items and create new items, see also the Wikibase Help Page.
It is also possible to edit and create items through the Wikibase API.
Use as Backend
editWikidata (or Wikibase) can be used as a backend for any web application. Our primary usecase for digital humanities research support contexts is focused on easy access, so users can search and browse information related to digital humanities software tools in a more user-friendly environment. Our prototypical web application makes use of the [wikibase api] in order to present a curated set of software tools and provide additional information about related services at the university library's digital humanities center.