SlideShare a Scribd company logo
1 of 89
Download to read offline
E2D3で地図を
作画してみよう!
第五回 Center CLR 年末会資料
@ueponx
今回のセッションは
E2D3のハンズオンを受けた
ueponxが個人的な理解をベー
スに作成しています。
理解が間違っていることもあ
りますが、何卒ご容赦くださ
い。
自己紹介
• 氏名:上田茂雄(@ueponx)
• インフラ設備の保守
• 好きなもの
特撮(amazonプライム・・・捗る)
アニメ(最近は地獄少女)
電子工作(mbed、Arduino、RaspberryPi)
プログラム(C#、Java、JavaScript、Python)
ゴール
みんな大好き(?)「Excel」のアドオン
データヴィジュアライゼーションツール
「E2D3」で地図の作画
を行う
データビジュアライゼーション
データビジュアライゼーション
日本語では
「データ可視化」
データビジュアライゼーション
(゚Д゚)ハァ?
数値・情報から導き出された
知見・ポイントなど
「見えない関係性を
見えるようにする」
プロセス
見える化ではなく、
見える化によって得られる
“気づき”
を生み出すのが目的
既存のデータの見える化って?
Excelでグラフ化
既存のデータの見える化って?
Excelのデータの
グラフ化は静的
既存のデータの見える化って?
操作による対話性や動きのある
グラフの使用により
関連性の理解や気付きが得やすい
既存のデータの見える化って?
Excelさんでは
ちょっと足りない
そこでE2D3!
Excelと
D3.jsのダイナミック
な表現をあわせた
アドオン
D3.js?
D3.js?
D3 (Data-Driven Documents)
はSVGレンダリングを
サポートする
JavaScriptライブラリ
(http://d3js.org/)
http://bl.ocks.org/mbostock/7607535サンプル例
クリックによるスムーズな拡大
http://bl.ocks.org/mbostock/5944371サンプル例
クリックによるアニメーション付き拡大
E2D3対応環境
•Excel Online
•Excel 2013
•Excel 2016(開発?)
(2015/12/22現在)
E2D3を使ってみよう!
一番お手軽に体験する方法
→OneDriveで「Excelブック」を新規作成
1. OneDriveでExcelブックを新規作成
2. Excel Onlineの挿入メニューから
Officeアドインを選択
3. 検索BOXにE2D3を入力して検索開始
4. 「信頼する」をクリック!
5. あとは自由に実験!
nagoya-color
のように地図を
描画するには?
nagoya-color
をパクった地図を
描画するには?
開発を行う必要性
手順
①開発環境の準備
②地図データの準備
③geojsonの生成
④topojsonへ変換
⑤E2D3への取込
①開発環境の準備
1. githubからe2d3-contribを
Fork(https://github.com/e2d3/e2d3-
contrib)
2. e2d3.cmdを実行
3. Ctrlを5回押し、右上の
【Go into delegate mode】
をクリック
Forkした以下のそれぞれの
フォルダがアドオンサンプルに対応
コピーすることで類似のサンプルを
作成可能
nagoya-colorをkanazawa-colorへ
②地図データの準備
地図データをダウンロード
地図データは公共機関などが公開
(地図データは一般的にはjsonフォーマット
で公開していないので変換処理が必要)
例)E-STAT 総務省の政府統計ポータルサイト
https://www.e-stat.go.jp/SG1/estat/eStatTopPortal.do
地図データをダウンロード
ダウンロードするもの
世界測地系の
shpファイル
意外とサイトのつくりが
アレなので注意
③geojsonの生成
QGIS
を使用する
QGIS(http://qgis.org/ja/site/)
shpファイルを
GUI操作するだけで
geojsonファイルへ簡単変換
④topojsonへ変換
topojson
を使用する
topojson
(https://github.com/mbostock/topojson)
geojsonをtopojsonに
変換する
node.jsアプリ
topojsonの事前準備
1. node.jsのインストール
2. npmでtopojsonパッケージを
インストール
基本的には変換するだけで良いがそのあとのことを考えて
属性名をnagoya-colorと揃える
(※)属性の設定をしないと今回のお手軽変更ができない
-pオプションをつけることで属性名の変更を行うことができます。
topojsonの使い方
geojsonの属性 topojsonの属性
KEN_NAME prefecture
GST_NAME city
MOJI ward
⑤E2D3へ取込
ファイルのコピー元のファイルがnagoya.topojsonなのでmain.js内の
nagoyaの部分をkanazawaに変更
リロード
データが表示できません
main.jsで地図を表示する
処理を調べると・・・
中心点、縮尺、図法の設定している部分が見つかる。
そこで金沢の中心と思われる経度緯度を設定!
真っ黒ではありますが
これで表示されました
フォルダ内の
data.csv
にデータを入れると…
ちなみに
サンプルに入っていた
北緯35.15 東経136.95
名古屋の中心は川名でした
サンプルに入っていた
北緯35.15 東経136.95
名古屋の中心は川名でした
まとめ
E2D3を使って
Excel上で
地図を表示する手順を
追ってみました
データ
ビジュアライゼーション
の手法をおさらいしたに過ぎない
本来の目的
対話的な操作を用いた
地図を使って
「データ」を
わかりやすく表示し、
「気付き」を生むこと
みなさんも
E2D3で
データビジュアライゼーション
初めてみませんか?

More Related Content

Viewers also liked

Marigo Raftopoulos for Gamification World Congress, Barcelona 2015
Marigo Raftopoulos for Gamification World Congress, Barcelona 2015Marigo Raftopoulos for Gamification World Congress, Barcelona 2015
Marigo Raftopoulos for Gamification World Congress, Barcelona 2015Dr. Marigo Raftopoulos
 
How a CDCL SAT solver works
How a CDCL SAT solver worksHow a CDCL SAT solver works
How a CDCL SAT solver worksMasahiro Sakai
 
顔認識アルゴリズム:Constrained local model を調べてみた
顔認識アルゴリズム:Constrained local model を調べてみた顔認識アルゴリズム:Constrained local model を調べてみた
顔認識アルゴリズム:Constrained local model を調べてみたJotaro Shigeyama
 
神に近づくx/net/context (Finding God with x/net/context)
神に近づくx/net/context (Finding God with x/net/context)神に近づくx/net/context (Finding God with x/net/context)
神に近づくx/net/context (Finding God with x/net/context)guregu
 
Basculement du monde et géopolitique du monde
Basculement du monde et géopolitique du mondeBasculement du monde et géopolitique du monde
Basculement du monde et géopolitique du mondeJean-François Fiorina
 
298885937-Us-Naval-Incompetence
298885937-Us-Naval-Incompetence298885937-Us-Naval-Incompetence
298885937-Us-Naval-IncompetenceAgha A
 
Infocomm Webinar 08/03/17 - Sistemas audiovisuais aplicados em avisos de emer...
Infocomm Webinar 08/03/17 - Sistemas audiovisuais aplicados em avisos de emer...Infocomm Webinar 08/03/17 - Sistemas audiovisuais aplicados em avisos de emer...
Infocomm Webinar 08/03/17 - Sistemas audiovisuais aplicados em avisos de emer...Andre Stern, CTS
 
Gentooプリインストールなノートパソコンの話
Gentooプリインストールなノートパソコンの話Gentooプリインストールなノートパソコンの話
Gentooプリインストールなノートパソコンの話Takuto Matsuu
 
5分でわかる Apache HBase 最新版 #hcj2014
5分でわかる Apache HBase 最新版 #hcj20145分でわかる Apache HBase 最新版 #hcj2014
5分でわかる Apache HBase 最新版 #hcj2014Cloudera Japan
 
Experimentos científicos
Experimentos científicos Experimentos científicos
Experimentos científicos Fabián Cuevas
 
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsPL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsKohei KaiGai
 
Why Demand Generation Funnels Are a Limiting Approach
Why Demand Generation Funnels Are a Limiting ApproachWhy Demand Generation Funnels Are a Limiting Approach
Why Demand Generation Funnels Are a Limiting ApproachTechTarget
 
Writing and Refining Information Literacy Learning Outcomes
Writing and Refining Information Literacy Learning OutcomesWriting and Refining Information Literacy Learning Outcomes
Writing and Refining Information Literacy Learning OutcomesChris Sweet
 

Viewers also liked (15)

Marigo Raftopoulos for Gamification World Congress, Barcelona 2015
Marigo Raftopoulos for Gamification World Congress, Barcelona 2015Marigo Raftopoulos for Gamification World Congress, Barcelona 2015
Marigo Raftopoulos for Gamification World Congress, Barcelona 2015
 
How a CDCL SAT solver works
How a CDCL SAT solver worksHow a CDCL SAT solver works
How a CDCL SAT solver works
 
顔認識アルゴリズム:Constrained local model を調べてみた
顔認識アルゴリズム:Constrained local model を調べてみた顔認識アルゴリズム:Constrained local model を調べてみた
顔認識アルゴリズム:Constrained local model を調べてみた
 
神に近づくx/net/context (Finding God with x/net/context)
神に近づくx/net/context (Finding God with x/net/context)神に近づくx/net/context (Finding God with x/net/context)
神に近づくx/net/context (Finding God with x/net/context)
 
Basculement du monde et géopolitique du monde
Basculement du monde et géopolitique du mondeBasculement du monde et géopolitique du monde
Basculement du monde et géopolitique du monde
 
298885937-Us-Naval-Incompetence
298885937-Us-Naval-Incompetence298885937-Us-Naval-Incompetence
298885937-Us-Naval-Incompetence
 
Infocomm Webinar 08/03/17 - Sistemas audiovisuais aplicados em avisos de emer...
Infocomm Webinar 08/03/17 - Sistemas audiovisuais aplicados em avisos de emer...Infocomm Webinar 08/03/17 - Sistemas audiovisuais aplicados em avisos de emer...
Infocomm Webinar 08/03/17 - Sistemas audiovisuais aplicados em avisos de emer...
 
Hair Extension Courses Manchester
Hair Extension Courses ManchesterHair Extension Courses Manchester
Hair Extension Courses Manchester
 
Gentooプリインストールなノートパソコンの話
Gentooプリインストールなノートパソコンの話Gentooプリインストールなノートパソコンの話
Gentooプリインストールなノートパソコンの話
 
Trove: Introduction to searching newspapers
Trove: Introduction to searching newspapersTrove: Introduction to searching newspapers
Trove: Introduction to searching newspapers
 
5分でわかる Apache HBase 最新版 #hcj2014
5分でわかる Apache HBase 最新版 #hcj20145分でわかる Apache HBase 最新版 #hcj2014
5分でわかる Apache HBase 最新版 #hcj2014
 
Experimentos científicos
Experimentos científicos Experimentos científicos
Experimentos científicos
 
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database AnalyticsPL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
PL/CUDA - Fusion of HPC Grade Power with In-Database Analytics
 
Why Demand Generation Funnels Are a Limiting Approach
Why Demand Generation Funnels Are a Limiting ApproachWhy Demand Generation Funnels Are a Limiting Approach
Why Demand Generation Funnels Are a Limiting Approach
 
Writing and Refining Information Literacy Learning Outcomes
Writing and Refining Information Literacy Learning OutcomesWriting and Refining Information Literacy Learning Outcomes
Writing and Refining Information Literacy Learning Outcomes
 

More from Shigeo Ueda

SeeedJP User Group 情報交換会発表資料
SeeedJP User Group 情報交換会発表資料SeeedJP User Group 情報交換会発表資料
SeeedJP User Group 情報交換会発表資料Shigeo Ueda
 
ソーシャルストリーミングリモコン
ソーシャルストリーミングリモコン ソーシャルストリーミングリモコン
ソーシャルストリーミングリモコン Shigeo Ueda
 
ソーシャルTvリモコンの作成
ソーシャルTvリモコンの作成ソーシャルTvリモコンの作成
ソーシャルTvリモコンの作成Shigeo Ueda
 
SlackのIncomingWebhooksとOutgoingWebhooksを使って電子工作と連携させてみよう
SlackのIncomingWebhooksとOutgoingWebhooksを使って電子工作と連携させてみようSlackのIncomingWebhooksとOutgoingWebhooksを使って電子工作と連携させてみよう
SlackのIncomingWebhooksとOutgoingWebhooksを使って電子工作と連携させてみようShigeo Ueda
 
技適あり!ESP8266搭載WiFiモジュールをArduino化しよう!
技適あり!ESP8266搭載WiFiモジュールをArduino化しよう!技適あり!ESP8266搭載WiFiモジュールをArduino化しよう!
技適あり!ESP8266搭載WiFiモジュールをArduino化しよう!Shigeo Ueda
 
ベルトガジェットにチャレンジしてみる
ベルトガジェットにチャレンジしてみるベルトガジェットにチャレンジしてみる
ベルトガジェットにチャレンジしてみるShigeo Ueda
 
Windows10のお気に入りの機能を使いやすくしてみる
Windows10のお気に入りの機能を使いやすくしてみるWindows10のお気に入りの機能を使いやすくしてみる
Windows10のお気に入りの機能を使いやすくしてみるShigeo Ueda
 
変身ベルトアプリ謎
変身ベルトアプリ謎変身ベルトアプリ謎
変身ベルトアプリ謎Shigeo Ueda
 
AndroidStudioのインストールをゼロからしてみる
AndroidStudioのインストールをゼロからしてみるAndroidStudioのインストールをゼロからしてみる
AndroidStudioのインストールをゼロからしてみるShigeo Ueda
 
Python toolforvsをインストールをしてみる
Python toolforvsをインストールをしてみるPython toolforvsをインストールをしてみる
Python toolforvsをインストールをしてみるShigeo Ueda
 

More from Shigeo Ueda (11)

SeeedJP User Group 情報交換会発表資料
SeeedJP User Group 情報交換会発表資料SeeedJP User Group 情報交換会発表資料
SeeedJP User Group 情報交換会発表資料
 
ソーシャルストリーミングリモコン
ソーシャルストリーミングリモコン ソーシャルストリーミングリモコン
ソーシャルストリーミングリモコン
 
ソーシャルTvリモコンの作成
ソーシャルTvリモコンの作成ソーシャルTvリモコンの作成
ソーシャルTvリモコンの作成
 
SlackのIncomingWebhooksとOutgoingWebhooksを使って電子工作と連携させてみよう
SlackのIncomingWebhooksとOutgoingWebhooksを使って電子工作と連携させてみようSlackのIncomingWebhooksとOutgoingWebhooksを使って電子工作と連携させてみよう
SlackのIncomingWebhooksとOutgoingWebhooksを使って電子工作と連携させてみよう
 
技適あり!ESP8266搭載WiFiモジュールをArduino化しよう!
技適あり!ESP8266搭載WiFiモジュールをArduino化しよう!技適あり!ESP8266搭載WiFiモジュールをArduino化しよう!
技適あり!ESP8266搭載WiFiモジュールをArduino化しよう!
 
ベルトガジェットにチャレンジしてみる
ベルトガジェットにチャレンジしてみるベルトガジェットにチャレンジしてみる
ベルトガジェットにチャレンジしてみる
 
Windows10のお気に入りの機能を使いやすくしてみる
Windows10のお気に入りの機能を使いやすくしてみるWindows10のお気に入りの機能を使いやすくしてみる
Windows10のお気に入りの機能を使いやすくしてみる
 
変身ベルトアプリ謎
変身ベルトアプリ謎変身ベルトアプリ謎
変身ベルトアプリ謎
 
AndroidStudioのインストールをゼロからしてみる
AndroidStudioのインストールをゼロからしてみるAndroidStudioのインストールをゼロからしてみる
AndroidStudioのインストールをゼロからしてみる
 
Kinect入門
Kinect入門Kinect入門
Kinect入門
 
Python toolforvsをインストールをしてみる
Python toolforvsをインストールをしてみるPython toolforvsをインストールをしてみる
Python toolforvsをインストールをしてみる
 

E2D3で地図を作画してみよう