Site icon R-bloggers

Overview of Dash Python Framework from Plotly for building dashboards

[This article was first published on Appsilon Data Science Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Appsilon Tech Talks – each Wednesday we hold internal meetings where we discuss technology. By sharing our tech talks with the community and contributing to open source, we inspire discussion and growth that allow others to learn from our accomplishments and to share with us.

Lately, I had a chance to present a tech talk about Dash Python framework. Dash is a reactive framework for building Dashboards. They are like ones build using Shiny R framework. At Appsilon we’ve already build complex dashboards in Shiny. We also deployed them for thousands of users.

Python community is catching up and we are happy to explore opportunities. It is worth to compare the two. We’ve started with several internal tests. We already delivered Dash projects for most innovative clients. Starting today we deliver business projects written in Dash for a broader audience. Below you can see a quick summary of our lessons learned!

This tech talk covers basics and more advanced topics. You will start simple to finish with building custom components and scaling.


The broader list of topics covered in the tech talk:

1. What is Dash?

2. What you get with Dash

3. Dash demo application with source code explained.

A deeper look into Dash interactivity and description of how recalculations work.

4. What are the Dash core components? How to build customized components?

You can implement your own components in Dash. For more information on how to do that visit https://dash.plot.ly/plugins

We have started implementing our own components and helpers:

5. Single threaded Dash

Graph recalculation is blocking and is single threaded. However, we can extract the flask server that is generated and use gunicorn to make the computations concurrent.

Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP Server for UNIX. It’s a pre-fork worker model. The Gunicorn server is broadly compatible with various web frameworks, simply implemented, light on server resources, and fairly speedy.

Seems to still have a limit on concurrent users.

6. Dash limitations

7. Questions and Answers session

  1. Does state stay on the server or on the Client? Compared Shiny and Dash.
  2. Using memoization as a workaround. Discussing threading with memoization.
  3. How is specifying reactivity different between Dash and Shiny? Pros and cons of each model.

I hope you like it! Please let me know in the comments what would you like to explore next!

Resources:


Read the original post at Appsilon Data Science Blog.

Follow Appsilon Data Science

To leave a comment for the author, please follow the link and comment on their blog: Appsilon Data Science Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.