Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Python Dashで作るインタラクティブなWebサイト
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hiroki.Abe
March 16, 2019
Technology
730
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Python Dashで作るインタラクティブなWebサイト
Hiroki.Abe
March 16, 2019
More Decks by Hiroki.Abe
See All by Hiroki.Abe
レガシーアプリでPythonを活用する方法の検討
hirokiabe
1
1.1k
[信玄パイ LT] LINE Things Mini Award ハッカソン東京 参加レポート
hirokiabe
0
360
LINE_Thingsでオーダーエントリーシステムをつくってみた.pdf
hirokiabe
0
170
形態素解析で勉強会のトレンドワードを調べてみた
hirokiabe
0
470
ARCoreとSceneformでARアプリを作ろう
hirokiabe
0
1.5k
FlashAirとLineNotifyでデバイスのIoT化
hirokiabe
0
630
Other Decks in Technology
See All in Technology
JAWSUG TOHOKU 青森支部 「LoGoチャット」のAWS移行で 乗り越えたこと
taketakekaho
0
330
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
860
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
4
1k
PHPカンファレンス関西の招待状 / Invitation to PHP Conference Kansai
ykanoh
0
110
大型犬好きによるPugの紹介
yamanoku
1
160
Running Kotlin + Quarkus with Lambda
nealle
1
3.7k
Rustuna: Rustによる高速なOptuna実装
pfn
PRO
0
190
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
V8のArray.prototype.flatを最大約20倍速くするまでと、巨大OSSへの大規模コミットの道のり
riyaamemiya
0
290
Rust で関数型ドメインモデリング
takonda
0
140
AI導入は済んだ。次は統制を作り替える番だ_AI×開発組織 Summit 2026
techtekt
PRO
0
210
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
The Cult of Friendly URLs
andyhume
79
7k
The Invisible Side of Design
smashingmag
301
52k
Mind Mapping
helmedeiros
1
400
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
New Earth Scene 8
popppiees
4
2.7k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
We Have a Design System, Now What?
morganepeng
55
8.4k
Transcript
Dashで作るインタラクティブな 可視化Webサイト 2019.03.16 Hiroki Abe Shingen.py #3 LT
Dashとは Python製Webフレームワーク https://dash.plot.ly/ (サーバーにFlask,フロントエンドにPlotly.js, React.jsが使われている) インタラクティブなデータ可視化Webサイトを簡単に構築できる。 ダッシュボードの作成に最適。 - 豊富なUI (グラフ,ボタン,スライダー,ドロップダウン,テーブル,etc)
- HTML, JavaScriptのコーディングが不要, CSSによる柔軟なカスタマイズ - オープンソース (MIT license)
インストール • インストール https://dash.plot.ly/installation pip install dash==0.39.0 # The core
dash backend pip install dash-html-components==0.14.0 # HTML components pip install dash-core-components==0.44.0 # Supercharged components pip install dash-table==3.6.0 # Interactive DataTable component (new!) pip install dash-daq==0.1.0 # DAQ components (newly open-sourced!) サンプルコードの実行にはPandas, NumPyが必要 • 実行 python [script_name].py (公開時は、Apacheなどのサーバー上で動かす) • チュートリアル https://dash.plot.ly/
グラフ作成は4Step 1. データの用意 x,y軸データを用意する。 PandaのデータフレームやNumPyの配列を指定可能 2. グラフ用データを作る 1.で作ったデータをグラフオブジェクトにセットする (折れ線、棒、箱ひげ図、円など) 3.
レイアウト(外観)を作る タイトル、大きさ、軸、レジェンドの設定を指定する。 4.データとレイアウトをまとめてグラフを作成する。
Dashで可視化してみる1 気象庁が提供する気象データ(CSV)を可視化してみた https://www.data.jma.go.jp/gmd/risk/obsdl/ (そのままだとPandasで読めないのでCSVをちょっと改変) dash_sample3.py dash_sample4.py dash_sample5.py
Dashで可視化してみる2 FlightStaus APIで取得したフライト/航空情報を可視化 https://developer.flightstats.com/ XMLやJSON形式で取得可能。お試しアカウントで20000回までアクセス可能 Geoオブジェクトをつかった地図へのプロット airline_from_nrt_airport.py airports_jp.py
まとめ • Dashをつかって簡単にインタラクティブな可視化Webサイトの作成が可能 • ダッシュボードや成果物の共有に最適 •発表で使用したソースコード https://www.dropbox.com/s/u37e7z1qbuccw0x/dash_source_code.zip?dl=0 ・データ入手元 気象庁 :
https://www.data.jma.go.jp/gmd/risk/obsdl/ Flight Status: https://developer.flightstats.com/ ・データ活用のコンテスト (第3回 東京公共交通オープンデータチャレンジ ) https://tokyochallenge.odpt.org/