Skip to content

Commit a30896a

Browse files
committed
Fixed #2 by replacing yago:PrefecturesOfJapan to yago:WikicatPrefecturesOfJapan. Filtered Onjuku town as YAGO assigned it to one of prefecture wrongly.
1 parent 79913d9 commit a30896a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

chapter5/D3/d3sparql-namedmap.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ <h1>d3namedmap</h1>
4545

4646
SELECT DISTINCT ?s ?label ?population ?area (?density AS ?size)
4747
WHERE {
48-
?s a yago:PrefecturesOfJapan ;
48+
?s a yago:WikicatPrefecturesOfJapan ;
4949
rdfs:label ?label ;
5050
dbpedia-owl:populationTotal ?population ;
5151
dbpedia-owl:areaTotal ?area .
5252
BIND (xsd:float(?population)/xsd:float(?area/1000000) AS ?density)
5353
FILTER (lang(?label) = 'ja' )
54+
FILTER (str(?s) != 'http://dbpedia.org/resource/Onjuku')
5455
}
5556
ORDER BY DESC(?density)
5657
</textarea>

chapter5/R/prefs.rq

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
44

55
SELECT ?pref ?area
66
WHERE {
7-
?s a yago:PrefecturesOfJapan ;
7+
?s a yago:WikicatPrefecturesOfJapan ;
88
rdfs:label ?pref ;
99
dbpedia-owl:areaTotal ?area .
1010
FILTER (lang(?pref) = 'en')
11+
## a bug of YAGO in DBpedia 2016-04 ?
12+
FILTER (str(?pref) != 'Onjuku')
1113
}
1214
ORDER BY DESC(?area)

0 commit comments

Comments
 (0)