Explorer DBpedia - projhistoire/Projet-Histoire GitHub Wiki

Requêtes d'exploration

Occupation : astronaute

PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX dbo: <http://dbpedia.org/ontology/>

SELECT DISTINCT ?thing_1 ?birthDate
WHERE { ?thing_1 dbo:occupation dbr:Astronaut .
    OPTIONAL { 
               ?thing_1 dbo:birthYear ?birthDate .
               }
      }

  • Cette requête liste 74 astronautes (22 novembre 2024)
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbp: <http://dbpedia.org/property/>
SELECT (COUNT(*) as ?effectif)
WHERE { ?thing_1 dbo:occupation dbr:Astronaut .
      }

Astronautes nés entre 1934 et 2007

PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbp: <http://dbpedia.org/property/>
SELECT DISTINCT ?thing_1 ?intYear
WHERE { ?thing_1 dbo:occupation dbr:Astronaut .
     ?thing_1 dbo:birthYear ?birthYear .
     BIND(xsd:integer(str(?birthYear)) AS ?intYear)
FILTER ( (?intYear >= 1934
###  La clause de filtre ci-dessous est commentée, i.e. non active. Décommenter pour l'activer
#              && ?intYear < 2007 
              ) ) }
ORDER BY ?intYear
  • L'effectif des astronautes (22 novembre 2024) étant né entre 1934 et 2007 est de 4/74
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX dbp: <http://dbpedia.org/property/>
SELECT (COUNT(*) as ?effectif)
WHERE {
  {SELECT DISTINCT ?thing_1
       WHERE {
    { ?thing_1 dbo:occupation dbr:Astronaut }
    UNION
    {?thing_1 dbp:occupation dbr:Astronaut}
          }
    }
 ?thing_1 dbo:birthYear ?birthYear .
 BIND(xsd:integer(str(?birthYear)) AS ?intYear)
FILTER ( (?intYear >= 1934 
  #        && ?intYear < 2007 
          ) ) }
ORDER BY ?intYear
  • Cette requête ci-dessus implique toujours un effectif de 4/74 (22 novembre 2024)

Liste: dbr:List_of_astronauts_by_name

PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?p ?o1 
WHERE { 
  dbr:List_of_astronauts_by_name ?p ?o1.
  ?o1 a dbo:Person.
  }
LIMIT 10

Effectif de la population

  • Effectif au 22 novembre 2024 : 489
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT (COUNT(*) as ?eff)
WHERE { 
dbr:List_of_astronauts_by_name ?p ?o1.
?o1 a dbo:Person.
  }

Propriétés sortantes et effectifs

PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?p1 (COUNT(*) as ?eff)
WHERE { 
dbr:List_of_astronauts_by_name ?p ?o1.
?o1 a dbo:Person;
    ?p1 ?o2.
  }
GROUP BY ?p1
ORDER BY DESC(?eff)
PREFIX dbp: <http://dbpedia.org/property/>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT (COUNT(*) as ?eff)
WHERE { 
dbr:List_of_astronauts_by_name ?p ?o1.
?o1 a dbo:Person;
  dbp:birthDate ?birthDate.
BIND(xsd:integer(SUBSTR(STR(?birthDate), 1, 4)) AS ?birthYear)
FILTER ( (?birthYear >= 1934
#            && ?birthYear < 2007
 ) ) 
      }
  • Effectif naissances 403

Astronautes et physiciens et biologistes

PREFIX dbp: <http://dbpedia.org/property/>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?o1 ?birthDate ?birthYear
WHERE { 
{
  {dbr:List_of_astronauts_by_name ?p ?o1.}
  UNION
  {dbr:List_of_physicists ?p ?o1.}
  UNION
        {?o1 ?p dbr:physicists.}
  UNION
        {?o1 ?p dbr:astronaut.}
  UNION
        {?o1 ?p dbr:biologist.}

}
?o1 a dbo:Person;
  dbp:birthDate | dbo:birthDate ?birthDate.
BIND(xsd:integer(SUBSTR(STR(?birthDate), 1, 4)) AS ?birthYear)
FILTER ( (?birthYear >= 1934
  #          && ?birthYear < 2007
            ) ) 
      }
ORDER BY ?birthYear
  • Effectifs : 810
PREFIX dbp: <http://dbpedia.org/property/>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT (COUNT(*) as ?effectif)
WHERE {
  SELECT DISTINCT ?o1 ?birthDate ?birthYear
  WHERE { 
    {
          {dbr:List_of_astronauts_by_name ?p ?o1.}
      UNION
          {dbr:List_of_physicists ?p ?o1.}
      UNION
          {?o1 ?p dbr:physicists.}
      UNION
          {?o1 ?p dbr:astronauts.}
      UNION
          {?o1 ?p dbr:biologists.}

    }
    ?o1 a dbo:Person;
      dbp:birthDate | dbo:birthDate ?birthDate.
    BIND(xsd:integer(SUBSTR(STR(?birthDate), 1, 4)) AS ?birthYear)
    FILTER ( (?birthYear >= 1934
       #         && ?birthYear < 2007
                
                ) ) 
          }
  }

Les propriétés

**Liste des propriétés sortantes **

PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?p1 (COUNT(*) as ?eff)
WHERE { 
    {
          {dbr:List_of_astronauts_by_name ?p ?o1.}
      UNION
          {dbr:List_of_physicists ?p ?o1.}
      UNION
          {?o1 ?p dbr:physicists.}
      UNION
          {?o1 ?p dbr:astronauts.}
      UNION
          {?o1 ?p dbr:biologists.}   
    }
?o1 a dbo:Person;
dbp:birthDate | dbo:birthDate ?birthDate;
    ?p1 ?o2.
BIND(xsd:integer(SUBSTR(STR(?birthDate), 1, 4)) AS ?birthYear)
FILTER ( (?birthYear >= 1934  )) 
  }
GROUP BY ?p1
ORDER BY DESC(?eff)

**Liste des propriétés entrantes **

PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?p1 (COUNT(*) as ?eff)
WHERE { 
    {
          {dbr:List_of_astronauts_by_name ?p ?o1.}
      UNION
          {dbr:List_of_physicists ?p ?o1.}
      UNION
          {?o1 ?p dbr:physicists.}
      UNION
          {?o1 ?p dbr:astronauts.}
      UNION
          {?o1 ?p dbr:biologists.}
    }
?o1 a dbo:Person;
dbp:birthDate | dbo:birthDate ?birthDate.
?o2 ?p1 ?o1.
BIND(xsd:integer(SUBSTR(STR(?birthDate), 1, 4)) AS ?birthYear)
FILTER ( (?birthYear >= 1934  )) 
  }
GROUP BY ?p1
ORDER BY DESC(?eff)

Propriétés au 22 novembre 2024

Lieu de naissance : http://dbpedia.org/ontology/birthPlace (Effectifs 794)

Occupation : http://dbpedia.org/ontology/occupation (Effectifs 633)

Date de naissance : http://dbpedia.org/ontology/birthDate (Effectifs 465)

Nationalité : http://dbpedia.org/ontology/nationality (Effectifs 92)

Education : http://dbpedia.org/ontology/education (Effectifs 21)

PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT ?propriete (COUNT(*) AS ?effectif)
WHERE {
  dbr:List_of_astronauts_by_name ?p ?astronaute.
  ?astronaute rdf:type dbo:Person; 
              ?propriete ?valeur.


  FILTER(?propriete IN (
    dbo:birthDate, 
    dbo:birthPlace, 
    dbo:nationality, 
    dbo:occupation, 
    dbo:education
  ))

  FILTER(STR(?valeur) != "")
}
GROUP BY ?propriete
ORDER BY DESC(?effectif)