Upgrade to Pro — share decks privately, control downloads, hide ads and more …

可視化ライブラリでWebツールを作ってみた

yujikawa
December 20, 2017

 可視化ライブラリでWebツールを作ってみた

Pythonのdashを使った可視化ツールのお話です。

yujikawa

December 20, 2017
Tweet

More Decks by yujikawa

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ w ໊લ w ઒্༞࢘ Ώ͔͡Θ  w ॴଐ w

    ΧϥϏφςΫϊϩδʔ w ৬छ w όοΫΤϯυΤϯδχΞ w 5XJUUFS w !ZVKJLBXB@QZ w ࠷ۙ͸&MJYJS΍͍ͬͯ·͢
  2. %BTIͷΠϯετʔϧ ެࣜαΠτʹैͬͯΠϯετʔϧ͠·͢ɻ pip install dash==0.19.0 # The core dash backend

    pip install dash-renderer==0.11.1 # The dash front-end pip install dash-html-components==0.8.0 # HTML components pip install dash-core-components==0.15.2 # Supercharged components pip install plotly --upgrade # Plotly graphing library used in examples ͜ΕͰ͋ͱ͸Python͚ͩͰϓϩάϥϛϯάʂԼهͷΑ͏ͳάϥϑΛ࡞ΕΔʂ
  3. %BTIαϯϓϧίʔυ import dash import dash_core_components as dcc import dash_html_components as

    html app = dash.Dash() app.layout = html.Div(children=[ html.H1(children='Hello Dash'), html.Div(children=''' Dash: A web application framework for Python. '''), dcc.Graph( id='example-graph', figure={ 'data': [ {'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'SF'}, {'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': u'Montréal'}, ], 'layout': { 'title': 'Dash Data Visualization' } } ) ]) if __name__ == '__main__': app.run_server(debug=True)