Key Takeaways: Dash Dashboards


  1. Callbacks are reactive declarations. The chapter's threshold concept: in Dash, you declare which output depends on which inputs, and the framework calls your function when the inputs change. This is not imperative event handling — it is dependency declaration, similar to how a spreadsheet formula depends on its cells.

  2. Layout + callbacks = app. A Dash application has two parts: a layout (tree of html and dcc components) and callbacks (decorated functions). The layout is static; the callbacks modify it in response to user interaction.

  3. Components have IDs and properties. Every component gets an id= (for callback references) and has component-specific properties like figure, value, children, style. Callbacks connect properties via Output(id, property) and Input(id, property).

  4. Dash uses Plotly for charts. The dcc.Graph component accepts any Plotly figure. This means the Plotly Express and Graph Objects material from Chapters 20-21 applies directly — you build the figure with Plotly, you pass it to dcc.Graph.

  5. Cross-filtering is Dash's killer feature. clickData, selectedData, and hoverData on charts emit events that callbacks can consume. Clicking one chart can filter another — a pattern that is native in Dash and awkward in Streamlit.

  6. Dash Bootstrap Components add polish. dbc.Container, dbc.Row, dbc.Col, dbc.Card, and friends provide responsive, styled layouts without writing CSS. Install dash-bootstrap-components and use the BOOTSTRAP theme.

  7. dcc.Interval enables auto-refresh. Set an interval in milliseconds, and a callback fires periodically. Use for live dashboards, real-time monitoring, and anything that needs automatic updates.

  8. Multi-page apps use dash.register_page. Put pages in a pages/ folder, use use_pages=True, and Dash handles routing between pages. The page_container component renders the current page.

  9. Deployment uses standard Python web patterns. Gunicorn runs the Flask server behind Dash. Nginx provides TLS and reverse proxy. Docker packages everything. This stack is more operational work than Streamlit Cloud but gives full control.

  10. Dash vs. Streamlit is a tool choice, not a competition. Streamlit is faster for simple dashboards; Dash is better for complex ones. Most mature teams use both — Streamlit for prototypes, Dash for production. Knowing when to reach for each is the skill.


Chapter 31 moves from interactive dashboards to automated reporting — Python scripts that generate PDFs, slides, and email reports on schedules. Dashboards and reports are complementary: dashboards for users who want to explore, reports for users who want answers pushed to them.