Wikidata:WikiProject Archival Description/Use cases

From Wikidata
Jump to navigation Jump to search

 

Home

 

Data Structure

 

Typology

 

Data Sources

 

Use Cases

 

Tools & Tasks

 

Statistics

 

Wikipedia Infobox[edit]

Petscan[edit]

En utilisant Petscan, il est possible de savoir quels sont les éléments Wikidata qui sont archives at (P485) une institution donnée et dont la page Wikipédia réutilise ces valeurs.

Exemple :

Pour varier les exemples, il suffit de changer la valeur sous l'onglet Wikidata dans le champs "Uses items/props" dans la formule de l'exemple 1.

WDQS[edit]

SELECT DISTINCT * WHERE {
  hint:Query hint:optimizer "None".
  SERVICE wikibase:mwapi {
	bd:serviceParam wikibase:api "Generator" .
    bd:serviceParam mwapi:generator "search" .
    bd:serviceParam wikibase:endpoint "fr.wikipedia.org" .
    bd:serviceParam mwapi:gsrsearch "insource:Biographie2".
    bd:serviceParam mwapi:gsrlimit "max" .    
    bd:serviceParam mwapi:gsrnamespace "0" . 
    ?item wikibase:apiOutputItem mwapi:item .
  }
  ?item wdt:P485 wd:Q2860507.
  ?link schema:about ?item; schema:isPartOf <https://fr.wikipedia.org/>; schema:name ?title .
Try it!

Human in dans WP-ca[edit]

archives at (P485)

Personnalité dans WP-fr[edit]

archives at (P485)

GLAM (Archives) dans WP-fr[edit]

External ID[edit]

Voir explications en français.

Liste des institutions d'archives ayant délivrés des identifiants externes (triés par nombre de ID)[edit]

#Liste des institution d'archives ayant délivré (ou étant élément associé à) des identifiants externes (et leur nombre)
SELECT ?ArchivesLabel ?Archives (COUNT(distinct (?item)) AS ?total) (GROUP_CONCAT(DISTINCT ?itemLabel; separator=", ") as ?items) (GROUP_CONCAT(DISTINCT ?natureLabel; separator=", ") as ?natures) 
WHERE 
{
  {?item wdt:P2378 ?Archives.}
  UNION {?item wdt:P1629 ?Archives.}
    ?item wdt:P31 ?nature., on entend de manière générale

  OPTIONAL {?nature rdfs:label ?natureLabel. filter(lang(?natureLabel)="fr") }
  OPTIONAL {?item rdfs:label ?itemLabel. filter(lang(?itemLabel)="fr") }
  ?Archives wdt:P31/wdt:P279* wd:Q166118.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?items ?total ?natures ?ArchivesLabel ?Archives
ORDER BY DESC (?total)
Try it!

Résultats :

  • 88 (08.08.2020)

Liste des institutions d'archives ayant délivrés des identifiants externes (triés par pays)[edit]

#Liste des institution d'archives ayant délivré (ou étant élément associé à) des identifiants externes (trié par pays)
SELECT ?paysLabel ?ArchivesLabel ?Archives (COUNT(distinct (?item)) AS ?total) (GROUP_C, on entend de manière généraleONCAT(DISTINCT ?itemLabel; separator=", ") as ?items) (GROUP_CONCAT(DISTINCT ?natureLabel; separator=", ") as ?natures) 
WHERE 
{
  {?item wdt:P2378 ?Archives.}
  UNION {?item wdt:P1629 ?Archives.}
    ?item wdt:P31 ?nature.

  OPTIONAL {?nature rdfs:label ?natureLabel. filter(lang(?natureLabel)="fr") }
  OPTIONAL {?item rdfs:label ?itemLabel. filter(lang(?itemLabel)="fr") }
  ?Archives wdt:P31/wdt:P279* wd:Q166118;
            wdt:P17 ?pays.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?items ?total ?natures ?ArchivesLabel ?Archives ?paysLabel
ORDER BY ?paysLabel
Try it!
#Liste des institution d'archives ayant délivré (ou étant élément associé à) des identifiants externes (trié par pays). Moins les cinémathèques et en affichant leurs natures.
SELECT ?paysLabel ?ArchivesLabel ?Archives (GROUP_CONCAT(DISTINCT ?natureArchivesLabel; separator=", ") as ?nal)  (COUNT(distinct (?item)) AS ?total) (GROUP_CONCAT(DISTINCT ?itemLabel; separator=", ") as ?items) (GROUP_CONCAT(DISTINCT ?natureLabel; separator=", ") as ?natures) 
WHERE 
{
  {?item wdt:P2378 ?Archives.}
  UNION {?item wdt:P1629 ?Archives.}
    ?item wdt:P31 ?nature.

  OPTIONAL {?nature rdfs:label ?natureLabel. filter(lang(?natureLabel)="fr") }
  OPTIONAL {?item rdfs:label ?itemLabel. filter(lang(?itemLabel)="fr") }
  ?Archives wdt:P31/wdt:P279* wd:Q166118;
            wdt:P31 ?natureArchives;
            wdt:P17 ?pays.
  OPTIONAL {?natureArchives rdfs:label ?natureArchivesLabel. filter(lang(?natureArchivesLabel)="fr") }
  MINUS { ?Archives wdt:P31 wd:Q1352795}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?items ?total ?natures ?ArchivesLabel ?Archives ?paysLabel ?nal
ORDER BY ?paysLabel
Try it!

Liste des identifiants externes liées à des institutions d'archives (triés par nature)[edit]

#Liste des identifiants externes par nature délivrés par une institution d'archives ou dont cette institution est un élément associé
SELECT ?item ?itemLabel ?natureLabel ?ArchivesLabel ?Archives
WHERE 
{
  {?item wdt:P2378 ?Archives.}
  UNION {?item wdt:P1629 ?Archives.}
    ?item wdt:P31 ?nature.
  ?Archives wdt:P31/wdt:P279* wd:Q166118.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?natureLabel
Try it!

Nombre d'éléments disposant d'un identifiant externe XY[edit]

#Nombre d'éléments disposant d'un identifiant externe XY
SELECT (COUNT(distinct (?item)) AS ?total) 
WHERE 
{
  ?item wdt:P3029 ?ID_NAUK;
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Liste des éléments avec un indentifiant externe XY[edit]

  1. Éléments avec un indentifiant externe XY

SELECT ?item ?itemLabel ?natureLabel WHERE {

 ?item wdt:P3029 ?ID_NAUK;
       wdt:P31 ?nature.
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

} }}

Liste des éléments disposant d'un identifiant externe XY groupé par nature avec leur nombre[edit]

#éléments dispodant d'un identifiant externe XY classés par nombre par nature
SELECT ?natureLabel (COUNT(distinct (?item)) AS ?total) 
WHERE 
{
  ?item wdt:P3029 ?ID_NAUK;
        wdt:P31 ?nature
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?natureLabel ?total
ORDER BY DESC (?total)
Try it!

Liste des éléments de nature XY disposant d'un identifiant externe donné par une institution type archives[edit]

SELECT ?item ?itemLabel
WHERE {
  {
    ?item wdt:P31 wd:Q10648343;
        wikibase:identifiers ?identifiers.
  }
 UNION 
  {
    {?identifiers wdt:P2378 ?Archives.}
     UNION {?item wdt:P1629 ?Archives.}
    ?Archives wdt:P31/wdt:P279* wd:Q166118.
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Liste des éléments disposant d'un identifiant externe donné par une institution XY dont l'ID externe est affiché[edit]

  1. Liste des éléments avec un indentifiant externe XY dont on demande d'affiché cet ID

SELECT ?item ?itemLabel ?natureLabel ?ID ?link WHERE {

 ?item wdt:P1225 ?ID;
       wdt:P31 ?nature.
   wd:P1225 wdt:P1630 ?ffu .
   BIND(URI(REPLACE(?ffu,'\\$1',?ID)) AS ?link)
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }

} LIMIT 10 }}

Liste des éléments disposant d'un nombre donné d'identifiant externe[edit]

SELECT * WHERE {
  ?item wdt:P31 wd:Q5;
        wdt:P21 wd:Q6581072;
        wikibase:identifiers ?identifiers .
  FILTER( ?identifiers > 10 ) .
}
Try it!

Countries[edit]

Brazil[edit]

List of the archival fonds at the National Archives of Brazil (generated from Wikidata)

Canada[edit]

University of Ottawa Library[edit]

Canadian archive of Women in STEM

SELECT ?item ?itemLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?item wdt:P361 wd:Q63647303.
}
Try it!

Documentation

McGill Library Archival Collections[edit]

McGill University Library (Q6801308)

SELECT ?item ?itemLabel ?natureLabel ?nature
WHERE 
{
  {?item wdt:P485 wd:Q6801308} UNION {?item wdt:P485 wd:Q62535993} UNION {?item wdt:P485 wd:Q63644951} UNION {?item wdt:P485 wd:Q63644951} .
       ?item wdt:P31 ?nature.  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?natureLabel ?archivedBYLabel
Try it!

Documentation

University of Toronto Libraries Archival Collections[edit]

University of Toronto Libraries (Q7896490)

Queries individual institutions, using one the QIDs above:

SELECT ?archivesAtLabel ?itemLabel ?url ?item WHERE {
  ?item wdt:P485 wd:Q76005462;
        wdt:P485 ?archivesAt;
    p:P485 [
      pq:P973 ?url
   ].
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?itemLabel
Try it!

Documentation

Clara Thomas Archives and Special Collections, York University[edit]

Clara Thomas Archives and Special Collections (Q61467363)

SELECT ?item ?itemLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?item wdt:P485 wd:Q61467363.
}
Try it!

Documentation

Western Libraries Archives and Special Collections[edit]

University of Western Ontario Libraries (Q57939861)

SELECT ?item ?itemLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?item wdt:P485 wd:Q57939861.
}
Try it!

Documentation

France[edit]

Archives municipales déposées au sein des archives départementales[edit]

Comment documenter dans Wikidata, les fonds d'archives municipales déposés dans des archives départementales et les rendre requêtables via SPARQL?[1]

SPARQL Requête qui utilise la syntaxe de la proposition 2:

#Requête SPARQL sur l'ensemble des communes du département des Bouches-du-Rhône et les références des fonds déposés aux Archives départementales.
SELECT ?commune ?communeLabel ?serviceArchivesLabel ?numInventaire 
WHERE 
{
  ?commune wdt:P31/wdt:P279* wd:Q484170;
           wdt:P131 wd:Q3240;
           wdt:P485 wd:Q2860505.
  ?commune p:P485 ?declaration_serviceArchives.
  ?declaration_serviceArchives ps:P485 ?serviceArchives.
  OPTIONAL 
        {?declaration_serviceArchives pq:P217 ?numInventaire.
        
        }
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr". }
}
Try it!

Switzerland[edit]

United States of America[edit]

NARA[edit]

National Archives and Records Administration (Q518155)

Pilote project lead by Dominic Byrd-McDevitt.

Extern ID :

Organisation[edit]

SELECT ?item ?itemLabel 
WHERE 
{
  ?item wdt:P749 wd:Q518155.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Resultats : 42 (24.10.2019)

NARA P6759[edit]

NARA record group number (P6759)

#NARA P6759
SELECT ?item ?itemLabel ?natureLabel ?ID
WHERE 
{
  ?item wdt:P6759 ?ID;
        wdt:P31 ?nature.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY xsd:integer(?ID)
Try it!

Résultats : 571 (24.10.2019)

NARA P6761[edit]

NARA collection ID (P6761)

#NARA P6761
SELECT ?item ?itemLabel ?natureLabel ?ID
WHERE 
{
  ?item wdt:P6761 ?ID;
        wdt:P31 ?nature.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?ID
Try it!

Résultats :

  • 4'597 (06.07.2019)
  • 4'754 (21.11.2019)

NARA P1225[edit]

U.S. National Archives Identifier (P1225)

#NARA P1225
SELECT (COUNT(?item) as ?total)
WHERE 
{
  ?item wdt:P1225 ?ID.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Résults :

  • 146'227 (06.07.2019)
  • 429'295 (21.11.2019)
#NARA P1225
SELECT ?natureLabel ?total WITH { 
  SELECT ?nature (COUNT(?item) as ?total)
  WHERE 
  {
    ?item wdt:P1225 ?ID;
          wdt:P31 ?nature.
  } GROUP BY ?nature }  as %i
where 
{
  include %i
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC(?total)
Try it!
#NARA P1225
SELECT ?item ?itemLabel (GROUP_CONCAT(DISTINCT(?natureLabel); separator=", ") AS ?natures) ?ID
WHERE 
{
  ?item wdt:P1225 ?ID;
        wdt:P31 ?nature.
        OPTIONAL {?nature rdfs:label ?natureLabel. filter(lang(?natureLabel)="fr") }       
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?item ?itemLabel ?natures ?ID
LIMIT 5
Try it!
#NARA P1225
SELECT ?item ?itemLabel ?ID_NARA
WHERE 
{
  ?item wdt:P1225 ?ID_NARA;
        wdt:P31 wd:Q2668072.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?ID_NARA)
LIMIT 5
Try it!
#NARA P1225
SELECT ?niveau ?niveauLabel (COUNT(?item) AS ?total)
WHERE 
{
  ?item wdt:P1225 ?ID_NARA;
        wdt:P31 wd:Q2668072;
        wdt:P6224 ?niveau.  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?niveau ?niveauLabel
Try it!
#NARA P1225 example of series
SELECT ?item ?itemLabel
WHERE 
{
  ?item wdt:P1225 ?ID_NARA;
        wdt:P31 wd:Q2668072;
        wdt:P6224 wd:Q3511132.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 5
Try it!
#NARA P1225 repartition of the séries by part of elements
SELECT ?partie ?partieLabel (COUNT(?item) as ?total)
WHERE 
{
  ?item wdt:P1225 ?ID_NARA;
        wdt:P31 wd:Q2668072;
        wdt:P6224 wd:Q3511132;
        wdt:P361 ?partie.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?partie ?partieLabel
ORDER BY DESC(?total)
Try it!

Thematic Queries[edit]

Private Fonds[edit]

A SPARQL Query to watch the information on the people's archives donation on a territory:

#Liste des personnes (connues de Wikidata) nées ou mortes dans le Canton de Vaud (Suisse) avec leurs occupations et l'institution où sont déposées leurs archives
SELECT ?humain ?humainLabel ?lieuNaissanceLabel ?lieuMortLabel ?occ ?archive_at
WITH { SELECT ?humain (group_concat(distinct ?occupLabel;separator=", ") as ?occ) (group_concat(distinct ?archiveLabel;separator=", ") as ?archive_at) WHERE 
{
  ?humain wdt:P31 wd:Q5.
  OPTIONAL {?humain wdt:P106 ?occup.
            ?occup rdfs:label ?occupLabel. filter(lang(?occupLabel)="fr")}
  OPTIONAL {?humain wdt:P485 ?archive.
             ?archive rdfs:label ?archiveLabel. filter(lang(?archiveLabel)="fr")}
  {?humain wdt:P19 ?lieuNaissance.
  ?lieuNaissance wdt:P131 wd:Q12771.}
  UNION
  {?humain wdt:P20 ?lieuMort.
  ?lieuMort wdt:P131 wd:Q12771.}
  } group by ?humain  } as %i
WHERE {include %i
  OPTIONAL {?humain wdt:P19 ?lieuNaissance.}
  OPTIONAL {?humain wdt:P20 ?lieuMort.} 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr". }
} ORDER BY ?humainLabel
Try it!

DIVERS[edit]

#Trouve tous les éléments connus de Wikidata qui sont des "archives" (ou l'une de ses sous-classes) et affiche leur nom
SELECT ?item ?itemLabel
WHERE 
{
  ?item wdt:P31/wdt:P279* wd:Q166118.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!
#Trouve tous les éléments connus de Wikidata qui sont des "archives départementales"
SELECT ?item ?itemLabel 
WHERE 
{
  ?item wdt:P31 wd:Q2860456.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!
#Trouve tous les éléments connus de Wikidata qui sont des "archives communales"
SELECT ?item ?itemLabel 
WHERE 
{
  ?item wdt:P31 wd:Q604177.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!
  • membre de la collection
SELECT ?item ?itemLabel ?Institution ?InstitutionLabel
WHERE
{
?item wdt:P31 wd:Q2668072. # les item qui sont des collections
?item wdt:P195 ?Institution #qui dispose d'un rattachement à une collection
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Try it!
  • Personnes dont il est précisé quelles sont les institutions qui conservent les documents qu'elles ont produits (ou dont elles sont le sujet).
#Trouve toutes les personnes disposant de la propriété 'archivées par' (P805) et dont l'institution qui en est la valeur conserve des archives (Q166118)

SELECT DISTINCT ?personne ?personneLabel ?institution ?institutionLabel WHERE {
  ?personne wdt:P31 wd:Q5. #je cherche des êtres humains
  ?personne wdt:P485 ?institution. #ayant été "archivé par" une institution        
  ?institution wdt:P31*/wdt:P279* wd:Q166118. # une institution faisant partie de la (sous-)classe archives
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Try it!
  1. https://twitter.com/seeksanusername/status/1061533284230971392
  2. https://twitter.com/macgraveur/status/1061719115545620481
  3. https://twitter.com/b3d2c/status/1061739943725285376