Last active
December 16, 2015 11:08
-
-
Save nezuQ/5424654 to your computer and use it in GitHub Desktop.
国立国会図書館典拠データ検索・提供サービスに、芥川龍之介の生年・没年をRのSPARQLパッケージで尋ねる。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(SPARQL) | |
endpoint <- "http://id.ndl.go.jp/auth/ndla/" | |
query <- | |
" | |
PREFIX rda: <http://RDVocab.info/ElementsGr2/> | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
SELECT | |
?birth ?death | |
WHERE { | |
?uri foaf:name ?name. | |
?uri rda:dateOfBirth ?birth. | |
?uri rda:dateOfDeath ?death. | |
FILTER regex(?name,'芥川(龍|竜)之介') | |
} | |
" | |
res <- SPARQL(url=endpoint, query)$results | |
res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment