Why use Dash when Plotly plus Flask is easy and more flexible

Why would you want to write HTML in Python? It baffles me. But that is what you need to do if you want to write a Dash app.

While I understand that there is a certain amount of satisfaction in having all your code in a single file, it seems to me that if you know enough about HTML to code it in a different language then you certainly know enough to write it in HTML!

I’d love for Dash to be the solution to writing web visualization apps but I’m not convinced.

Consider the following:

  1. A Dash app is fundamentally a Flask app that incorporates Plotly.
  2. Writing an actual Flask app that uses Ploty is not difficult.
  3. Writing a Flask app gives you more control over what you write and is more flexible.

So, while acknowledging that Dash is a well constructed and well-intentioned tool with which you can create sophisticated and impressive web apps, I’d like to present what I think is a simpler solution — at least for simple web apps.

We are going to see just how straightforward it is to build a multi-page web app with Flask that contains Plotly charts (a task that is not straightforward with the open source version of Dash).

But first let’s do a quick comparison of a simple Dash app and it’s Flask equivalent.

#data-visualization #web-app-development #flask #plotly #dash

Web Visualization with Plotly and Flask.
4.10 GEEK