User:Epìdosis/sandbox
Jump to navigation
Jump to search
Try it!
Property replacement for QuickStatements
Property removal for QuickStatements
All identifiers in a single item
Count of biographical dictionaries connected to a library catalog
Count all properties used with a defined value
Humans with more than 150 identifiers
Number of incoming links for authors of articles published in Bibliothecae.it
Order a group of items by number of linking items and linking statements
Average number of statements for Italian schools by region
Ancestors (fathers only) of Charles V - inspired from Wikidata Graph Builder
Interpersonal relations of typographers active in Venice until 1850
Labels in two languages
Same label in two languages
Label containing
Description containing
Description exactly containing
Italian homonym people with or without SBN
Hononym things in Luxembourg
Persone legate al capologuo di comune in Italia
Try it!
Try it!
Try it!
Count by prefix
Try it!
Articles surely without author
Inscriptions with unknown collection
Try it!
Try it!
Try it!
Try it!
Try it!
Comparison of two labels in SELECT
Excluding items having only a specific qualifier-value
Items with PIAC and only one occupation (university professor)
VIAF appearing two times in the same item (= single-value violation)
NUKAT appearing two times equal in two different items (= unique-value violation)
VIAF unique value violations (recent items with GND)
A birth date referenced only from Wikimedia projects
Only one birth date referenced only from a Wikimedia project
Two similar sources (P248+P248) for the same value
Two similar sources (P248+P854) for the same value
References by retrieval date
Wrong P248 value
Single items containing references with only P813
Items containing date of birth referenced from NKC both as ID and as URL
Some items containing date of birth referenced from two URLs wrongly in the same reference
Items with redundant dates of death referenced only with Open Library, to be removed (note: run on QLever)
Try it!
Birth date referenced, only one having best rank, with precision year or higher and possible precision qualifiers
SBN people with birth date having a precision lower than day
Try it!
Try it!
Try it!
Morti recenti
Mappa dei luoghi di nascita degli autori italiani morti nel 1952
People born in 1950 with VIAF URL as source
Authors in IRIS SNS by decade of birth
Try it!
Most frequent birth places for SBN authors
Exclude single results
Places of birth for IRIS authors
Authors in IRIS SNS by presence in VIAF members
SBN IDs from BNCF not qualified
URL contains
reference URL contains
reference URL instead of ID
Order by number
Try it!
Try it!
Try it!
Try it!
Try it!
Encode of article titles
Try it!
VIAF members
Decrease of the number of VIAFs thanks to Wikidata
Try it!
Deprecated rank with eventual motivation
Same value of VIAF present in two items, one good and the other deprecated as related to another subject
One value with deprecated rank, no value with normal rank
Same GND in two items, deprecated rank in the first, normal rank in the second
Deprecated values sourced with Beweb, and corresponding correct values
Most-recently-created items containing Parsifal cluster ID (P12458)
item creator (complete information)
Authority control properties for authority files, sorted by year of creation (approximate on the basis of milestones)
Try it!
Try it!
Try it!
Try it!
Try it!
IMD persons
IMD museums
Queries
[edit]Materials about SPARQL queries
[edit]- Wikidata:SPARQL query service (gentle introduction + complete tutorial + examples + weekly query examples + wikibook; newbie's guide; tutorial; general reference point about SPARQL); Prefixes used;
- Wikidata:Request a query
- QLever endpoint
- Whitelist of federated SPARQL endpoints
Other queries:
- User:Epìdosis/Queries/Exp: queries for beginners
- User:Epìdosis/Queries/Showcase: showcase queries divided by topic
Miscellaneous queries
[edit]Replacement
[edit]
#title:P301 > P1753
SELECT ?item ?is
WHERE {
?item wdt:P301 ?is .
?is wdt:P31 wd:Q13406463 .
MINUS { ?is wdt:P31 ?n .
MINUS { ?n wdt:P279 wd:Q12139612 . } }
}
|
#title:P910 > P1754
SELECT ?item ?v
WHERE {
?item wdt:P910 ?v .
?item wdt:P31 wd:Q13406463 .
MINUS { ?item wdt:P31 ?n .
MINUS { ?n wdt:P279 wd:Q12139612 . } }
}
|
SELECT DISTINCT ?occ ?occLabel (URI(CONCAT("https://www.wikidata.org/wiki/Special:Search/haswbstatement:P106=",?itemId)) AS ?fix)
WHERE {
?item wdt:P8034 ?id .
?item wdt:P106 ?occ .
MINUS { ?occ wdt:P279 ?sub . }
BIND(REPLACE(STR(?occ), "http://www.wikidata.org/entity/","") AS ?itemId)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en,de,es,fr". }
}
ORDER BY ?occLabel
#title:Property replacement for QuickStatements
SELECT (CONCAT("-",?itemId,",","P301",",",?valProp,",,",?itemId,",","P971",",",?valProp) as ?command)
WHERE {
?item wdt:P971 wd:Q15079786 .
?item wdt:P301 ?val .
?val wdt:P31 wd:Q5 .
BIND(REPLACE(STR(?item), "http://www.wikidata.org/entity/","") AS ?itemId)
BIND(REPLACE(STR(?val), "http://www.wikidata.org/entity/","") AS ?valProp)
}
#title:Property removal for QuickStatements
SELECT (CONCAT("-",?itemId,",","P7859",",^",?id,"^") as ?command)
WHERE {
?item p:P7859 [ ps:P7859 ?id ; prov:wasDerivedFrom [ pr:P214 ?viaf ] ] .
MINUS { ?item wdt:P214 ?viaf } .
BIND(REPLACE(STR(?item), "http://www.wikidata.org/entity/","") AS ?itemId)
}
LIMIT 2000
Identifiers in a single item
[edit]#title:All identifiers in a single item
SELECT ?id ?value
WHERE {
wd:Q314447 ?idst ?value .
?id wikibase:directClaim ?idst .
?id wikibase:propertyType wikibase:ExternalId .
}
Counts and DirectClaim
[edit]
#title:Count each external identifier only once
SELECT (COUNT(DISTINCT ?wdt) as ?count) ?n
WHERE
{
?p wikibase:propertyType wikibase:ExternalId .
?p wikibase:directClaim ?wdt .
wd:Q11922067 ?wdt [] .
wd:Q11922067 wikibase:identifiers ?n .
}
GROUP BY ?n
|
#title:Count all external identifiers excluding P214
SELECT (COUNT(*) as ?count) ?n
WHERE
{
?p wikibase:propertyType wikibase:ExternalId .
?p wikibase:directClaim ?wdt .
FILTER( ?wdt != wdt:P214 )
wd:Q11922067 ?wdt [] .
wd:Q11922067 wikibase:identifiers ?n .
}
GROUP BY ?n
|
#title:Count all external identifiers being from Italy
SELECT ?ids_count (COUNT(?item) AS ?item_count) WHERE {
SELECT ?item (COUNT(?ids) AS ?ids_count) WHERE {
?item wdt:P9114 ?id .
OPTIONAL {
?item ?prop ?ids.
?propItem wikibase:directClaim ?prop.
?propItem wikibase:propertyType wikibase:ExternalId.
?propItem wdt:P17 wd:Q38.}
} GROUP BY ?item
} GROUP BY ?ids_count
ORDER BY ?ids_count
|
#title:Count of centuries of birth
#defaultView:LineChart
SELECT ?century (COUNT(?item) AS ?count) #(CONCAT(STR(?century),"..") as ?centuries)
WHERE {
?item wdt:P9114 ?id .
?item wdt:P569 ?birth .
BIND(YEAR(?birth)-1 as ?year). #-1 means 1801-1900, without -1 means 1800-1899
FILTER(BOUND(?year)).
BIND (FLOOR(?year/100) as ?century).
} GROUP BY ?century
ORDER BY ?century
|
#title:Count of biographical dictionaries connected to a library catalog
SELECT ?propItem ?propItemLabel (COUNT(?ids) AS ?ids_count) WHERE {
hint:Query hint:optimizer "Runtime".
?item wdt:P5739 ?id .
?item wdt:P31 wd:Q5 .
OPTIONAL {
?item ?prop ?ids.
?propItem wikibase:directClaim ?prop.
?propItem wikibase:propertyType wikibase:ExternalId.
?propItem wdt:P31 wd:Q97584729 .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?propItem ?propItemLabel
ORDER BY DESC(?ids_count)
#title:Count all properties used with a defined value
SELECT ?prop ?propLabel (COUNT(?item) AS ?n)
WHERE {
?item ?p wd:Q25339110 .
?prop wikibase:directClaim ?p .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?prop ?propLabel
ORDER BY DESC(?n)
#title:Humans with more than 150 identifiers
SELECT ?item ?itemLabel ?identifiers WITH {
SELECT ?item ?identifiers WHERE {
?item wikibase:identifiers ?identifiers. hint:Prior hint:rangeSafe true.
FILTER(?identifiers > 150)
}
} AS %itemsWithManyIdentifiers WHERE {
INCLUDE %itemsWithManyIdentifiers.
?item wdt:P31 wd:Q5.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?identifiers)
LIMIT 1000
#title:Number of incoming links for authors of articles published in Bibliothecae.it
SELECT ?linkingitems (COUNT(?linkingitems) AS ?numberofitems)
WHERE {
{ SELECT ?author (COUNT(DISTINCT ?x) AS ?linkingitems)
WHERE { ?x ?st ?author . ?p wikibase:directClaim ?st . ?article wdt:P50 ?author ; wdt:P1433 wd:Q50811189 . }
GROUP BY ?author }
}
GROUP BY ?linkingitems
ORDER BY DESC(?linkingitems)
#title:Order a group of items by number of linking items and linking statements
SELECT DISTINCT ?x (COUNT(DISTINCT ?y) AS ?n_items_linking_to_x) (COUNT(?st) AS ?n_statements_linking_to_x)
WHERE {
?x wdt:P8985 ?dbbi . #dataset
?y ?st ?x . ?prop wikibase:directClaim ?st .
}
GROUP BY ?x
ORDER BY DESC(?n_items_linking_to_x)
Averages
[edit]#title:Average number of statements for Italian schools by region
SELECT ?r ?reg (AVG(?number) AS ?media_st)
WHERE {
?item wdt:P5114 [] ; wdt:P131* ?r ; wikibase:statements ?number .
?r wdt:P31 ?v ; wdt:P1705 ?reg . VALUES ?v { wd:Q16110 wd:Q1710033 } . FILTER(LANG(?reg) = 'it')
}
GROUP BY ?r ?reg
ORDER BY DESC(?media_st)
Line and bubble graphs
[edit]
#title:P8034 by number of external identifiers
#defaultView:LineChart
SELECT ?ids (COUNT(DISTINCT ?item) AS ?count) WHERE {
hint:Query hint:optimizer "Runtime".
?item wdt:P8034 ?id .
?item wikibase:identifiers ?ids .
}
GROUP BY ?ids
ORDER BY ?ids
#title:P8034 by number of external identifiers (group 15-25, 26+)
#defaultView:BubbleChart
SELECT ?group (SUM(?count) AS ?count_group) #(SAMPLE(?sampl) AS ?sample)
WITH
{
SELECT ?ids (COUNT(DISTINCT ?item) AS ?count) #(SAMPLE(?item) AS ?sampl)
WHERE
{
?item wdt:P8034 ?id .
?item wikibase:identifiers ?ids .
}
GROUP BY ?ids
} AS %what
WHERE
{
INCLUDE %what
BIND( IF(?ids < 16, CONCAT("0",STR(?ids)), #zero added for sorting by group
IF(?ids < 26, "16-25", "26+"))
AS ?group)
}
GROUP BY ?group
ORDER BY ?group
|
#title:P8034 by number of 20 most frequent occupations
#defaultView:BubbleChart
SELECT (SUM(?count) AS ?occ_count) (IF(?group=">20", " other", SAMPLE(?itemLabel)) AS ?occ)
WITH {
SELECT DISTINCT ?item (COUNT(?p) AS ?count) WHERE { ?p wdt:P8034 []; wdt:P106 ?item } GROUP BY ?item ORDER BY DESC(?count)
} AS %all
WITH {
SELECT (?item AS ?item2) (?count AS ?count2) WHERE { INCLUDE %all }
} AS %all2
WITH {
SELECT ?item (SUM(?x) AS ?rank) ?count WHERE {
INCLUDE %all .
INCLUDE %all2 .
BIND( IF( ?count <= ?count2 , 1, 0 ) AS ?x ) .
} GROUP BY ?item ?count
} AS %main
WHERE
{
hint:Query hint:optimizer "None".
INCLUDE %main .
BIND( IF(?rank < 21, STR(?rank),
">20")
AS ?group)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?item rdfs:label ?itemLabel }
}
GROUP BY ?group
ORDER BY (?group=">20") DESC(?occ_count)
|
Chain graph
[edit]#defaultView:Graph
#title:Ancestors (fathers only) of Charles V - inspired from Wikidata Graph Builder
SELECT ?persona ?personaLabel ?padre ?padreLabel
WHERE {
wd:Q32500 wdt:P22* ?persona .
OPTIONAL { ?persona wdt:P22 ?padre } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Network graphs
[edit]#title:Interpersonal relations of typographers active in Venice until 1850
#defaultView:Graph
select ?person ?linkedPerson ?linkedPersonLabel ?type ?personLabel (?type as ?edgeLabel) {
?person wdt:P937 wd:Q641;
wdt:P106 ?activity .
values ?activity {
wd:Q175151 wd:Q1229025 wd:Q998550 wd:Q2516866 wd:Q40881196
}
?person wdt:P2032|wdt:P570 ?datafine .
{ ?person wdt:P1327 ?linkedPerson . bind("business partner" as ?type) } union
{ ?person wdt:P802 ?linkedPerson . bind("student" as ?type) } union
{ ?person wdt:P1066 ?linkedPerson . bind("teacher" as ?type) } union
{ ?person wdt:P22 ?linkedPerson . bind("father" as ?type) } union
{ ?person wdt:P23 ?linkedPerson . bind("mother" as ?type) } union
{ ?person wdt:P40 ?linkedPerson . bind("son" as ?type) } union
{ ?person wdt:P26 ?linkedPerson . bind("partner" as ?type) }
FILTER ("1850-01-01"^^xsd:dateTime > ?datafine)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
Labels in more languages
[edit]#title:Labels in two languages
SELECT ?item ?itemLabelIt ?itemLabelEn (URI(CONCAT("http://www.treccani.it/enciclopedia/",?treccani)) AS ?treccaniUrl)
WHERE {
?item wdt:P3365 ?treccani .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". ?item rdfs:label ?itemLabelEn . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". ?item rdfs:label ?itemLabelIt . }
}
LIMIT 10
#title:Same label in two languages
SELECT ?item ?enlabel WHERE {
?item wdt:P2358 ?roman_praenomen .
?item rdfs:label ?enlabel .
FILTER(LANG(?enlabel) = 'en') .
?item rdfs:label ?calabel .
FILTER(LANG(?calabel) = 'ca') .
FILTER(STR(?enlabel) = STR(?calabel)) .
#OPTIONAL { ?item rdfs:label ?lalabel . FILTER(LANG(?lalabel) = 'la') . } FILTER(!BOUND(?lalabel)) .
}
ORDER BY ?enlabel
#title:Label containing
SELECT ?q ?orcid
WHERE {
?q rdfs:label "Stefano Bargioni"@en .
OPTIONAL { ?q wdt:P496 ?orcid . }
}
#title:Description containing
SELECT ?item ?itemLabel ?itemDescription
WHERE
{
SERVICE wikibase:mwapi
{
bd:serviceParam wikibase:endpoint "www.wikidata.org".
bd:serviceParam wikibase:api "Generator".
bd:serviceParam mwapi:generator "search".
bd:serviceParam mwapi:gsrsearch "Alman politikacılar".
bd:serviceParam mwapi:gsrlimit "max".
?item wikibase:apiOutputItem mwapi:title.
}
?item schema:description ?itemDescription.
FILTER (LANG(?itemDescription) = "tr")
FILTER CONTAINS(?itemDescription, "Alman politikacılar")
}
#title:Description exactly containing
SELECT ?item
WHERE
{
?item wdt:P106 wd:Q82955 .
?item schema:description "Alman politikacılar"@tr
}
Identical labels
[edit]#title:Italian homonym people with or without SBN
SELECT
(SAMPLE(?itemlabel_) AS ?itemlabel)
(GROUP_CONCAT(STRAFTER(STR(?item_), STR(wd:)); SEPARATOR=", ") AS ?items)
(GROUP_CONCAT(STR(?authid_); SEPARATOR=", ") AS ?authid)
(COUNT(?item_) AS ?count)
WITH { SELECT DISTINCT ?item_ WHERE {
VALUES ?v { wd:Q172579 wd:Q38 }
?item_ wdt:P27 ?v ; wdt:P214 [].
} } as %i
WHERE {
INCLUDE %i
?item_ rdfs:label ?itemlabel_ . FILTER(LANG(?itemlabel_) = "it")
OPTIONAL { ?item_ wdt:P396 ?authid_ . }
}
GROUP BY ?itemlabel_
HAVING (?count > 1)
ORDER BY DESC(?count) (?itemlabel)
LIMIT 500
#title:Hononym things in Luxembourg
SELECT ?item1 ?item2 ?l
WHERE {
?item1 wdt:P17 wd:Q32 . ?item2 wdt:P17 wd:Q32 .
?item1 rdfs:label ?l . FILTER(LANG(?l) = 'en') .
?item2 rdfs:label ?l . FILTER(LANG(?l) = 'en') .
FILTER(?item1 != ?item2 && STR(?item1) < STR(?item2)) .
}
ORDER BY ?l
#title:Persone legate al capologuo di comune in Italia
SELECT DISTINCT ?item ?itemLabel ?p ?capoluogo ?capoluogolabel ?comune ?comunelabel
WHERE {
?item ?p ?capoluogo . VALUES ?p { wdt:P19 wdt:P20 wdt:P937 wdt:P551 } .
?capoluogo wdt:P31 wd:Q15303838 ; wdt:P17 wd:Q38 ; wdt:P131 ?comune .
MINUS { ?capoluogo wdt:P31 wd:Q747074 } .
?capoluogo rdfs:label ?capoluogolabel . FILTER(LANG(?capoluogolabel) = "it")
?comune rdfs:label ?comunelabel . FILTER(LANG(?comunelabel) = "it")
FILTER(?capoluogolabel = ?comunelabel)
}
Regex search in descriptions
[edit]SELECT ?item ?desc
WHERE {
?item wdt:P549 ?mgp .
MINUS { ?item wdt:P214 ?viaf . }
#?m wdt:P802 ?item . MINUS { ?m wdt:P1412 ?l . }
?item schema:description ?desc .
FILTER(LANG(?desc) = "en").
#FILTER(STRSTARTS(?desc, "University")).
FILTER(REGEX(?desc, "1[6-7]{1}[0-9]{2}")).
}
SELECT ?q (SUBSTR(STR(?q),32) AS ?qid) ("Den" AS ?den) ("\"male given name\"" AS ?fgn)
WHERE {
?q schema:description "nombre masculino"@es.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
FILTER(NOT EXISTS { ?q schema:description ?dit. FILTER((LANG(?dit)) = "en") })
}
Regex variables
[edit]SELECT ?item ?id ?name ?first ?second ?birth ?death
WHERE {
?item p:P396 [ ps:P396 ?id ; pq:P1810 ?name ] .
FILTER REGEX(?name, "<(.*\\d+.*)-(.*)")
BIND(REPLACE(?name, "^.*<(.*\\d+.*)-(.*)>$", "$1") AS ?first)
BIND(REPLACE(?name, "^.*<(.*\\d+.*)-(.*)>$", "$2") AS ?second)
OPTIONAL { ?item wdt:P569 ?born } . BIND(YEAR(?born) AS ?birth)
OPTIONAL { ?item wdt:P570 ?died } . BIND(YEAR(?died) AS ?death)
FILTER(STR(?first) != STR(?birth))
}
ORDER BY ?birth
#title:Count by prefix
SELECT ?pref (COUNT(?item) AS ?n)
WHERE {
?item wdt:P691 ?nkc .
BIND(REPLACE(STR(?nkc), "^([a-z]*)\\d+$", "$1") AS ?pref)
}
GROUP BY ?pref
ORDER BY DESC(?n)
Somevalue and novalue
[edit]SELECT ?p
WHERE {
{ ?p p:P9073/a wdno:P9073 . } UNION
{ ?p wdt:P9073 ?value . FILTER (isBlank(?value)) }
}
#title:Articles surely without author
SELECT DISTINCT ?articolo ?articoloLabel ?rivistaLabel
WHERE {
?rivista wdt:P31 wd:Q5633421 .
?rivista wdt:P495 wd:Q38 .
?rivista wdt:P921 wd:Q13420675 .
?articolo wdt:P31 wd:Q13442814 .
?articolo wdt:P1433 ?rivista .
?articolo a wdno:P50 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?rivistaLabel
#title:Inscriptions with unknown collection
SELECT DISTINCT ?item ?edr ?coll
WHERE {
?item wdt:P12495 ?edr ; p:P195 ?c . ?c ps:P195 ?coll . FILTER(wikibase:isSomeValue(?coll))
}
ORDER BY ?edr
Union of missing statements/references
[edit]SELECT DISTINCT ?person ?personLabel
WHERE {
?person wdt:P902 ?dss .
?person wdt:P8750 ?urbs .
?person wdt:P31 wd:Q5 .
{ MINUS { ?person p:P569 ?bd . ?bd prov:wasDerivedFrom ?refb } } UNION
{ MINUS { ?person p:P570 ?dd . ?dd prov:wasDerivedFrom ?refd } } UNION
{ MINUS { ?person wdt:P106 ?occ . } }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Group_concat
[edit]SELECT
?i ?iLabel ?iDescription ?nickname
(GROUP_CONCAT(DISTINCT ?iAlias; SEPARATOR=", ") AS ?iAliases)
?P19Label ?P20Label ?P21Label
?P569p ?P569v ?P570p ?P570v ?P18
(GROUP_CONCAT(DISTINCT ?okkMa; SEPARATOR=", ") AS ?okkupMas)
(GROUP_CONCAT(DISTINCT ?okkFe; SEPARATOR=", ") AS ?okkupFes)
WHERE {
BIND(wd:Q1616094 AS ?i)
OPTIONAL { ?i wdt:P21 ?P21 . } # genere
OPTIONAL { ?i wdt:P18 ?P18 . } # foto
OPTIONAL { ?i wdt:P19 ?P19 . } # luogo nascita
OPTIONAL { ?i wdt:P20 ?P20 . } # luogo morte
OPTIONAL { ?i p:P569 [ a wikibase:BestRank ; psv:P569 [ wikibase:timePrecision ?P569p ; wikibase:timeValue ?P569v ] ] . } # data nascita
OPTIONAL { ?i p:P570 [ a wikibase:BestRank ; psv:P570 [ wikibase:timePrecision ?P570p ; wikibase:timeValue ?P570v ] ] . } # data morte
OPTIONAL { ?i wdt:P1449 ?nickname . } # soprannome
OPTIONAL { ?i skos:altLabel ?iAlias . } # aliases
OPTIONAL { ?i wdt:P106 ?okkup . ?okkup rdfs:label ?okkMa . FILTER(LANG(?okkMa) = "it")
OPTIONAL { ?okkup wdt:P2521 ?okkFe . FILTER(LANG(?okkFe) = "it") }
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
GROUP BY ?i ?iLabel ?iDescription ?nickname
?P19Label ?P20Label ?P21Label
?P569p ?P569v ?P570p ?P570v ?P18
select
?item ?itemLabel ?itemDescription
(GROUP_CONCAT(DISTINCT ?article; SEPARATOR=" ; ") AS ?articles)
(GROUP_CONCAT(DISTINCT ?id; SEPARATOR=" ; ") AS ?ids)
where {
?item wdt:P396 "IT\\ICCU\\CFIV\\013063" .
optional { ?item ?external ?external_id .}
values ?external { wdt:P214 wdt:P213 wdt:P227 wdt:P268 wdt:P950 wdt:P244 wdt:P1986 }
bind(concat(str(?external)," ",?external_id) AS ?id)
optional { ?article schema:about ?item .
FILTER (regex(str(?article), "wikipedia.org" ))
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
GROUP BY ?item ?itemLabel ?itemDescription
SELECT DISTINCT ?item ?n (COUNT(DISTINCT ?article2) AS ?num) (?n - ?num AS ?difference)
WHERE {
?item wdt:P31/wdt:P279* wd:Q486972 ; wdt:P131* wd:Q16245 ; wikibase:sitelinks ?n .
MINUS { ?item wdt:P31 wd:Q747074 } .
MINUS { ?item wdt:P31 wd:Q954172 } .
?article schema:about ?item .
OPTIONAL { ?article2 schema:about ?item ; schema:isPartOf ?w .
VALUES ?w { <https://ceb.wikipedia.org/> <https://sh.wikipedia.org/> <https://sr.wikipedia.org/> } . }
}
GROUP BY ?item ?n
ORDER BY DESC(?n)
BIND and IF in SELECT
[edit]SELECT ?item (GROUP_CONCAT(STR(?rec); SEPARATOR=", ") AS ?recs) ?data (IF(BOUND(?irisid),"SÌ","NO") AS ?iris)
WHERE {
?item p:P227 ?v .
OPTIONAL { ?item ?irisst ?irisid . ?iris wikibase:directClaim ?irisst ; wdt:P1629 [ wdt:P408 wd:Q107492957 ] . } .
?v a wdno:P227 ; prov:wasDerivedFrom [ pr:P854 ?rec ; pr:P813 ?data ] .
FILTER ("2023-01-31"^^xsd:dateTime < ?data && ?data < "2023-03-01"^^xsd:dateTime)
}
GROUP BY ?item ?data ?irisid
#title:Comparison of two labels in SELECT
SELECT ?item ?label ?item2 ?label2 (IF(STR(?label) = STR(?label2), "SAME", "NOT SAME") AS ?comparison)
WHERE { ?item wdt:P31 wd:Q5 ; wdt:P227 ?gnd ; wdt:P214 ?viaf ; rdfs:label ?label .
FILTER(LANG(?label) = "mul").
FILTER ((xsd:integer(SUBSTR(STR(?item),33))) > 130000000) .
?item2 wdt:P214 ?viaf ; rdfs:label ?label2 . FILTER(?item != ?item2)
FILTER(LANG(?label2) = "en").
}
Excluding values
[edit]#title:Excluding items having only a specific qualifier-value
SELECT DISTINCT ?item
WHERE {
?item p:P4223 ?ei .
?ei pq:P50 ?author .
FILTER (?author != wd:Q3772798 )
}
One value
[edit]#title:Items with PIAC and only one occupation (university professor)
SELECT ?item ?itemLabel ?itemDescription ?value
WHERE
{
?item wdt:P8982 ?value ; wdt:P106 wd:Q1622272, ?v .
FILTER NOT EXISTS { ?item wdt:P106 ?v2 . FILTER( ?v != ?v2 ) }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" } .
}
Multiple values
[edit]
SELECT ?item (count(?item) as ?num)
WHERE {
?item wdt:P131* wd:Q16245.
} GROUP BY ?item
ORDER BY DESC(?num)
|
SELECT ?item (count(?item) as ?num)
WHERE {
?item wdt:P131* wd:Q16245.
}
GROUP BY ?item
HAVING(count(?item) > 1)
ORDER BY DESC(?num)
|
Duplicated values
[edit]#title:VIAF appearing two times in the same item (= single-value violation)
SELECT DISTINCT ?item ?v1
WHERE {
?item p:P214 ?viaf1 .
?viaf1 ps:P214 ?v1 .
?item p:P214 ?viaf2 .
?viaf2 ps:P214 ?v2 .
FILTER(?viaf1 != ?viaf2)
FILTER(?v1 = ?v2)
}
LIMIT 10
#title:NUKAT appearing two times equal in two different items (= unique-value violation)
SELECT DISTINCT ?v1 ?item1 ?item2
WHERE {
?item1 p:P1207 ?s1 .
?s1 ps:P1207 ?v1 .
?item2 p:P1207 ?s2 .
?s2 ps:P1207 ?v2 .
FILTER(?item1 != ?item2)
FILTER(?v1 = ?v2)
}
LIMIT 10
#title:VIAF unique value violations (recent items with GND)
SELECT DISTINCT ?item1 ?item1Label ?item2 ?item2Label ?value
{
?item1 wdt:P214 ?value .
?item2 wdt:P214 ?value .
?item1 wdt:P31 wd:Q5 .
?item2 wdt:P227 [] .
FILTER ((xsd:integer(SUBSTR(STR(?item2),33))) > 90000000) .
FILTER( ?item1 != ?item2 && STR( ?item1 ) < STR( ?item2 ) ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" } .
}
ORDER BY ?item2
Statements without references
[edit]
#title:Humans needing fundamental references
SELECT DISTINCT ?item ?itemLabel {
?item wdt:P7613 ?bf .
{ ?item p:P569 ?dbs . MINUS { ?dbs prov:wasDerivedFrom ?ref . } }
UNION
{ ?item p:P570 ?dds . MINUS { ?dds prov:wasDerivedFrom ?ref . } }
UNION
{ ?item p:P19 ?pbs . MINUS { ?pbs prov:wasDerivedFrom ?ref . } }
UNION
{ ?item p:P20 ?pds . MINUS { ?pds prov:wasDerivedFrom ?ref . } }
?item wdt:P31 wd:Q5 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?itemLabel
|
#title:Humans needing fundamental statements
SELECT DISTINCT ?item ?itemLabel ?db ?dd ?pb ?pd {
?item wdt:P7613 ?bf .
OPTIONAL { ?item wdt:P569 ?db . }
OPTIONAL { ?item wdt:P570 ?dd . }
OPTIONAL { ?item wdt:P19 ?pb . }
OPTIONAL { ?item wdt:P20 ?pd . }
?item wdt:P31 wd:Q5 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?db ?dd ?pb ?pd
|
#title:A birth date referenced only from Wikimedia projects
SELECT ?item (COUNT(?ref) AS ?n)
WHERE {
?item wdt:P1986 ?dbi ; p:P569 ?st .
?st prov:wasDerivedFrom ?ref, ?ref2 . ?ref2 pr:P143 [] .
}
GROUP BY ?item
HAVING(?n = 1)
#title:Only one birth date referenced only from a Wikimedia project
SELECT ?item (COUNT(DISTINCT ?st) AS ?nst)
WHERE
{
hint:Query hint:optimizer "None" .
?item wdt:P1986 ?dbi; p:P569 ?st . ?st prov:wasDerivedFrom ?ref . ?ref pr:P143 [] .
FILTER NOT EXISTS { ?st prov:wasDerivedFrom ?other . FILTER( ?other != ?ref ) }
}
GROUP BY ?item
HAVING(?nst = 1)
Possibly imprecise or duplicated references
[edit]#title:Two similar sources (P248+P248) for the same value
SELECT ?item ?rank
WHERE
{
?reference1 pr:P248 wd:Q19938912.
?reference2 pr:P248 wd:Q15222191.
?statement prov:wasDerivedFrom ?reference1.
?statement prov:wasDerivedFrom ?reference2.
?item p:P569 ?statement.
VALUES ?rank { wikibase:NormalRank wikibase:PreferredRank } # Wanted ranks
?statement wikibase:rank ?rank.
}
#title:Two similar sources (P248+P854) for the same value
SELECT ?item ?rank
WHERE
{
{
?reference1 pr:P248 wd:Q19938912.
?reference2 pr:P854 ?URL.
?statement prov:wasDerivedFrom ?reference1.
?statement prov:wasDerivedFrom ?reference2.
FILTER (?reference1 != ?reference2) # Requested to be different references
}
hint:Prior hint:runFirst "true".
?item p:P569 ?statement.
VALUES ?rank { wikibase:NormalRank wikibase:PreferredRank } # Wanted ranks
?statement wikibase:rank ?rank.
FILTER CONTAINS(STR(?URL), "data.bnf.fr")
}
#title:References by retrieval date
SELECT ?subject ?subjectLabel ?subjectDescription ?date ?cons
WHERE {
?subject p:P569/psv:P569 ?date_node .
?date_node wikibase:timePrecision "7"^^xsd:integer .
?date_node wikibase:timeValue ?date .
FILTER (year(?date) > 1702 ) .
FILTER (year(?date) < 1802 ) .
?subject p:P569/prov:wasDerivedFrom/pr:P248 wd:Q23833686 .
?subject p:P569/prov:wasDerivedFrom/pr:P813 ?cons .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?cons
#title:Wrong P248 value
SELECT ?item ?ref WHERE {
?item wdt:P396 ?sbn.
?ref pr:P248 wd:Q576951.
?statement prov:wasDerivedFrom ?ref.
?item ?p ?statement.
}
#title:Single items containing references with only P813
SELECT ?item ?id ?property ?statement ?retrieved
WHERE
{
hint:Query hint:optimizer "None".
VALUES ?item { wd:Q107331778 }
?item ?property ?statement .
?property ^ wikibase:claim [] .
?statement prov:wasDerivedFrom ?b .
?b pr:P813 ?retrieved .
FILTER NOT EXISTS { ?b ?other [] . FILTER( ?other != pr:P813 && ?other != prv:P813 ) }
}
#title:Items containing date of birth referenced from NKC both as ID and as URL
SELECT ?item
WHERE {
?item wdt:P691 ?nkc ; p:P569 [ prov:wasDerivedFrom ?ref1, ?ref2 ] .
?ref1 pr:P854 ?url . FILTER(CONTAINS(STR(?url), "aleph.nkp.cz"))
?ref2 pr:P691 ?nkc .
}
#title:Some items containing date of birth referenced from two URLs wrongly in the same reference
SELECT DISTINCT ?item ?itemLabel ?itemDescription
WHERE {
?item wdt:P396 [] ; p:P569 [ prov:wasDerivedFrom [ pr:P854 ?u1, ?u2 ] ] . FILTER(?u1 != ?u2)
MINUS { ?item wdt:P106 ?occupazione } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
ORDER BY ?itemLabel
#title:Items with redundant dates of death referenced only with Open Library, to be removed (note: run on QLever)
SELECT ?item ?date (COUNT(DISTINCT ?ref) AS ?nref)
WHERE {
?item p:P570 ?st, ?st2 . ?st2 prov:wasDerivedFrom ?ref3 . MINUS { ?ref3 pr:P143 ?wp } .
FILTER(?st != ?st2 && YEAR(?date) = YEAR(?date2))
?st ps:P570 ?date ; prov:wasDerivedFrom ?ref, ?ref2 . ?ref2 pr:P648 ?v . ?st2 ps:P570 ?date2 .
}
GROUP BY ?item ?date
HAVING(?nref = 1)
Years instead of complete dates
[edit]SELECT ?person ?personLabel ?sdy ?edy
WHERE {
?person p:P69 [ ps:P69 wd:Q1576779 ; pq:P580 ?sd ; pq:P582 ?ed ] .
BIND(YEAR(?sd) AS ?sdy)
BIND(YEAR(?ed) AS ?edy)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ?sdy
Dates with possible qualifiers
[edit]#title:Birth date referenced, only one having best rank, with precision year or higher and possible precision qualifiers
SELECT ?id ?person ?date ?prec ?source_condLabel ?refineLabel ?low_limit ?high_limit
WHERE {
?person wdt:P5739 ?id .
?person p:P569 ?st . ?st prov:wasDerivedFrom ?ref ; a wikibase:BestRank ; psv:P569 [ wikibase:timePrecision ?prec ; wikibase:timeValue ?date ] .
OPTIONAL { ?st pq:P1480 ?source_cond } .
OPTIONAL { ?st pq:P4241 ?refine } .
OPTIONAL { ?st pq:P1319 ?low_limit } .
OPTIONAL { ?st pq:P1326 ?high_limit } .
FILTER NOT EXISTS { ?person p:P569 ?st2 . ?st2 a wikibase:BestRank . FILTER( ?st2 != ?st ) }
FILTER(?prec IN ("9"^^xsd:integer, "10"^^xsd:integer, "11"^^xsd:integer))
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?date
Dates with precision lower than day
[edit]#title:SBN people with birth date having a precision lower than day
SELECT ?item
WHERE {
?item wdt:P396 [] ; p:P569 ?st . ?st a wikibase:BestRank ; psv:P569 [ wikibase:timePrecision ?prec ; wikibase:timeValue ?date ] .
FILTER(?prec IN ("7"^^xsd:integer, "8"^^xsd:integer, "9"^^xsd:integer, "10"^^xsd:integer))
}
SELECT ?item ?label ?dn ?dm ?active WHERE {
?item p:P569 ?stdn; p:P570 ?stdm; wdt:P106 ?activity .
VALUES ?activity { wd:Q175151 wd:Q1229025 wd:Q998550 wd:Q2516866 wd:Q40881196 } .
?stdn a wikibase:BestRank ; psv:P569 [ wikibase:timePrecision ?precn ; wikibase:timeValue ?dn ] .
?stdm a wikibase:BestRank ; psv:P570 [ wikibase:timePrecision ?precm ; wikibase:timeValue ?dm ] .
FILTER(?precn IN ("7"^^xsd:integer, "8"^^xsd:integer, "9"^^xsd:integer, "10"^^xsd:integer))
FILTER(?precm IN ("7"^^xsd:integer, "8"^^xsd:integer, "9"^^xsd:integer, "10"^^xsd:integer))
BIND ((YEAR(?dm)-YEAR(?dn)) AS ?active) .
FILTER (YEAR(?dm)<1600) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it" . ?item rdfs:label ?label }
}
Dates showed with year precision
[edit]SELECT ?person ?year
WHERE {
?person p:P569/psv:P569 [ wikibase:timePrecision "9"^^xsd:integer ; wikibase:timeValue ?time ] .
BIND(YEAR(?time) AS ?year)
}
LIMIT 10
SELECT DISTINCT ?i ?iLabel ?year ?precisedate {
?i wdt:P39/wdt:P279 wd:Q16707842 .
?i p:P569/psv:P569 [ wikibase:timePrecision "9"^^xsd:integer ; wikibase:timeValue ?time ] . BIND(YEAR(?time) AS ?year)
?i p:P569/psv:P569 [ wikibase:timePrecision ?prec ; wikibase:timeValue ?precisedate ] . FILTER(?prec IN ("10"^^xsd:integer, "11"^^xsd:integer))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
#title:Morti recenti
SELECT ?q ?qLabel
(YEAR(?died) as ?ydied) (MONTH(?died) as ?mdied) (DAY(?died) as ?ddied) ?pdied
(YEAR(?born) as ?yborn) (MONTH(?born) as ?mborn) (DAY(?born) as ?dborn) ?pborn
?qDescription ?podLabel ?pod ?podnazioneLabel ?pobLabel ?pob ?pobnazioneLabel ?pusc
WHERE {
?q wdt:P5739 ?pusc ; p:P570/psv:P570 [ wikibase:timePrecision ?pdied ; wikibase:timeValue ?died ] .
OPTIONAL { ?q wdt:P20 ?pod . ?pod wdt:P17 ?podnazione . }
OPTIONAL { ?q p:P569/psv:P569 [ wikibase:timePrecision ?pborn ; wikibase:timeValue ?born ] . }
OPTIONAL { ?q wdt:P19 ?pob . ?pob wdt:P17 ?pobnazione . }
BIND (NOW() - "P3M"^^xsd:duration AS ?month_ago)
FILTER (?died >= ?month_ago && ?died < NOW())
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
ORDER BY ?died
Persons with PUSC ID died in the last 30 days (query)
Dates with applied filters
[edit]#title:Mappa dei luoghi di nascita degli autori italiani morti nel 1952
#defaultView:Map{ "markercluster": true}
SELECT DISTINCT ?autore ?autoreLabel ?autoreDescription ?datanascita ?datamorte ?luogonascita ?luogonascitaLabel ?coord
WHERE {
?autore wdt:P27 ?p ; wdt:P570 ?datamorte ; ?id [] . VALUES ?p { wd:Q172579 wd:Q38 } . VALUES ?id { wdt:P214 wdt:P396 } .
FILTER ("1951-12-31"^^xsd:dateTime < ?datamorte && ?datamorte < "1953-01-01"^^xsd:dateTime)
OPTIONAL { ?autore wdt:P569 ?datanascita } .
OPTIONAL { ?autore wdt:P19 ?luogonascita . ?luogonascita wdt:P625 ?coord } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
#title:People born in 1950 with VIAF URL as source
SELECT *
WHERE {
?item p:P569 [ ps:P569 ?v ; prov:wasDerivedFrom [ pr:P854 ?url ] ] .
FILTER("1950-00-00"^^xsd:dateTime = ?v)
FILTER(REGEX(STR(?url), "viaf"))
}
Decades for counts
[edit]#title:Authors in IRIS SNS by decade of birth
#defaultView:BubbleChart
SELECT ?decennio (COUNT(?item) AS ?count)
WHERE {
?item wdt:P9761 [] ; p:P569/psv:P569 [ wikibase:timePrecision ?prec ; wikibase:timeValue ?birth ] .
FILTER(?prec IN ("9"^^xsd:integer, "10"^^xsd:integer, "11"^^xsd:integer))
BIND(YEAR(?birth) AS ?year).
FILTER(BOUND(?year)).
BIND(FLOOR(?year/10)*10 AS ?decade).
BIND(REPLACE(STR(?decade), "0","0s") AS ?decennio)
} GROUP BY ?decennio
ORDER BY ?decennio
Birth and death places on map
[edit]#defaultView:Map{ "markercluster": true}
SELECT ?person ?personLabel ?place ?placeLabel ?coord ?layer
WHERE {
{?person wdt:P69 wd:Q1576779 .
OPTIONAL { ?person wdt:P19 ?place . ?place wdt:P625 ?coord . bind("birth" as ?layer)} }
UNION
{?person wdt:P69 wd:Q1576779 .
OPTIONAL { ?person wdt:P20 ?place . ?place wdt:P625 ?coord . bind("death" as ?layer)} }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
#title:Most frequent birth places for SBN authors
#defaultView:Map
SELECT DISTINCT ?l ?lLabel ?coord ?number ?layer
WITH
{
SELECT DISTINCT ?l ?lLabel ?coord (COUNT(DISTINCT ?item) AS ?number)
WHERE
{
?item wdt:P396 [] ; wdt:P19 ?l . ?l wdt:P625 ?coord .
}
GROUP BY ?l ?lLabel ?coord ?number
} AS %what
WHERE
{
INCLUDE %what
BIND( IF(?number < 6, "1-5", IF(?number < 21, "6-20", IF(?number < 51, "21-50","51+"))) AS ?layer)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
GROUP BY ?l ?lLabel ?coord ?number ?layer
ORDER BY DESC(?number)
Nestled selects
[edit]#title:Exclude single results
SELECT ?item ?place ?trec
WHERE
{
{
SELECT (count(DISTINCT ?item) AS ?items) ?place
WHERE
{
?item wdt:P31 wd:Q5 .
?item wdt:P3365 ?trec .
?item wdt:P19 ?place .
?place wdt:P131* wd:Q1273 .
}
GROUP BY ?place
HAVING (?items > 1)
}
?item wdt:P31 wd:Q5 .
?item wdt:P3365 ?trec .
?item wdt:P19 ?place .
}
#title:Places of birth for IRIS authors
SELECT DISTINCT ?l ?lLabel ?coord ?number ?layer
WITH
{
SELECT DISTINCT ?l ?lLabel ?coord (COUNT(DISTINCT ?item) AS ?number)
WHERE
{
?iris wikibase:directClaim ?irisst ; wdt:P1629 [ wdt:P408 wd:Q107492957 ] .
?item ?irisst ?irisid .
?item wdt:P19 ?l . ?l wdt:P625 ?coord .
}
GROUP BY ?l ?lLabel ?coord ?number
} AS %what
WHERE
{
INCLUDE %what
BIND( IF(?number < 6, "1-5", IF(?number < 16, "6-15", IF(?number < 26, "16-25","26+"))) AS ?layer)
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
}
GROUP BY ?l ?lLabel ?coord ?number ?layer
ORDER BY DESC(?number)
#title:Authors in IRIS SNS by presence in VIAF members
#defaultView:BubbleChart
SELECT ?bibp ?bib (COUNT(?item) AS ?count)
WHERE {
{ SELECT ?bibp ?bib WHERE { ?bibp wdt:P31 wd:Q55586529 ; p:P1552 [ ps:P1552 wd:Q26921380 ; pq:P3295 ?bib ] . } }
?item wdt:P9761 [] ; ?bibst [] . ?bibp wikibase:directClaim ?bibst .
} GROUP BY ?bib ?bibp
ORDER BY ?count
URL or ID contains
[edit]#title:SBN IDs from BNCF not qualified
SELECT DISTINCT ?item ?itemLabel ?vid ?ind
WHERE {
?item wdt:P31 wd:Q5 ; p:P396 [ ps:P396 ?vid ; pq:P1810 ?ind ] .
FILTER(CONTAINS(?vid, "CFI"))
FILTER(!REGEX(?ind, "<"))
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
ORDER BY ?itemLabel
#title:URL contains
SELECT ?p ?site
WHERE {
?p wdt:P5739 ?pusc .
?p wdt:P973 ?site .
FILTER(!REGEX(STR(?site), "mcnbiografias"))
#FILTER(CONTAINS(STR(?site),"mcnbiografias"))
}
ORDER BY ?site
#title:reference URL contains
SELECT ?item ?prefet ?site
WHERE {
?item wdt:P4944 ?prefet .
?item p:P569 ?db .
?db prov:wasDerivedFrom ?ref .
?ref pr:P854 ?site .
FILTER(CONTAINS(STR(?site),"francearchives.fr/fr/facomponent/"))
}
ORDER BY ?site
#title:reference URL instead of ID
SELECT ?ref ?url ?id
WHERE {
?ref prov:wasDerivedFrom [ pr:P248 wd:Q104074149 ; pr:P854 ?url ].
BIND (REPLACE(STR(?url),"^.*/([0-9]+)[-/].*$","$1") as ?id)
}
Order IDs by number
[edit]#title:Order by number
SELECT ?item ?itemLabel ?value
{
?item wdt:P5492 ?value .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" }
}
ORDER BY xsd:integer(?value)
Sitelinks and badges
[edit]SELECT ?item ?article ?id
WHERE {
?item wdt:P8849 ?id .
?article schema:about ?item ; schema:isPartOf <https://bg.wikipedia.org/> .
}
SELECT ?item ?article ?id
WHERE {
?item wdt:P31 wd:Q44613 .
?de schema:about ?item ; schema:isPartOf <https://de.wikipedia.org/> .
MINUS { ?it schema:about ?item ; schema:isPartOf <https://it.wikipedia.org/> } .
}
SELECT ?item ?itemLabel ?article
WHERE {
?item wikibase:statements 0 .
?item wikibase:sitelinks 1 .
?article schema:about ?item ; schema:isPartOf <https://ca.wikipedia.org/> .
SERVICE wikibase:label { bd:serviceParam wikibase:language "ca". }
}
ORDER BY ?itemLabel
SELECT ?item1 ?item2
WHERE {
?article schema:about ?item2 ; schema:isPartOf <https://uk.wikipedia.org/> .
#?item1 wdt:P31 wd:Q5 .
#?item2 wikibase:statements 1 .
FILTER( ?item1 != ?item2 && STR( ?item1 ) < STR( ?item2 ) ) .
?item1 wdt:P2671 ?g .
?item2 wdt:P2671 ?g .
}
ORDER BY DESC(?item2)
SELECT ?item ?article ?badge
WHERE {
?item wikibase:statements 0 ; wikibase:sitelinks 1 .
?article schema:about ?item ; schema:isPartOf <https://el.wikipedia.org/> .
OPTIONAL { ?article wikibase:badge ?badge } .
}
ORDER BY DESC(?badge)
#title:Encode of article titles
SELECT DISTINCT ?item ?itlabel ?articleurl ?article ?id
WHERE {
?item wdt:P3360 ?id ; rdfs:label ?itlabel . FILTER(LANG(?itlabel) = "it")
?articleurl schema:about ?item ; schema:isPartOf <https://it.wikipedia.org/> .
BIND(REPLACE(wikibase:decodeUri(SUBSTR(STR(?articleurl), 31)),"_"," ") AS ?article) .
}
Search in Wikipedia category
[edit]- Found working (at least from May 2019) - documentation in mw:MW2SPARQL (experimental project)
- Then not working (at least from June 2020): for alternatives (working, but much more complex indeed), see Wikidata:Request_a_query/Archive/2020/06#Search_in_Wikipedia_category
#title:Search in category
PREFIX mw: <http://tools.wmflabs.org/mw2sparql/ontology#>
SELECT DISTINCT ?item ?itemLabel {
hint:Query hint:optimizer "None" .
?cat schema:about wd:Q8882780
SERVICE <http://tools.wmflabs.org/mw2sparql/sparql> {
?page mw:inCategory ?cat
}
?page schema:about ?item .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it". }
}
|
#title:Search categories in category
PREFIX mw: <http://tools.wmflabs.org/mw2sparql/ontology#>
SELECT DISTINCT ?catit ?catitLabel {
hint:Query hint:optimizer "None" .
?cat schema:about wd:Q6969113 #catbase
SERVICE <http://tools.wmflabs.org/mw2sparql/sparql> {
?page mw:inCategory ?cat
}
?page schema:about ?catit .
?catit wdt:P31/wdt:P279* wd:Q4167836 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en,fr,de,ru,[AUTO_LANGUAGE]". }
}
ORDER BY ?catitLabel
|
External-ids without P9073
[edit]SELECT DISTINCT ?p ?pLabel ?si
WHERE {
?p wikibase:propertyType wikibase:ExternalId .
?p wdt:P1629 ?si .
?si wdt:P31 ?inst .
VALUES ?inst { wd:Q2352616 wd:Q8513 wd:Q3331189 wd:Q386724 wd:Q1789476 wd:Q121182 wd:Q170584 }
MINUS { ?p wdt:P9073 ?av . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY xsd:integer(?p)
VIAF members
[edit]#title:VIAF members
SELECT ?id ?idLabel ?cod
WHERE {
?id wdt:P31 wd:Q55586529 ;
p:P1552 [ ps:P1552 wd:Q26921380; pq:P3295 ?cod ] .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?cod
#title:Decrease of the number of VIAFs thanks to Wikidata
SELECT ?item (COUNT(DISTINCT ?viaf_ref) AS ?n_ref) (COUNT(DISTINCT ?viaf) AS ?n)
WHERE {
?item wdt:P69 wd:Q1576779 .
?item ?id [ prov:wasDerivedFrom [ pr:P214 ?viaf_ref ] ] .
?item wdt:P214 ?viaf .
}
GROUP BY ?item ?n_ref ?n
HAVING(?n_ref > ?n)
Best rank
[edit]SELECT DISTINCT ?elemento ?elementoLabel ?elementoDescription ?anno_nascita ?anno_morte ?luogo ?luogoLabel ?nw ?ni #?coord
WHERE {
?elemento wdt:P19 ?luogo .
?luogo wdt:P131* wd:Q16245 .
OPTIONAL { ?luogo wdt:P625 ?coord . }
?elemento wikibase:sitelinks ?nw . FILTER(?nw > 9)
?elemento wikibase:identifiers ?ni . FILTER(?ni > 9)
OPTIONAL { ?elemento p:P569 [ a wikibase:BestRank; psv:P569 [ wikibase:timeValue ?nascita ] ] . BIND(YEAR(?nascita) AS ?anno_nascita) }
OPTIONAL { ?elemento p:P570 [ a wikibase:BestRank; psv:P570 [ wikibase:timeValue ?morte ] ] . BIND(YEAR(?morte) AS ?anno_morte) }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
}
ORDER BY DESC(?ni)
Deprecated rank and qualifiers
[edit]#title:Deprecated rank with eventual motivation
SELECT ?item ?itemLabel ?gnd ?msLabel
WHERE {
?item p:P227 ?st .
?st wikibase:rank wikibase:DeprecatedRank .
?st ps:P227 ?gnd .
OPTIONAL { ?st pq:P2241 ?ms . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en". }
}
#title:Same value of VIAF present in two items, one good and the other deprecated as related to another subject
SELECT ?bad_item ?correct_item ?value
WHERE {
?bad_item ?p ?st .
?st ?ps ?value ; pq:P2241 ?reason . VALUES ?reason { wd:Q28091153 wd:Q35773207 } .
?correct_item ?wdt ?value .
wd:P214 wikibase:directClaim ?wdt ; wikibase:claim ?p ; wikibase:statementProperty ?ps .
}
ORDER BY ?bad_item
#title:One value with deprecated rank, no value with normal rank
SELECT ?item ?itemLabel ?gnd ?msLabel
WHERE {
?item p:P227 ?st .
?st wikibase:rank wikibase:DeprecatedRank .
?st ps:P227 ?gnd .
OPTIONAL { ?st pq:P2241 ?ms . }
MINUS { ?item p:P227 ?stt .
?stt wikibase:rank wikibase:NormalRank . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en". }
}
ORDER BY ?ms
#title:Same GND in two items, deprecated rank in the first, normal rank in the second
SELECT ?item1 ?item2 ?gnd ?msLabel
WHERE {
{ SELECT ?gnd
WHERE {
?item p:P227 ?stdep .
?stdep wikibase:rank wikibase:DeprecatedRank .
?stdep ps:P227 ?gnd .
} }
?item1 p:P227 ?stdep .
?stdep wikibase:rank wikibase:DeprecatedRank .
?stdep ps:P227 ?gnd .
OPTIONAL { ?stdep pq:P2241 ?ms . }
?item2 wdt:P227 ?gnd .
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en". }
}
ORDER BY ?msLabel
#title:Deprecated values sourced with Beweb, and corresponding correct values
SELECT DISTINCT ?item ?itemLabel ?pLabel ?deprecatedValueLabel ?BeWeB ?valueToUseLabel
WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
?item ?property ?deprecatedStatement .
?p wikibase:claim ?property ; wikibase:statementProperty ?stprop .
?deprecatedStatement ?stprop ?deprecatedValue ; prov:wasDerivedFrom ?ref ; wikibase:rank wikibase:DeprecatedRank .
OPTIONAL { ?item ?property ?normalStatement . ?normalStatement ?stprop ?normalValue ; wikibase:rank wikibase:NormalRank } .
OPTIONAL { ?item ?property ?preferredStatement . ?preferredStatement ?stprop ?preferredValue ; wikibase:rank wikibase:PreferredRank } .
BIND(COALESCE(?preferredValue,?normalValue) AS ?valueToUse).
?ref pr:P248 wd:Q77541206 .
?ref pr:P7796 ?beweb.
wd:P7796 wdt:P1630 ?fmt .
BIND(IRI(REPLACE(?beweb, CONCAT('(',?beweb,')'), ?fmt)) AS ?BeWeB) .
}
ORDER BY ?pLabel
Most-recently-created items containing something
[edit]#title:Most-recently-created items containing Parsifal cluster ID (P12458)
SELECT ?item ?itemLabel {
SERVICE wikibase:mwapi {
bd:serviceParam wikibase:endpoint "www.wikidata.org";
wikibase:api "Generator" ;
wikibase:limit "once" ;
mwapi:generator "search";
mwapi:gsrsearch "haswbstatement:P12458" ;
mwapi:gsrsort "create_timestamp_desc" ;
mwapi:gsrlimit "100".
?item wikibase:apiOutputItem mwapi:title.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(xsd:integer(SUBSTR(STR(?item), 33)))
Item creator
[edit]#title:item creator (complete information)
SELECT ?item ?creator ?timestamp ?edit_comment
WHERE
{
?input_item wdt:P9506 [] .
BIND(strafter(str(?input_item),"/entity/") as ?titles)
SERVICE wikibase:mwapi
{
bd:serviceParam wikibase:endpoint "www.wikidata.org" .
bd:serviceParam wikibase:api "Generator" .
bd:serviceParam mwapi:generator "allpages" .
bd:serviceParam mwapi:gapfrom ?titles .
bd:serviceParam mwapi:gapto ?titles .
bd:serviceParam mwapi:prop "revisions" .
bd:serviceParam mwapi:rvprop "user|timestamp|comment" .
bd:serviceParam mwapi:rvdir "newer" .
bd:serviceParam mwapi:rvlimit "1" .
?item wikibase:apiOutputItem mwapi:title .
?creator wikibase:apiOutput "revisions/rev/@user" .
?timestamp wikibase:apiOutput "revisions/rev/@timestamp" .
?edit_comment wikibase:apiOutput "revisions/rev/@comment" .
bd:serviceParam wikibase:limit "once" .
}
}
Properties by creation date
[edit]#title:Authority control properties for authority files, sorted by year of creation (approximate on the basis of milestones)
SELECT ?property ?propertyLabel ?number (YEAR(?date) as ?year) WITH {
SELECT ?property ?number (MIN(?milestone_) as ?milestone)
WHERE {
?property wdt:P31/wdt:P279* wd:Q96776953.
BIND(xsd:integer(strafter(str(?property),"P")) as ?number)
wd:Q73616850 wdt:P1114 ?milestone_ .
FILTER(?milestone_ > ?number)
} group by ?property ?number } as %i
WHERE
{
INCLUDE %i
wd:Q73616850 p:P1114 ?stat .
?stat ps:P1114 ?milestone .
?stat pq:P585 ?date
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Check merged items
[edit]SELECT DISTINCT ?item ?redirect
WHERE {
?redirect wdt:P31 wd:Q5 .
?redirect wdt:P1047 ?id .
?redirect wdt:P570 ?date_of_death .
?item owl:sameAs ?redirect .
?item schema:dateModified ?change .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
FILTER(?change > "2021-09-01T00:00:00Z"^^xsd:dateTime)
}
More
[edit]- Existing content items - cleaning (periodically)
- Italia > Regno d'Italia
- Italia (anacronistico)
- Mitologia greca
- Cittadinanza greca antica > Cultura greca antica
- occupation (P106)opera singer (Q2865819) da aggiungere: da tipo di voce
- Superfluous content in items - cleaning (periodically)
- occupation (P106)author (Q482980) superflua: scrittore + poeta + drammaturgo
- occupation (P106)writer (Q36180) superflua: Persée + BEIC + Delibris
- occupation (P106)musician (Q639669) superflua: compositore; sottoclasse liv. 1 di r.
- occupation (P106)singer (Q177220) superflua: cantante lirico
- occupation (P106)artist (Q483501) superflua: sottoclasse liv. 1 di r. + sottoclasse liv. 2 di r.
- occupation (P106)researcher (Q1650915) superflua: sottoclasse liv. 1 di r. + sottoclasse liv. 2 di r.
- occupation (P106)teacher (Q37226) superflua: sottoclasse liv. 1 di r. + sottoclasse liv. 2 di r.
- occupation (P106)scientist (Q901) superflua: sottoclasse liv. 1 di r. + sottoclasse liv. 2 di r.
- occupation (P106)biologist (Q864503) superflua: sottoclasse liv. 1 di r.
- Cath.
- occupation (P106)priest (Q42603) superflua: Cath.
- occupation (P106)presbyter (Q831474) superflua: Cath.
- occupation (P106)prelate (Q725440) superflua: Cath.
- Superfluous items
- Existing Wikimedia items - cleaning (periodically)
- Items to be created (periodically)
it.wiki | pl.wiki |
---|---|
Mistakes in library catalogs to be fixed
[edit]- Find humans with two ore more CONOR.SI IDs (excluding Slovenian and Italian persons) (query)
- Find humans with two ore more CONOR.SI IDs (only Italian persons) (query)
- Personal items with 2(+) ISNIs, 1(+) deprecated and having no references (query)
- Theologians with 2(+) ISNIs, without "subject named as" (query)
Things possibly to do
[edit]Routine
[edit]Queries for works in progress
[edit]Lists to be emptied
[edit]- Property talk:P214/Duplicates/humans
- Wikidata:Database reports/identical birth and death dates/1
- Wikidata:VIAF/cluster/possible VIAF-member conflations
- User:Epìdosis/Check merges
- User:Epìdosis/Check edits - see correctness of IP edits to existing labels/descriptions/aliases in items with 20+ sitelinks
- See also Wikidata:CopyClear/monitor
Imports to be checked
[edit]Check items not having VIAF ID (P214), potentially duplicates:
- Mathematics Genealogy Project ID (P549) (partials: 19th century, Pisa, no description, 2+ students and 1 or 2 IDs)
- query for Accademia delle Scienze di Torino ID (P8153)
- Archivio Storico Ricordi person ID (P8290) (generic, only with dates)
- query for Angelicum ID (P5731) Pontificia Università della Santa Croce ID (P5739) Unione Romana Biblioteche Scientifiche ID (P8750)
- query for Nationalmuseum Sweden ID (P2538)
- query for Teuchos ID (P2018)
- query for Frick Art Research Library Artist File ID (P7848)
- Biografías y Vidas new items
- some LC and VIAF could be recovered
- Humans with mul labels containing comma (probably wrong)
Queries to be checked
[edit]- Redundant values for "priest" as occupation (query)
- Members of religious orders with (sometimes) wrong "monk" as occupation (query)
- external-IDs by Wikidata item of this property (P1629) and applicable 'stated in' value (P9073)
- Academia Europæa members with 1 or 2 identifiers
- AKL references on birth but not death date
- Authors with P569 references with more than one URL in P854 due to MnM
- BEIC with birth/death dates and without VIAF
- BEIC "writers" without identifiers
- Semantic Scholar without other identifiers
- Catholic Hierarchy without sitelinks, birth/death dates, VIAF
- Catholic Hierarchy without sitelinks, before 1000
- Catholic bishops with sitelinks without Catholic Hierarchy
- Catholic Hierarchy cardinals check
- DBI articles with author string (items to be created)
- Researchers with ORCID, no other IDs and no works connected
- Persée from Mix'n'match without occupation
- Persée from Mix'n'match with description "writer" (similar one)
- Some US geologists without VIAF
- Check on VIAF deprecation reasons
- ZooBank authors without other identifiers
- Items in Italy with WLM ID and the same Commons category as one or more other items
Miscellany
[edit]Ancient world jobs
#Classical philologists without Open Library
SELECT ?item ?itemLabel ?birth ?death ?linkcount
WHERE {
?item wdt:P31 wd:Q5 .
?item wdt:P106 wd:Q16267607 .
OPTIONAL { ?item wdt:P569 ?birth . }
OPTIONAL { ?item wdt:P570 ?death . }
MINUS { ?item wdt:P648 ?op . }
?item wikibase:sitelinks ?linkcount . FILTER (?linkcount >= 1) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?linkcount)
- Problems with kings in ancient Greek mythology: I, II
- short name (P1813) for ancient Greek authors and related works: complete query
- Olympic champion (Q23905927) (after 400 BCE)
- Ancient Athenians (after Damasias)
- Checking ancient Greece duplicates
- From el.wiki: this Petscan list
- Checking ancient Roman people duplicates from this Petscan list
Greek mythology characters lonely items
- Greek mythology characters lonely items with de.wiki
- Ancient Greece without item de.wiki Done (N) 5/5/2017
- Greek mythology characters lonely items with el.wiki
- Ancient Greece without item el.wiki Done (N) 5/5/2017
- Greek mythology characters lonely items with en.wiki
- Ancient Greece without item en.wiki Done (N) 4/5/2017
- Greek mythology lonely items with eo.wiki Done 17/1/2017
- Greek mythology characters lonely items with es.wiki Done 4/1/2017
- Ancient Greece without item es.wiki Done (N) 5/5/2017
- Ancient Greece without item fi.wiki Done (N) 5/5/2017
- Greek mythology characters lonely items with fr.wiki Done 29/12/2016
- Ancient Greece without item fr.wiki Done (N) 5/5/2017
- Greek mythology lonely items with hu.wiki Done 11/1/2017
- Greek mythology characters lonely items with it.wiki
- Greek mythology lonely items with ja.wiki Done 19/1/2017
- Greek mythology lonely items with la.wiki Done 18/1/2017
- Greek mythology lonely items with lt.wiki Done 6/5/2017
- Greek mythology lonely items with nl.wiki Done 21/1/2017
- Greek mythology lonely items with pl.wiki Done 20/12/2016
- Greek mythology lonely items with pt.wiki Done 7/1/2017
- Greek mythology lonely items with ru.wiki
- Greek mythology characters lonely items with sk.wiki Done 26/12/2016
- Greek mythology characters lonely items with sr.wiki
- Greek mythology lonely items with sv.wiki Done 16/1/2017
- Greek mythology lonely items with tr.wiki Done 22/1/2017
- Greek mythology lonely items with uk.wiki Done 25/1/2017
Italy jobs
#URL contains
SELECT ?p ?site ?a ?b WHERE {
?p wdt:P973 ?site .
OPTIONAL { ?p wdt:P528 ?a . }
filter(contains(str(?site),"dati.beniculturali.it/iccd/cf/resource/CulturalInstituteOrSite/"))
}
Book authors jobs
#OpenMLOL author merges
SELECT ?item (GROUP_CONCAT(DISTINCT CONCAT("https://openmlol.it/autore/",?op); separator=", ") AS ?openmlol) (count(?op) AS ?num)
(GROUP_CONCAT(DISTINCT CONCAT("https://viaf.org/viaf/",?v); separator=", ") AS ?viaf) (count(?v) AS ?num2)
WHERE {
?item wdt:P3762 ?op .
OPTIONAL { ?item wdt:P214 ?v . }
#?article schema:about ?item .
#?article schema:isPartOf <https://it.wikipedia.org/> .
#SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}
GROUP BY ?item
HAVING(?num > 3)
ORDER BY DESC(?num2)
#Open Library author merges
SELECT ?item (URI(CONCAT("https://openlibrary.org/authors/merge?key=",GROUP_CONCAT(DISTINCT ?op; separator="&key="))) AS ?opurl) (count(?op) AS ?num)
WHERE {
?item wdt:P648 ?op .
?item wdt:P31 wd:Q5 .
?article schema:about ?item .
?article schema:isPartOf <https://it.wikipedia.org/> .
}
GROUP BY ?item
HAVING(?num > 1)
ORDER BY DESC(?opurl)
International Museum Day (IMD)
#title:IMD persons
SELECT DISTINCT ?a ?aLabel ?aDescription ?id ?viaf
WHERE {
?a wdt:P108 [ wdt:P31 wd:Q33506 ; wdt:P17 wd:Q142 ] ; wikibase:identifiers ?id .
#?a wdt:P106 wd:Q1650915 .
OPTIONAL { ?a wdt:P214 ?viaf } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?id ?aLabel
#title:IMD museums
SELECT DISTINCT ?item ?itemLabel ?viaf ?tr ?id
WHERE {
?item wdt:P31/wdt:P279* wd:Q33506 ; wdt:P17 wd:Q142 ; wikibase:identifiers ?id .
#?item wdt:P214 ?viaf .
?item wdt:P214 ?viaf .
OPTIONAL { ?item wdt:P3134 ?tr } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,fr". }
}
ORDER BY ?id ?itemLabel
Merges
[edit]- Categories: see Wikidata:WikiProject Duplicates/Possible duplicates
- Very short list with no false positives
- Short list with very few false positives
- Normal list with few false positives
Standard messages
[edit]- Hi! Thank you for the descriptions you added. Just two suggestions: descriptions should not start with the capital letter and should not end with "." (example). Thank you,
- Ciao! Grazie per le descrizioni che hai aggiunto! Ricorda però che, su Wikidata, l'iniziale della descrizione è normalmente minuscola (esempio), a meno che la parola non richieda di per sé la maiuscola. Grazie mille,
- Descriptions with wrong uppercase letters: {{subst:Uw-uppercase}}
In sospeso
[edit]- nuova proprietà "stato di conservazione libro": V + disc.
- riflettere sulle opere greche con titolo sia "grc" sia "la": H
- ridiscutere vincitori Olimpiadi antiche: V + disc.
- nuovo tool per connettere voce a categoria di grado superiore (sennò si va ad intuito, come sempre): V
- altro: 1, 2, 3
- consistency check: F
- Memento: Wikidata PPS2019, PPS2021
- Requests (old)
- migliorie a Petscan: etichette in più lingue contemporaneamente, come nelle Query (B); ricerca link esterni (B = B*); sostituzione dichiarazioni (B) - qualificatori e note (M); etichette in più lingue contemporaneamente e sostituzione dichiarazioni (M)
- nuovo supertool per categorie di diversi progetti: L, M -> in realtà si può fare, almeno in parte, con Query, cfr. sopra
- filters: items/unconnected pages; depth of categories; negative categories; (maybe) exclude some languages
- problemi quantitative metrical pattern (P2552): V1, V2 - needed a new datatype according to User:Phil wink/Quantitative scansion notes, se possibile
- Mix'n'match (and around)
- see Bitbucket issues
- most important:
- too many Greek-script labels
- autoupdate formatter URLs (e.g. this)
- allow formatter URL without a property
- various 2020 ideas
- other:
- specific catalogues: many, Hrvatska, SNK, SBN (needs marking as Q5), PTBNP
- check Auxiliary data matcher
- loading issues
- around: misinterpretation of GND fields
- QuickStatements: issue with running from Shell
Promemoria
[edit]Omonimie
[edit]- Esempi di omonimie risolte (anche in SBN; cfr. soprattutto SBNV a partire da SBNV088181): Heraclitus; Luigi Vannutelli; Francesco Tirelli; Vincenzo Torrieri; Domenico Cardella; Domenico Berardi; Elvio Calderoni; Adele Bianchi; Giuseppe Bini; Mario Carelli; (Marco Bernardi); Paola Valentini; Carlo Baldini; Federica Fontana; Pietro Longo; Lorenzo Fontana; Fabio Marchetti; Alberto Castelli; Paolo Gasparini; Luigi Ventura; Carlo Rossetti; Nicola Cipriani (cfr. 1, 2, 3, 4); Giovanni Persico; Giovanni Cecchini; Mauro Moroni; Michele Mancini; Franco Viola; Gaetano Capasso; Piero/Pietro Nelli; Domenico Cambareri; Andrea Lazzarini; Paolo Rotta; Alberto Olivetti; Paolo Bernardi; Pierre Brunet; Giuseppe Mirabelli; Giuseppe Mirabella; Andrea Giordano; Piero Schiavazzi; Giuseppe Guicciardi; Francesco D'Alessio; Franco Monaco; Mario Calvetti; Angelo Rubino; Giuseppe Solarino; Mario Corsi; Peter Wolf; Giuseppe Ricci; Francesco Cappa; Franco Fossati; Francesco Capalbo; Emilio Zanette; Domenico Bartolini; Luigi Miraglia; Giuseppe Boni; Carlo Ruggiero; Stefano Bartolini; Angelo Maggi; Antonio Piazza; Piero Donnini; Vittorio Cantù; Cesare Manzoni; Giuseppe Patanè; Antonio Pelliccia; Carlo Mauri; Mario Tosi; Carmine Guarino; Vincenzo Festa; Vittorio Fontana; Domenico Spada; Carlo Ambrosoli; Matteo Guidotti; Giuseppe Padovani; Alessandro Franceschini; Giuseppe Osella; Luigi Napolitano; Pietro De Angelis; Giovanni Caselli; Francesco Bettini; Luigi Belloni; Luigi Giannelli; Pál Demény/Paul Demeny; Giovanni Anfossi; Giuseppe Amadei; Thomas Arnold; Giuseppe Cosentino; Marco Treves
- Omonimie agli onori delle cronache: Bruno Segre (Morning, 25 agosto 2023; cf. GND); Gigi Riva (Morning, 24 gennaio 2024; cf. GND)
Ontologia
[edit]- Esempi di conflazioni risolte nell'ontologia di Wikidata: resistance (Q21168880) vs resistance movement (Q138796); labor mobility (Q282773) vs occupational mobility (Q3317685); youth movement (Q2967401) vs youth organisation (Q1572070); unaccompanied minor (Q370325) vs unaccompanied refugee minors (Q123921343); floor (Q217164) vs paver (Q3328263) e dintorni (cfr. tabella); active galactic nucleus (Q46587) vs active galaxy (Q130640765)
Miscellanea
[edit]- Unioni e conflazioni
- Esempi di unione multipla: Category:Roman lawyers (Q6176947); Category:Austrian diplomats (Q6258819); Category:Titans (mythology) (Q7214279); Category:Ancient civilizations (Q8251500); Category:Belgian draughtsmen (Q8989377); Category:Bruttii (Q9023979); Category:Latvian psychologists (Q9045962); Category:British cosmologists (Q9126321); Category:Cities (Q9126476); Category:Pauline epistles (Q9210486); Category:Newspapers published in North America (Q9245784); Q9685534; Phoenix of Colophon (Q10287061); Category:Religion in Beirut (Q20183009); Gaius Julius Iullus (Q20819686); Category:Zara Larsson (Q27946661); Archelaus (Q3413787); Giorgio Coresio (Q16332603); Ephraim (Q3589104); Luca Ciotti (Q56323302); Roger de Harlay de Cézy (Q15842844); Category:Bishops of Caesarea (Q9313135); mosaic development (Q9323411)
- Esempi di unione multipla in VIAF ID (P214): Julius Rufinianus (Q28131664); Marcellus of Side (Q6756482) e Apion (Q458108) e Ptolemaic dynasty (Q131976) e Lorenzini (Q104761035) e Aenesidemus (Q314467)! e John Pyamour (Q105424489) e Alcaeus of Mytilene (Q212872) e Vasily Yefanov (Q3820741)!! (si spera) - reminder of clustering issues for ancient authors
- Esempi di unione multipla in GND ID (P227): Hervé de Bourg-Dieu (Q961185) e Faustus of Mileve (Q1352750) (si spera)
- Esempi di unione non scontata: Adriaan Willems (Q17832928); Wawrzyniec Cezary Anichini (Q5767228)
- Esempi di possibile conflazione: Katharina Faber (Q75374343)
- Esempi di conflazione risolta: Silvia Panichi (Q109659579)/Silvia Panichi (Q109659647)
- Esempi di confusione terminologica risolta: resistance movement (Q138796)/resistance (Q21168880)
- Riferimenti e dintorni
- Esempi di dati con diversa classificazione: Johannes van Heeck (Q1698718)
- Esempi di gestione di fonti divenute obsolete: Francesco Porcellini (Q41617642)
- Esempi di gestione di fonti molto disparate: Jerónimo Bautista Lanuza (Q6185637); Lodovico Martelli (Q19357719)
- Showcase item: Pachōmios Rousanos (Q16332467); Richard Hubbard Howland (Q106315581); Marco Salvadori (Q102404974)
- Doppio cognome: Sally Engle Merry (Q3469975)
- Riferimento da immagine: Cornelia Augusta Betts (Q85430571)
- Riferimento da consenso: Arnold Labrie (Q68596049)
- Riferimento da codice fiscale: Carolina Megale (Q109378461)
- Riferimenti disparati: Alessandro Marcantoni (Q61477465); Mario Tabanelli (Q107630366)
- Stranezze antichistiche: Archilochus (Q108577191)!; Lucius Apronius (Q105800560)
- Rimozione di note duplicate: Q156214
- Identificativi e loro problemi
- Aggiunta di più identificativi: Vespasiano Anfiareo (Q4010367); Joannes Maxentius (Q3279558); Daphne Rose Kingma (Q16508849); Branimir Livadić (Q12628268); Jacob of Lilienstein (Q89371663); Alexander Navrotsky (Q4311436); Fedor Gilʹtebrandt (Q21637882); Marin a Cutheis (Q61064269); Meletius (Q41617105); Biancamaria Scarcia Amoretti (Q647293); C. de Bridia (Q9183747); Marcus of Otranto (Q104113323); Bartolomeo da Colle (Q92475342); Vincenzo Caccianemici (Q7925228); Georgios Voustronios (Q16332497); Christodoulos Pablekis (Q12886220); Sulaymān ibn Ḥasan Ghazzī (Q8333954); Luigi Andruzzi (Q97959116); Albertas Diblinskis (Q12647343); Esayi Nchʻetsʻi (Q13052752); Deodat Nersesowicz (Q9206035)
- Creazione con più identificativi: Basilius Minimus (Q95564789); Isidoro Isolani (Q96627040); Julian of Vézelay (Q96759405); Innocenzo Taurisano (Q97101277); Antonio Cometta (Q99748561); Gordon McNeil Rushforth (Q102069316); Gianfranco Adornato (Q104379626); Augusto Balsamo (Q104688205); Agatangelo da Langasco (Q105151307); Clodomiro Albanese (Q105151954); Vera Horvat-Pintarić (Q105763899); Idung of Prüfening (Q106230779); Gasparo Sardi (Q106463333); Thomas Tuscus (Q107008683); Isaac Iudaeus (Q107353297); Antonio Rimoldi (Q107604513); Beniamino Zambetti (Q107741228); Luigi Abele Redigonda (Q108527404)
- Aggiunta di più Treccani: Mu'tazila (Q668460)
- Diffusione di errori da parte del VIAF: Roberto Gatti (Q93239374); about 1950!
- Diffusione di errori a partire da Wikidata: wrong birth dates from VIAF
- Sistemazione del VIAF probabilmente grazie a Wikidata: Angelo Maria Ardovino (Q107441474)
- Esempio di VIAF che confla omonimi "complementari" (stesso nome, ma opere e dati anagrafici del tutto distinti): 63782580 (= Carlo Aquino (Q3544160): Filipino actor (1985-) + Carlo Aquino (Q118163042): Italian Jesuit (1947-))
- Sdoppiamenti errati di persone risolti su Wikidata: Armand-Benjamin Caillau (Q4792633)
- Raddrizzamento di errori negli OPAC: Claudio Bellinati (Q106694725) (v; soluzione); Ragnar Holte (Q5812540) (= VIAF: persona che più fonti hanno fatto morire con 51 anni di anticipo!)
- Riconoscimento di iniziali puntate: Francesco Bonciarelli (Q109645865)
- [Errori di stampa nei libri: SBN = SHARE (1981 per 1881)]
- Listina parziale SBN invisibili: 80 al 22/11/2021
- Ontologia
- Modello di "X in paese Y": Abortion in Belarus (Q625851) + abortion by country (Q123237961) oppure photography in South Africa (Q17152824)
- Ecc.
- Tentativi di rimuovere info anagrafiche referenziate da elementi di persone viventi (cfr. disc.): Q106806996 (cfr. RD), Q106612713, Q57075583 (es. corretto, fonti non più esistenti)
- 1 millionth (28/3/2020)
- Forse recuperabili in futuro: Q72414747 ("Alessandro Masala"), Q89871561 ("Bhavik Sarkhedi"), Q96207225 ("Marco D'Elia"), Q88061504 ("Vox Italia"), Q109941711 ("Omri Raiter"), Q95114897 as linked from The Swiss library context between innovation and tradition: the Swiss National Library and the Münstergasse Library of Bern (Q94998762)
- Spogli di riviste: http://www.istitutodatini.it/biblio/riviste/htm/elenco.htm#a
Idee di tesi su Wikidata
[edit]Quattro proposte di tesi su Wikidata
- uso prosopografico di Wikidata: dato un corpus di persone definito da una fonte (suggerirei una fonte cartacea, es. un dizionario biografico; segnalo a mo' di esempi http://id.sbn.it/bid/BVE0572891 http://id.sbn.it/bid/BVE0583468 http://id.sbn.it/bid/BVE0572891 http://id.sbn.it/bid/RAV1956670), si inseriscono in Wikidata tutte le persone descritte nella fonte, desumendo da essa i dati anagrafici ed eventuali altre info significative (es. per i soprintendenti si aggiungerebbe la carica di soprintendente con anno di inizio e fine); alla fine del lavoro si stendono delle query per studiare il corpus di persone in questione (esempi: la percentuale di donne; quanti sono nati in quale regione; quanti soprintendenti nati in regione X hanno svolto la loro carica nella medesima regione; ecc.); nella tesi si documenta il lavoro svolto su Wikidata nelle sue varie fasi e si aggiunge una sezione sui dati che è stato possibile ottenere dalle query SPARQL, dimostrando che strutturare i dati in Wikidata permette di fare studi statistici altrimenti impossibili; è un'opzione secondo me facile e che può dare risultati interessanti
- allineamento tra ontologia di Wikidata e thesaurus: si prendono un thesaurus generalista (prima opzione sicuramente il Nuovo Soggettario) e/o un thesaurus settoriale, si definisce un gruppo di termini su cui lavorare (es. termine X e tutti i narrower terms ricorsivamente subordinati ad esso), dopodiché si sincronizzano tutti quei termini con Wikidata, cercando al contempo di sistemare l'ontologia di Wikidata in quel settore; nella tesi si descrivono il lavoro svolto e le difficoltà incontrate, soffermandosi magari su alcuni casi specifici (es. termini molto simili che è stato difficile modellare in modo soddisfacente, magari perché fonti diverse erano in disaccordo sulla loro definizione); può essere molto interessante provare a coinvolgere lo staff del/dei thesaurus su cui si lavora, soprattutto per discutere i casi più problematici
- uso bibliografico di Wikidata: si prende un insieme di citazioni bibliografiche già disponibile in forma strutturata (.ris, o almeno in Excel o simili), può trattarsi di una bibliografia su un dato argomento oppure dello spoglio di un tot di numeri di una rivista; l'opzione di lavorare sugli articoli di una sola rivista, o di poche riviste, è ovviamente più facile rispetto a gestire una bibliografia che contenga tipologie di pubblicazioni diverse (monografie, articoli, capitoli di libri ecc.); consiglio di lavorare su pubblicazioni di ambito umanistico perché è un settore quasi del tutto scoperto in Wikidata e perché è anche un settore in cui, mancando spesso buoni database bibliografici aperti, strutturare bene tali dati in Wikidata può essere di grande importanza; si importano tali citazioni bibliografiche in Wikidata, possibilmente usando strumenti di import semiautomatici (OpenRefine e/o QuickStatements), e si effettua una revisione manuale, particolarmente importante per sistemare autori omonimi e per linkare le varie pubblicazioni ai loro argomenti; nella tesi si descrive il lavoro svolto nelle sue varie parti e si possono discutere delle query che fanno statistiche es. sugli argomenti più frequenti delle pubblicazioni, sulle provenienze degli autori ecc.
- Wikidata:Gruppo Wikidata per Musei, Archivi e Biblioteche/Riviste di biblioteconomia (+ articolo https://doi.org/10.36253/jlis.it-509 che usa dati inseriti nel progetto)
- Wikidata:Gruppo Wikidata per Musei, Archivi e Biblioteche/Riviste FUP
- confronto tra Wikidata e uno o più database: si prende un insieme di elementi di Wikidata (consiglierei elementi di persone) definiti da una query; per tali elementi si sceglie un identificatore X che contenga dati strutturati (io consiglio un authority file, che quindi abbia dati in MARC21 o UNIMARC; es. SBN); a seconda della preferenza, si può scegliere un campione di elementi di Wikidata che abbiano già tutti l'identificatore X (esempio di query: tutti i filologi classici italiani che abbiano l'identificatore X), oppure si può scegliere il campione e poi si verifica, nei casi in cui l'identificatore X manca, se manca perché non esiste veramente oppure se esiste lo si aggiunge (esempio di query: tutti i filologi classici italiani; dove manca X, si cerca se X esiste e lo si aggiunge nei casi in cui lo si trova); ovviamente la prima opzione è più veloce; una volta che si hanno tutte le corrispondenze tra Wikidata e X, si fanno delle analisi sulla completezza dei dati forniti da Wikidata e da X (per Wikidata è facile, si possono usare query SPARQL; per X bisogna scaricare con uno scrape tutti i singoli identificatori e poi scrivere un programma per fare queste stesse analisi); nella tesi si presentano i risultati dell'analisi svolta; ovviamente nulla vieta di confrontare Wikidata non con un solo database X, ma con due o tre database X Y Z ...
- https://doi.org/10.6092/issn.2283-9364/15078 (articolo contenente un breve confronto tra i dati di Wikidata e SBN)