Skip to content

Instantly share code, notes, and snippets.

@tommorris
Created September 25, 2012 14:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommorris/3782244 to your computer and use it in GitHub Desktop.
Save tommorris/3782244 to your computer and use it in GitHub Desktop.
query to get all universities with lat-longs in Alabama
how to use this query:
simply paste it into <http://dbpedia.org/sparql>
Choose the results format (HTML, XML, CSV etc.)
Enjoy.
dbpedia.org currently seems to be a bit shaky. you can also use
<http://dbpedia-live.openlinksw.com/sparql> or
<http://live.dbpedia.org/sparql>
--tom
PREFIX category: <http://dbpedia.org/resource/Category:>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
PREFIX dbpedia: <http://dbpedia.org/resource/>
SELECT ?college ?lat ?long
WHERE {
{
?college a dbpedia-owl:University;
dbpedia-owl:state dbpedia:Alabama.
} UNION {
?college dcterms:subject category:Universities_and_colleges_in_Alabama.
}
?college
geo:long ?long;
geo:lat ?lat .
}
@maiomar
Copy link

maiomar commented Nov 16, 2020

can u help me please .. to get the deans of the faculties in Syrian Virtual University...
the university website is svuonline.org.. but dbpedia did not have so info about it..

@tommorris
Copy link
Author

Hi @maiomar, DBpedia (and Wikidata) is only likely to contain material that's on Wikipedia. I don't know if the university you mentioned is on there. Instead, you might want to use scraping tools like Scrapy to get data from their website - have a look at this Scrapy tutorial for more details.

@maiomar
Copy link

maiomar commented Nov 18, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment