User:Hsarrazin/SPARQL
- https://w.wiki/4zRD (galerie du 166J des AD78 - alpha) https://w.wiki/7WAn (retrochrono) et Histropedia
tinyurl.com/yft9rpnj
- https://w.wiki/3FLh (Benezit à nettoyer)
- https://w.wiki/4GYy (causes de dépréciation)
- https://w.wiki/4Hej (personnes avec sourçage double "importé de" + "affirmé dans" - à nettoyer)
https://w.wiki/4Q7K (pour sortir la liste des personnes avec un certain nom -> P734/735)
Aides et guides
editet voir sur wikisource pour requêter https://data.bnf.fr/sparql/ -> discussion pour monter la requête
Badges mal appliqués
edit- Badges wikisource sur liens wp https://w.wiki/8gi
Lexèmes
edit- noms français sans genre grammatical https://w.wiki/4oKR
Sum of all paintings
edit- tableaux de Bernhard Strigel https://w.wiki/4oJN (il suffit de changer l'auteur)
Dates à traiter
editdate 1/1/1953 en siècle
editSELECT ?item ?itemLabel ?time
WHERE
{
?item p:P569/psv:P569 [wikibase:timePrecision 7 ; wikibase:timeValue ?time].
FILTER ( YEAR(?time) = 1953 ).
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
à copier/coller sur wdfist pour recherche par année
editSELECT ?item ?itemLabel WHERE { ?item wdt:P570 ?date. FILTER (year(?date) = 2016 )}
Date de naissance dans l'avenir
edittinyurl.com/jb8yjls
SELECT ?Person ?PersonLabel ?DateOfBirth WHERE {
?Person wdt:P31 wd:Q5.
?Person wdt:P569 ?DateOfBirth.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
FILTER(?DateOfBirth > (NOW()))
}
ORDER BY ?DateOfBirth
Date de décès dans l'avenir
edittinyurl.com/hsev4nm
SELECT ?Person ?PersonLabel ?DateOfDeath WHERE {
?Person wdt:P31 wd:Q5.
?Person wdt:P570 ?DateOfDeath.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
FILTER(?DateOfDeath > (NOW()))
}
ORDER BY ?DateOfDeath
Ecrivains lacunaires
edithttps://w.wiki/4oKA Auteurs avec P31 sourcé par importé + Bnf (à nettoyer)
doublons de viaf
edittinyurl.com/y9epdten
manque VIAF
edittinyurl.com/hgqknmf
PREFIX schema: <http://schema.org/>
SELECT ?item ?itemLabel WHERE {
?item wdt:P106 wd:Q201788.
?article schema:about ?item.
?article schema:isPartOf <https://fr.wikipedia.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
FILTER(NOT EXISTS { ?item wdt:P214 ?foo. })
}
Historiens manque VIAF
edittinyurl.com/j3p2def
# Historians with links to French Wikipedia or Wikisource, but missing VIAF id
SELECT ?item ?itemLabel WHERE {
?item wdt:P31 wd:Q5 .
?item wdt:P106 wd:Q201788 .
# Here we ask people with no VIAF id
FILTER NOT EXISTS { ?item wdt:P214 ?viaf . }
# But the ones we already know they don't have one show up anyway
# so we filter out people with "No value" for VIAF id
FILTER NOT EXISTS { ?item rdf:type wdno:P214 . }
?wikilink schema:about ?item .
{ ?wikilink schema:isPartOf <https://fr.wikisource.org/> . } UNION {
?wikilink schema:isPartOf <https://fr.wikipedia.org/> . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr" . }
}
manque BNF
editPREFIX schema: <http://schema.org/>
SELECT ?item ?itemLabel ?dob WHERE {
?item wdt:P106 wd:Q201788.
?item wdt:P27 wd:Q142.
OPTIONAL {?item wdt:P569 ?dob.}
?article schema:about ?item.
?article schema:isPartOf <https://fr.wikipedia.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
FILTER(NOT EXISTS { ?item wdt:P268 ?bnf. })
}
ORDER BY DESC(?dob)
VIAF manque ISNI
edittinyurl.com/yd3cacgd
SELECT ?item ?dod ?itemLabel ?itemDescription ?nom ?viaf
WHERE
{
?item wdt:P570 ?dod .
FILTER ( ?dod >= "2017-01-01T00:00:00Z"^^xsd:dateTime && ?dod <= "2017-12-31T00:00:00Z"^^xsd:dateTime )
?item wdt:P31 wd:Q5 .
?item wdt:P214 ?viaf.
OPTIONAL { ?item wdt:P1559 ?nom }
OPTIONAL { ?item wdt:P213 ?isni }
FILTER(!bound(?isni))
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
}
ORDER BY ASC(?dod)
Limit 2000
manque Langue d'expression
edittinyurl.com/zxb5sol
PREFIX schema: <http://schema.org/>
SELECT ?item ?itemLabel WHERE {
?item wdt:P106 wd:Q201788.
?article schema:about ?item.
?article schema:isPartOf <https://fr.wikipedia.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
FILTER(NOT EXISTS { ?item wdt:P1412 ?foo. })
}
Français (avec BNF) mais sans Langue d'expression
edittinyurl.com/zg3fjs8
# French people with a BNF ID and no spoken language
SELECT ?item ?itemLabel ?Bnf ?Naissance WHERE {
?item wdt:P31 wd:Q5 .
?item wdt:P268 ?Bnf .
?item wdt:P27 wd:Q142 .
?item wdt:P569 ?Naissance .
FILTER NOT EXISTS { ?item wdt:P1412 ?foo . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr, en" . } .
} ORDER BY DESC(?birthDate)
Projet Noms
edit- Dicare Nom de famille - recherche par pays -> QS
Noms à appliquer sur personnes
edit- noms non utilisés, à checker
tinyurl.com/y7eeqek8
1190 on 12:53, 5 November 2017 (UTC) - Noms de familles (propres) à vérifier sur wikidata
tinyurl.com/h74f9f4
Prénoms liés à revoir
editNote : modifier le code du prénom pour checker les liens...
tinyurl.com/ya7wgw6o
SELECT ?item ?label ?nom (LANG(?nom) AS ?nomLang) WHERE {
?item wdt:P735 wd:Q20187.
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fr,ru" .
?item rdfs:label ?label
}
OPTIONAL { ?item wdt:P1559 ?nom. }
}
LIMIT 2000
pour rechercher une chaîne de caractère au début d'un nom
editSELECT ?item ?itemlabel
WHERE {
?item wdt:P734 wd:Q16880652 . #Oda
?item rdfs:label ?itemlabel .
FILTER (lang(?itemlabel) = "ja").
FILTER(STRSTARTS(?itemlabel, '織田')) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "ja" . }
}
pour rechercher une chaîne de caractère à la fin d'un nom
editSELECT ?item ?orig
WHERE {
?item wdt:P734 wd:Q686223 . #Li
?item wdt:P1559 ?orig .
FILTER(STRENDS(?itemlabel, 'Li')) .
}
Divers
editEtudiants RADA n'ayant pas diplômé
edit- usage pour propriété "novalue"
tinyurl.com/gmaoed8
SELECT ?student ?studentLabel where {
?student p:P69 ?school .
?school ps:P69 wd:Q523926 .
?school rdf:type wdno:P512 .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
langues en alphabet latin
edittinyurl.com/y8gt94fm
les items avec badges (à revoir)
editSELECT ?item ?badge WHERE {
?article schema:about ?item .
?article wikibase:badge ?badge .
}
Outils de wikidata
edittinyurl.com/h4rpdkh
SELECT ?tool ?toolLabel ?URL WHERE {
?tool wdt:P31 wd:Q21073501.
OPTIONAL {
?tool wdt:P856 ?URL
}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
instance of (P31) manquant
edit- P21 sans P31
tinyurl.com/y74tc6ba
- vu le 14/1/2018 - P570 sans P31
tinyurl.com/yahxt2hs
- vu le 14/1/2018 - P569 sans P31
tinyurl.com/y7vlsqqs
problème avec sex or gender (P21)
edit- personnes avec sex or gender (P21)male organism (Q44148) (au lieu sex or gender (P21)male (Q6581097))
tinyurl.com/ybat6rlv
outinyurl.com/ydgpkvyt
- personnes avec P1559 (alphabet latin) sans genre
tinyurl.com/ycstqnwh
- peu de résultats - à lancer de temps en temps - dernier passage : 5/11/2017 - décès en 2018 sans P21
tinyurl.com/y7ssyxkj
- décès en 2016 sans P21tinyurl.com/yc7wc32j
- ORCID without P21
tinyurl.com/yd93fl82
libellés fr à ajouter
edit- décès en 2017 sans libellé français https://w.wiki/P$w
images à ajouter
edit- Décès en 2015, sans image
SELECT ?item ?itemLabel WHERE {
?item wdt:P570 ?date.
FILTER (year(?date) = 2015 )
MINUS { ?item wdt:P18 ?nat. }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .}
}
prénoms à ajouter
editPersonnes mortes en 2015 (à modifier) et sans prénom (à modifier)
edittinyurl.com/hqgs785
# personnes mortes en 2015, sans prénom, et sans label fr…
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?item ?itemLabel ?dod ?dob WHERE {
?item wdt:P31 wd:Q5.
?item wdt:P570 ?dod.
FILTER(NOT EXISTS { ?item wdt:P735 ?prenom. })
FILTER((?dod < "2016-00-00T00:00:00Z"^^xsd:dateTime) && (?dod >= "2015-00-00T00:00:00Z"^^xsd:dateTime))
OPTIONAL { ?item rdfs:label ?itemLabel . FILTER(LANG(?itemLabel)="fr") . }
OPTIONAL { ?item wdt:P569 ?dob.}
}
ORDER BY DESC(?dod)
personnes mortes ces 30 derniers jours, sans nationalité
edittinyurl.com/zuvhcvw
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?person ?personLabel ?died WHERE {
?person wdt:P31 wd:Q5;
wdt:P570 ?died.
MINUS {
?person wdt:P27 ?nationality.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
FILTER(?died >= ((NOW()) - "P30D"^^xsd:duration))
}
ORDER BY ?died
Décès des 7 derniers jours
edittinyurl.com/h6vt2ca
SELECT ?human ?humanLabel ?date
WHERE
{
?human wdt:P31 wd:Q5 .
?human wdt:P570 ?date .
FILTER(BOUND(?date) && DATATYPE(?date) = xsd:dateTime).
BIND(NOW() - ?date AS ?distance).
FILTER(0 <= ?distance && ?distance < 7).
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
} ORDER BY DESC (?date)
Décès en 2017, sans libellé FR
edittinyurl.com/yc8mh7dw
SELECT ?item ?dod ?itemLabel ?itemDescription ?nom
WHERE
{
?item wdt:P570 ?dod .
FILTER ( ?dod >= "1982-00-00"^^xsd:dateTime && ?dod <= "1982-12-31"^^xsd:dateTime )
?item wdt:P31 wd:Q5 .
OPTIONAL { ?item wdt:P569 ?v }
OPTIONAL { ?item wdt:P1559 ?nom }
FILTER(NOT EXISTS {
?item rdfs:label ?lang_label.
FILTER(LANG(?lang_label) = "fr")
})
SERVICE wikibase:label { bd:serviceParam wikibase:language "en,de,es,it,nl,pl". }
}
Auteurs wikisource
editListe des oeuvres/éditions (avec choix de l'auteur)
editOccupations par fréquence
edittinyurl.com/h3qeaqr
PREFIX schema: <http://schema.org/>
SELECT (COUNT(?item) AS ?count) ?occupation ?occupationLabel WHERE {
?item wdt:P31 wd:Q5.
?item wdt:P106 ?occupation.
?article schema:about ?item.
?article schema:isPartOf <https://fr.wikisource.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
} GROUP BY ?occupation ?occupationLabel
Pays par fréquence
edittinyurl.com/z7ybkq8
PREFIX schema: <http://schema.org/>
SELECT (COUNT(?item) AS ?count) ?pays ?paysLabel WHERE {
?item wdt:P31 wd:Q5.
?item wdt:P27 ?pays.
?article schema:about ?item.
?article schema:isPartOf <https://fr.wikisource.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
} GROUP BY ?pays ?paysLabel
Fonction par fréquence
edittinyurl.com/jhh3csr
PREFIX schema: <http://schema.org/>
SELECT (COUNT(?item) AS ?count) ?fonction ?fonctionLabel WHERE {
?item wdt:P31 wd:Q5.
?item wdt:P39 ?fonction.
?article schema:about ?item.
?article schema:isPartOf <https://fr.wikisource.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
} GROUP BY ?fonction ?fonctionLabel
Courants artistiques par fréquence
edittinyurl.com/hrtoqam
PREFIX schema: <http://schema.org/>
SELECT (COUNT(?item) AS ?count) ?mouvement ?mouvementLabel WHERE {
?item wdt:P31 wd:Q5.
?item wdt:P135 ?mouvement.
?article schema:about ?item.
?article schema:isPartOf <https://fr.wikisource.org/>.
SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
} GROUP BY ?mouvement ?mouvementLabel