Skip to content

Instantly share code, notes, and snippets.

@frogcat
Last active August 29, 2015 14:24
Show Gist options
  • Save frogcat/f6cccc651d1d918e08c0 to your computer and use it in GitHub Desktop.
Save frogcat/f6cccc651d1d918e08c0 to your computer and use it in GitHub Desktop.
# @href http://www.city.osaka.lg.jp/shimin/cmsfiles/contents/0000298/298810/011jidoushatou2013-shinai.csv
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <http://schema.org/>
PREFIX gnjp: <http://geonames.jp/resource/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dbpedia-ja: <http://ja.dbpedia.org/resource/>
CONSTRUCT {
[
a schema:Event ;
schema:location ?location ;
dcterms:subject ?subject1 , ?subject2
]
} WHERE {
?s rdf:_1 ?v1 ; rdf:_2 ?v2 ; rdf:_3 ?v3 ; rdf:_4 ?v4 ; rdf:_5 ?v5 ;
rdf:_6 ?v6 ; rdf:_7 ?v7 ; rdf:_8 ?v8 ; rdf:_9 ?v9 ; rdf:_10 ?v10 ;
rdf:_11 ?v11 .
FILTER (?v1 != "市区町村")
BIND (IRI(concat("http://geonames.jp/resource/",?v1,?v2,?v3)) as ?location)
BIND (IRI(concat("http://ja.dbpedia.org/resource/",?v4)) as ?subject1)
BIND (IRI(concat("http://ja.dbpedia.org/resource/",?v5)) as ?subject2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment