55

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?

snth
  • 5,194
  • 4
  • 39
  • 48
  • 9
    This comment is comparing [plotly.py](https://github.com/plotly/plotly.py) with matplotlib. The question by the OP is concerning [Dash](https://plot.ly/dash) with [Jupyter Dashboards](https://github.com/jupyter/dashboards): Dash is for creating interactive web-apps, plotly.py is for graphing. They are separate libraries with separate purposes! Dash uses plotly.js for it's core Graph component but matplotlib could also be used through the `dash_html_components.Img` component. – Chris P Jul 10 '17 at 19:15

2 Answers2

90

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.
Chris P
  • 2,888
  • 21
  • 22
  • 3
    Great, Chris... What about cons of your product? Do you see them? – Nikolay Fominyh Mar 02 '19 at 12:42
  • 3
    _Dash Apps require very little boilerplate to get started - a simple "hello world" Dash app is under 50 lines of code._ So, to me, 49 lines of boilerplate per 1 line of code seems quite a lot of boilerplate. – Toby May 20 '19 at 04:58
  • 4
    Updated - It's not just printing "Hello World", it's really creating and running a web application that renders a graph based dynamically from a dropdown. – Chris P Feb 26 '20 at 00:40
-7

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.

Shawn S
  • 49
  • 5
  • 9
    Both projects are completely free and OS. In fact, all code is on github and you can contribute - they very much accept pull-requests. I am not affiliated with plotly, but I have lot's of respect for what they are doing for community. From your answer one may assume that plotly dash is not free, which is wrong. They do offer consultancy, but lots of people would happy to take your money for Jupyter consulting – volodymyr Jul 20 '17 at 09:48
  • 2
    Thats good to know. I saw something about pricing for plotty dashboards maybe it was hosting or something, I dont know. I'll give it another look as using notebooks for dashboards is kind of like a square peg in a round hole. Thank you. – Shawn S Jul 20 '17 at 19:21