What are the pros and cons of Dash by Plotly vs Jupyter Dashboards?

Question:

Dash by Plotly looks like a great way for a Python developer to create interactive web apps without having to learn Javascript and Front End Web development. Another great project with similar aims and scope is Jupyter Dashboards.

What are the pros and cons of each?

In particular in a multi-user deployment? I also found the Plotly documentation quite unclear on what exactly is Open Source and whether the data gets uploaded to them or if the plotting can be done offline? There are clearly two modes for the underlying Plotly library but what mode does Dash operate in?

Asked By: snth

||

Answers:

Well for one jupyter dashboards are free, ploty dashboards I would assume use the ploty library, where as the jupyter dashboards can use what ever modules/libraries you want. I just finished making a jupyter dashboard today to aggregate information from all of our CI systems. It was incredibly easy and honestly kind of fun. Once you get one or two data sources figured out adding a new one or adding a new widget is easy along with adding control widgets.

Answered By: Shawn S

Disclaimer: I wrote Dash 🙂

I’d recommend just trying both of them. Dash takes about 30 minutes to run through the tutorial.

I’d also recommend checking out:

  • The Dash announcement letter. This is a comprehensive introduction to Dash including examples, architecture, and a discussion about licensing (MIT).
  • Live examples of Dash Apps in the Dash App Gallery

There are some high-level features of Dash (these are covered in the announcement letter in more detail)

  • Dash Apps require very little boilerplate to get started – a simple “hello world” Dash app that dynamically displays a graph based off of a dropdown’s value weighs in under 50 lines of code.
  • Dash Apps are generated entirely from Python, even the HTML and JS
  • Dash Apps bind interactive components (dropdowns, graphs, sliders, text inputs) with your own Python code through reactive Dash “callbacks“.
  • Dash Apps are “reactive” which means that it’s easy to reason about complicated UIs with multiple inputs, multiple outputs, and inputs that depend on other inputs.
  • Dash Apps are inherently multi-user apps as the “state” of the app is entirely in the client: multiple users can view apps and have independent sessions.
  • Since Dash has a traditional stateless backend, it’s easy to scale apps to serve hundreds or thousands of users by scaling up the number of worker processes. Requests are sent to whichever worker is available, enabling a small number of workers to service a larger number of sessions.
  • Dash uses React.js to render components and includes a plugin system for creating your own Dash components with React.
  • Dash’s Graph component is interactive, allowing Dash app authors to write applications that respond to hovering, clicking, or selecting points on the graph.

I also found the Plotly documentation quite unclear on what exactly is Open Source and whether the data gets uploaded to them or if the plotting can be done offline?

It sounds like this is referring to the plotly.py graphing library. This is a separate library than Dash. Both libraries use the MIT licensed plotly.js library for creating charts. plotly.js doesn’t send any data to the plotly server – it’s completely client-side.

The plotly.py library includes methods to send the data to your online plotly account for hosting, sharing, and editing the charts but it’s completely opt-in. Again, plotly.py is a separate library than Dash. plotly.py is for interactive graphing, Dash is for creating interactive applications (which can include charts).

In particular in a multi-user deployment? There are clearly two modes for the underlying Plotly library but what mode does Dash operate in?

  • Dash is MIT licensed. You can run Dash on your own servers or on your machine.
  • Dash uses a Flask server, so you can deploy Dash apps in the same way that you would deploy Flask apps
  • Plotly licenses Dash Enterprise, a platform that can be installed on your own infrastructure. Dash Enterprise is a “PaaS” that makes it easy to deploy apps on your own servers, SSO/LDAP authentication, additional design capabilities, additional app capabilities, and more.
Answered By: Chris P