Permalink
Browse files

Fixed #2 by replacing yago:PrefecturesOfJapan to yago:WikicatPrefectu…

…resOfJapan. Filtered Onjuku town as YAGO assigned it to one of prefecture wrongly.
  • Loading branch information...
1 parent 79913d9 commit a30896a1cce3411339c8468c14900a426031ecec @fumi fumi committed Nov 11, 2016
Showing with 5 additions and 2 deletions.
  1. +2 −1 chapter5/D3/d3sparql-namedmap.html
  2. +3 −1 chapter5/R/prefs.rq
@@ -45,12 +45,13 @@
SELECT DISTINCT ?s ?label ?population ?area (?density AS ?size)
WHERE {
- ?s a yago:PrefecturesOfJapan ;
+ ?s a yago:WikicatPrefecturesOfJapan ;
rdfs:label ?label ;
dbpedia-owl:populationTotal ?population ;
dbpedia-owl:areaTotal ?area .
BIND (xsd:float(?population)/xsd:float(?area/1000000) AS ?density)
FILTER (lang(?label) = 'ja' )
+ FILTER (str(?s) != 'http://dbpedia.org/resource/Onjuku')
}
ORDER BY DESC(?density)
</textarea>
View
@@ -4,9 +4,11 @@ PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
SELECT ?pref ?area
WHERE {
- ?s a yago:PrefecturesOfJapan ;
+ ?s a yago:WikicatPrefecturesOfJapan ;
rdfs:label ?pref ;
dbpedia-owl:areaTotal ?area .
FILTER (lang(?pref) = 'en')
+ ## a bug of YAGO in DBpedia 2016-04 ?
+ FILTER (str(?pref) != 'Onjuku')
}
ORDER BY DESC(?area)

0 comments on commit a30896a

Please sign in to comment.