Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
thatcamp_2014:requete_dbpedia [2014/08/31 11:05] Francesco Beretta [Nombre d'universités dans dbpedia live] |
thatcamp_2014:requete_dbpedia [2014/09/01 09:19] Francesco Beretta [Exploration] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | |||
+ | ====== Données exploitables ====== | ||
+ | |||
+ | |||
+ | ===== Production de données ===== | ||
+ | |||
+ | [31.08.2014] 3837 lignes si on enlève le limit | ||
+ | |||
+ | |||
+ | <code> | ||
+ | PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
+ | PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> | ||
+ | PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> | ||
+ | PREFIX dbpedia: <http://dbpedia.org/resource/> | ||
+ | PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
+ | PREFIX dbpprop: <http://dbpedia.org/property/> | ||
+ | |||
+ | SELECT * | ||
+ | WHERE | ||
+ | { SELECT DISTINCT ?s (strafter(str(?s), "http://dbpedia.org/resource/") AS ?id_name) ?name (xsd:float(strbefore(?point, " ")) AS ?lat) (xsd:float(strafter(?point, " ")) AS ?long) (max(?nombre_etudiants) AS ?nombre) | ||
+ | WHERE | ||
+ | { SERVICE <http://dbpedia-live.openlinksw.com/sparql> | ||
+ | { ?s dbpprop:type dbpedia:Public_university . | ||
+ | ?s <http://www.georss.org/georss/point> ?point | ||
+ | OPTIONAL | ||
+ | { ?s dbpprop:name ?name } | ||
+ | OPTIONAL | ||
+ | { { SELECT * | ||
+ | WHERE | ||
+ | { ?s dbpprop:students ?nombre_etudiants } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | GROUP BY ?s ?point ?name | ||
+ | LIMIT 10 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | {{:thatcamp_2014:resultat_corrige.csv.zip|Fichier nettoyé}}, utilisable dans QGIS (séparateur |) | ||
+ | |||
+ | |||
+ | |||
+ | ====== Exploration ====== | ||
+ | |||
+ | |||
+ | Point d'accès SPARQL : http://dbpedia-live.openlinksw.com/sparql | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Nombre d'universités dans dbpedia live ===== | ||
+ | |||
+ | |||
+ | |||
Chercher toutes les univesités | Chercher toutes les univesités | ||
Ligne 12: | Ligne 67: | ||
</code> | </code> | ||
- | ===== Nombre d'universités dans dbpedia live ===== | + | |
+ | |||
[31.08.2014} Résultat: 4303 | [31.08.2014} Résultat: 4303 | ||
Ligne 54: | Ligne 111: | ||
</code> | </code> | ||
+ | |||