Python Agenda Arakawa 101 How To build a data app by Python (or how Arakawa, Steamlit, Dash, etc. work) What Is Data App? ChatGPT says: 「データアプリ」とは、データを対話的に表示、分析、視覚化するために特別に設計されたアプリケーションを指します。これらのアプリケーショ ンは、データサイエンティスト、アナリスト、開発者がダッシュボード、レポート、およびインサイトを伝えるのに役立つインタラクティブツール を作成するためによく使用されます。Streamlit は、そのようなデータアプリを構築するための人気のあるフレームワークの一つです。 Key Features of Data Apps Interactivity データアプリは、ユーザーがデータの視覚化や分析をリアルタイムで操作できるように、スライダー、ドロップダウン、ボタンなどのインタラクティ ブな要素をしばしば含んでいます。 Data Visualization 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 1/24
Dashboarding ビジネスメトリクス、財務データ、運用パフォーマンスを監視するためのダッシュボード作成。 Data Exploration データセットをインタラクティブに探索するツールを構築し、ユーザーがデータをさまざまな方法でフィルタリングして視覚化できるようにする。 Arakawa 101 Arakawa は、純粋な Python でスタンドアロンのデータアプリを作成するためのライブラリです。 スタンドアロンとは、バックエンド(例: Flask, FastAPI など)なしでアプリが機能することを意味します。 Acknowledgements Note 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 2/24
launched Datapana v0.2.76 has been published on PyPI. 2020/05 Started using Datapane My team has started using Datapane in an in-house project. 2022/12 Datapane declared EOL 2023/09 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 3/24
existing project and may be confusable. PyPI エラーを避けるため. プロジェクト名が既存のプロジェクトに似ている場合、PyPI はリリースを拒否します。 例えば、miniset という名前でプロジェクトを公開しようとしましたが、mindset という奇妙なプロジェクトがあるため拒否されました。 商標問題を避けるため。 ( 地名が商標として認められることはない?) Why Arakawa/Datapane? Arakawa は静的な HTML レポートを作成します。これは、plotly/dash や streamlit/streamlit などの動的データアプリに比べて以下の利点がありま す: Datapane announced the discontinue of the project. Reborn as Arakawa Arakawa has been published on PyPI. 2024/10 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 4/24
dynamic data apps such as plotly/dash and streamlit/streamlit: コスト削減(Streamlit & Dash のように Web アプリを実行する必要はありません) 共有が簡単(HTML を送るだけ) What's New in Arakawa Pandas v1 to v2. NumPy v2 (support both v1 and v2). RELAX NG ( lxml ) to Pydantic. Misc.: Bokeh v2 to v3. Apache Arrow v9 to v18. CodeMirror v5 to v6. Vite v3 to v6. Demo Demo 詳細は公式ドキュメントをご覧ください。 Standard, In-House CDN and Standalone Modes Standard mode 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 5/24
ar report = ar.Report(ar.Text("Hello, world!")) report.save("report.html", cdn_base="http://...") 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 6/24
App by Python それでは、次のライブラリを見て、これがどのように設計されているかを理解しましょう: Arakawa/Datapane Streamlit Dash pydantic/FastUI ( 厳密にはこれはデータアプリではありませんが) report.save("report.html", standalone=True) Note 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 7/24
Frontend: シリアライズされたオブジェクトを JavaScript オブジェクトにで Siri アライズします(optional ) 。 JavaScript オブジェクトをレンダリングします(オブジェクトをコンポーネントに変換します) 。 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 8/24
Arakawa JSON (Pydantic) Datapane XML (lxml / RELAX NG) Streamlit Protobuf Dash JSON FastUI JSON (Pydantic) Arakawa は JSON としてシリアライズされます: Note import arakawa as ar ar.Report(ar.Text("Hello, world!")) 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 10/24
= Dash() app.layout = [ html.P("Hello, world!"), ] if __name__ == "__main__": app.run(debug=True) 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 16/24
fastui import FastUI, prebuilt_html from fastui import components as c c.ModelForm.model_rebuild() 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 17/24
api_index(): return c.Page(components=[c.Markdown(text="Hello, world!")]) @app.get("/{path:path}") async def html_landing() -> HTMLResponse: return HTMLResponse(prebuilt_html(title="FastUI Demo")) 1/20/25, 1:19 PM Arakawa 101 Or How To Build a Data App by Python 127.0.0.1:8000 18/24