Peripleoを試す
概要 「Peripleo」を使う方法を調べましたので、備忘録です。「Peripleo」は以下のように説明されています。
Peripleo is a browser-based tool for the mapping of things related to place.
https://github.com/britishlibrary/peripleo
今回は以下の記事で紹介した「れきちず」と組み合わせて、使用する方法について紹介します。
成果物 以下のURLでお試しいただけます。
https://nakamura196.github.io/peripleo/
リポジトリは以下です。
https://github.com/nakamura196/peripleo
本ブログでは、以下の『東京帝國大學本部構内及農學部建物鳥瞰圖』(東京大学農学生命科学図書館所蔵)をサンプルデータとして使用します。
https://iiif.dl.itc.u-tokyo.ac.jp/repo/s/agriculture/document/187cc82d-11e6-9912-9dd4-b4cca9b10970
背景 以下の会議に参加し、「Peripleo」について教えていただきました。「Peripleo」を開発してくださっている関係者の皆様、会議を開催してくださった皆様、また使用方法を教えてくださったGethin Rees氏に感謝いたします。
http://codh.rois.ac.jp/conference/linked-pasts-10/
基本的な使い方 以下に記載があります。
https://github.com/britishlibrary/peripleo?tab=readme-ov-file#installation-guide
今回は、『東京帝國大學本部構内及農學部建物鳥瞰圖』のデータを利用するにあたり、カスタマイズした点について紹介します。
データの準備 以下のようなスプレッドシートを用意します。
https://docs.google.com/spreadsheets/d/1ZZJZL0K4cBOc0EgMHNV9NQ56C_fcZm0eceBg_OPmxe4/edit?usp=sharing
灰色のセルは不要な列です。
データの準備ができたら、CSV形式でダウンロードします。
JSON形式への変換 Locolligoというツールを用いて、CSVのデータをJSON形式のデータに変換します。
https://github.com/docuracy/Locolligo
まず、以下にアクセスします。
https://docuracy.github.io/Locolligo/
CSVファイルをアップロード後、「Assign CSV Columns」を押すと、以下が表示されます。
予約語をCSVのヘッダーに使用しておくと、手動でマッピングする必要がないようでした。うまくマッピングされなかった場合には、手動で設定します。
なお、予約語は以下で確認できました。
https://github.com/docuracy/Locolligo/blob/main/js/data-converter.js
function assign(){ $('#assign').removeClass('throb'); var assignmentOptions = [ ['(ignore)'], ['@id','identifier|uuid|id|@id'], ['properties.title','title|name|label'], ['properties.%%%'], ['geometry.coordinates','coordinates|coords|OSGB'], ['geometry.coordinates[0]','longitude|long|lng|easting|westing|X'], ['geometry.coordinates[1]','latitude|lat|northing|southing|Y'], ['names[0].toponym','toponym'], ['links[0].type'], ['links[0].identifier'], ['depictions[0].@id'], ['depictions[0].title'], ['descriptions[0].@id'], ['descriptions[0].value'], ['types[0].identifier'], ['types[0].label'], ['{custom}'] ]; 結果をダウンロードすると、featuresに以下のようなアイテムが格納されたデータを取得できます。
...
2024年12月13日 · 更新: 2024年12月13日 · 2 分 · Nakamura