ホーム 記事一覧 ブック DH週間トピックス 検索 このサイトについて
English
Linked Dataを使ったデータ記述の応用例

Linked Dataを使ったデータ記述の応用例

概要 RDFに関連して、以下のような記事を執筆しました。 これらをまとめて可視化してみましたので、備忘録です。 データ 今回は以下のデータを使用しました。 「中村覚(0000-0001-8245-7925)」という人物が東京国立博物館で所蔵されている「冨嶽三十六景・凱風快晴(cobas-166407)」に関心があり、その作成者は「葛飾北斎」である、といった内容を記述しました。 ttlによる記述は以下です。 @prefix dcterms: <http://purl.org/dc/terms/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . <https://orcid.org/0000-0001-8245-7925> foaf:topic_interest <https://jpsearch.go.jp/data/cobas-166407> . <https://jpsearch.go.jp/data/cobas-166407> dcterms:creator <https://jpsearch.go.jp/entity/chname/葛飾北斎> . 変換処理 ジャパンサーチおよびORCIDではRDFが提供されているため、それらを追加することができます。 その結果、以下のようなttlに拡張されました。 @prefix dcterms: <http://purl.org/dc/terms/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix ns1: <http://schema.org/> . @prefix ns2: <https://jpsearch.go.jp/term/property#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . <https://orcid.org/0000-0001-8245-7925> a prov:Person, foaf:Person ; rdfs:label "Satoru Nakamura" ; foaf:account <https://orcid.org/0000-0001-8245-7925#orcid-id> ; foaf:based_near [ ] ; foaf:familyName "Nakamura" ; foaf:givenName "Satoru" ; foaf:page <https://researchmap.jp/nakamura.satoru/?lang=english> ; foaf:publications <https://orcid.org/0000-0001-8245-7925#workspace-works> ; foaf:topic_interest <https://jpsearch.go.jp/data/cobas-166407> . <https://jpsearch.go.jp/data/cobas-166407> a <https://jpsearch.go.jp/term/type/絵画> ; rdfs:label "冨嶽三十六景・凱風快晴" ; dcterms:creator <https://jpsearch.go.jp/entity/chname/葛飾北斎> ; ns1:abstract """This woodblock print was produced by the ukiyo-e artist Katsushika Hokusai in the late Edo period. It is one of a series of works called Thirty-Six Views of Mount Fuji. It is also one of the most famous Japanese pictures in the world. The “mild breeze” of the title refers to a gentle wind that blows in from the south. The foot of Mount Fuji spreads out expansively. There are no human figures and the scene focuses on the grandeur of nature. The most distinctive feature is the reddened mountain surface. Perhaps this redness is the color of Fuji's volcanic surface on a clear day, or maybe the mountain has been dyed this color by the dawn sunlight. This is a woodblock print, but the same block can produce different results depending on the printing technique. Some versions of Mild Breeze on a Fine Day use lighter colors for the sky and Mount Fuji. This creates a sense of the landscape changing color as the morning sun slowly rises. However, this version from Tokyo National Museum's collection uses more vivid hues for the blue sky and the red mountain. This emphasizes the sense of Mount Fuji captured on a hot, clear day. These variations enhance the enjoyment of woodblock prints."""@en, """これは、江戸時代の後半に、浮世絵師の葛飾北斎が描いた木版画で、富士山をテーマとした46枚シリーズの一枚です。日本の絵画の中でも、世界的に知られた一枚ではないでしょうか。タイトルは「冨嶽三十六景」なのに46枚あるのは、人気が高く当初の予定から10枚増えたためです。 作品タイトルにある「凱風」とは、南から吹くおだやかな風のこと。富士山の裾野までを広くゆったりと描いています。人物も描かれておらず、自然の雄大さが感じられる景色です。何より特徴的なのは、赤くあらわされた山肌です。これは、晴天の中に立つ富士山の赤土の色なのでしょうか、それとも朝焼けに染まった色なのでしょうか。 この作品は版画ですから、同じ版木を使っていても、摺りごとに違いがあらわれます。実は同じ「凱風快晴」でも、空や富士山がもっと淡い色をしたバージョンもあり、そちらはだんだんと昇る朝日を受けて景色が色づくプロセスを描いた、といった雰囲気です。一方、東博所蔵のこちらのバージョンでは、青空や赤い富士山の色がよりはっきりとあらわされ、暑い晴天の中に立つ富士、という強さがあるようです。こうした摺りごとのバリエーションが見られるのも、版画の面白さのひとつです。 この作品をはじめ、「冨嶽三十六景」シリーズの最初の頃には、「ベロ」と呼ばれた青い顔料「ベルリン・ブルー」が多く使われています。この時代にヨーロッパから日本に入ってきたもので、北斎の新しいものへの関心の高さが見てとれます。"""@ja ; ns1:creator <https://jpsearch.go.jp/entity/chname/葛飾北斎> ; ns1:dateCreated "1801-1900" ; ns1:description "Category: Paintings, sketches, and prints:Japan:Ukiyo-e", "Genre: Painting", "Material: Woodblock print ([nishiki-e])", "分類: 絵画", "品質形状: 横大判 錦絵", "員数: 1枚", "法量: 25.3×38.0cm", "種別: 絵画:日本:浮世絵" ; ns1:image <https://colbase.nich.go.jp/media/tnm/A-11176-1/image/slideshow_s/A-11176-1_E0134613.jpg> ; ns1:name "Mild Breeze on a Fine Day from the Series Thirty-Six Views of Mount Fuji"@en, "冨嶽三十六景・凱風快晴"@ja, "ふがくさんじゅうろっけい がいふうかいせい"@ja-hira, "フガクサンジュウロッケイ ガイフウカイセイ"@ja-kana ; ns1:temporal <https://jpsearch.go.jp/entity/time/1801-1900> ; ns2:accessInfo <https://jpsearch.go.jp/data/cobas-166407#accessinfo> ; ns2:agential "" ; ns2:sourceInfo <https://jpsearch.go.jp/data/cobas-166407#sourceinfo> ; ns2:temporal "" . <https://jpsearch.go.jp/entity/chname/葛飾北斎> a <https://jpsearch.go.jp/term/type/Agent>, <https://jpsearch.go.jp/term/type/Person> ; rdfs:label "葛飾北斎" ; ns1:birthDate <https://jpsearch.go.jp/entity/time/1760> ; ns1:deathDate <https://jpsearch.go.jp/entity/time/1849> ; ns1:description "1760?-1849, 江戸時代後期の浮世絵師。姓は川村氏、幼名は時太郎、のち鉄蔵。通称は中島八右衛門。号は勝川春朗、宗理、戴斗、為一、画狂老人、卍など。" ; ns1:image <https://commons.wikimedia.org/wiki/Special:FilePath/Hokusai_portrait_whiteBackground.png?width=350> ; ns1:name "Katsushika, Hokusai"@en, "かつしか北斎"@ja, "前北斎"@ja, "前北斎卍"@ja, "前北斎為一"@ja, "前北斎為一老人"@ja, "勝川春朗"@ja, "北斉"@ja, "北斉載斗改葛飾為一"@ja, "北斎"@ja, "北斎主人"@ja, "北斎宗理"@ja, "北斎為一卍"@ja, "画狂人北斎"@ja, "葛飾北斎"@ja, "葛飾卍老人"@ja, "かつしか ほくさい"@ja-hira, "カツシカ ホクサイ"@ja-kana ; ns1:subjectOf <https://jpsearch.go.jp/data/nij15-nijl_nijl_nijl_kotengakutougouhyakka_hagajinmeijiten_00029172> ; ns1:url <https://jpsearch.go.jp/gallery/ndl-xbzl6VVOpkhjzlg> ; rdfs:isDefinedBy <https://jpsearch.go.jp/entity/chname/> ; owl:sameAs <http://collection.britishmuseum.org/id/person-institution/1820>, <http://data.bnf.fr/ark:/12148/cb124954814#about>, <http://dbpedia.org/resource/Hokusai>, <http://edan.si.edu/saam/id/person-institution/2267>, <http://id.ndl.go.jp/auth/entity/00270331>, <http://ja.dbpedia.org/resource/葛飾北斎>, <http://lod.ac/id/1626>, <http://viaf.org/viaf/69033717>, <http://www.wikidata.org/entity/Q5586> . 可視化 上記のttlを神崎正英氏が作成されたツールを使って可視化してみます。 ...

ro-crate-pyを試す

ro-crate-pyを試す

概要 ro-crate-pyは、Research Object Crates (RO-Crate)を作成および利用するためのPythonライブラリです。 https://doi.org/10.5281/zenodo.3956493 ro-crate-py is a Python library to create and consume Research Object Crates. It currently supports the RO-Crate 1.1 specification. ゴール 以下に示すようなページを作成することを目指します。 https://nakamura196.github.io/rocrate_demo/crate/test/data/ro-crate-preview.html データセットのページ 特定のアイテムのページ JSONデータ 以下のようなJSONデータを作成します。 https://nakamura196.github.io/rocrate_demo/crate/test/data/ro-crate-metadata.json アイテムのIDとしては、以下のOAI-PMHのレコードを使用します。 https://da.dl.itc.u-tokyo.ac.jp/portal/oai?verb=GetRecord&metadataPrefix=dcndl_simple&identifier=oai:da.dl.itc.u-tokyo.ac.jp:fbd0479b-dbb4-4eaa-95b8-f27e1c423e4b アイテムの作成者として、ダミーの値ですが、ORCIDのIDを指定します。 https://orcid.org/0000-0001-8245-7925 データの公開者としては、東京大学のResearch Organization Registry (ROR) を指定します。 https://ror.org/057zh3y96 ライブラリのインストール bagitはrocrateに必須ではありませんが、今回は最終出力をbagit形式にするために使用します。 pip install rocrate pip install bagit from rocrate.rocrate import ROCrate from rocrate.model.person import Person from rocrate.model.contextentity import ContextEntity import os import bagit import shutil import json データ dataset_name = "百鬼夜行図コレクション" dataset_description = "百鬼夜行図(ひやつきやぎうず) 蔭山源広迢写 百鬼夜行は今昔物語などの説話にでてくる言葉で、京の大路を夜な夜な化け物たちが練り歩く様子を表している。" dataset_license = "https://www.lib.u-tokyo.ac.jp/ja/library/contents/archives-top/reuse" item_id = "https://da.dl.itc.u-tokyo.ac.jp/portal/oai?verb=GetRecord&metadataPrefix=dcndl_simple&identifier=oai:da.dl.itc.u-tokyo.ac.jp:fbd0479b-dbb4-4eaa-95b8-f27e1c423e4b" item_name = "百鬼夜行図" item_description = "OAI-PMH(Open Archives Initiative Protocol for Metadata Harvesting)" item_license = "https://www.lib.u-tokyo.ac.jp/ja/library/contents/archives-top/reuse" person_id = "https://orcid.org/0000-0001-8245-7925" person_name = "Satoru Nakamura" org_id = "https://ror.org/057zh3y96" org_name = "The University of Tokyo" ROCrateインスタンスの作成 gen_preview=Trueとすることで、保存時にpreview.htmlを合わせて作成してくれます。 ...

ORCIDのRDFを確認する

ORCIDのRDFを確認する

ORCIDのRDFを確認する方法です。 以下のORCID IDを対象にします。 https://orcid.org/0000-0001-8245-7925 閲覧には、神崎正英氏が開発されているLinked Data Browswerを使用します。 https://www.kanzaki.com/works/2014/pub/ld-browser 例えば、以下のURLからRDFデータを閲覧できます。 https://www.kanzaki.com/works/2014/pub/ld-browser?u=https%3A%2F%2Forcid.org%2F0000-0001-8245-7925 具体的なRDFデータは以下です。 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:pav="http://purl.org/pav/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:gn="http://www.geonames.org/ontology#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema#"> <foaf:PersonalProfileDocument rdf:about="http://pub.orcid.org/orcid-pub-web/experimental_rdf_v1/0000-0001-8245-7925"> <pav:createdOn rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime" >2017-07-14T00:27:17.421Z</pav:createdOn> <prov:generatedAtTime rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime" >2022-12-14T02:40:04.693Z</prov:generatedAtTime> <pav:lastUpdateOn rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime" >2022-12-14T02:40:04.693Z</pav:lastUpdateOn> <pav:createdWith rdf:resource="https://orcid.org"/> <prov:wasAttributedTo> <prov:Person rdf:about="https://orcid.org/0000-0001-8245-7925"> <foaf:account> <foaf:OnlineAccount rdf:about="https://orcid.org/0000-0001-8245-7925#orcid-id"> <rdfs:label>0000-0001-8245-7925</rdfs:label> <foaf:accountName>0000-0001-8245-7925</foaf:accountName> <foaf:accountServiceHomepage rdf:resource="https://orcid.org"/> </foaf:OnlineAccount> </foaf:account> <foaf:publications> <foaf:Document rdf:about="https://orcid.org/0000-0001-8245-7925#workspace-works"/> </foaf:publications> <foaf:page rdf:resource="https://researchmap.jp/nakamura.satoru/?lang=english"/> <foaf:based_near> <gn:Feature> <gn:parentCountry> <rdf:Description rdf:about="http://sws.geonames.org/1861060/"> <gn:name>Japan</gn:name> <gn:countryCode>JP</gn:countryCode> <rdfs:label>Japan</rdfs:label> </rdf:Description> </gn:parentCountry> <gn:countryCode>JP</gn:countryCode> </gn:Feature> </foaf:based_near> <foaf:familyName>Nakamura</foaf:familyName> <foaf:givenName>Satoru</foaf:givenName> <rdfs:label>Satoru Nakamura</rdfs:label> <rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/> </prov:Person> </prov:wasAttributedTo> <pav:createdBy rdf:resource="https://orcid.org/0000-0001-8245-7925"/> <foaf:maker rdf:resource="https://orcid.org/0000-0001-8245-7925"/> <foaf:primaryTopic rdf:resource="https://orcid.org/0000-0001-8245-7925"/> </foaf:PersonalProfileDocument> </rdf:RDF> 参考になりましたら幸いです。