Influenza Estimator — Dashboard
Making the final dashboard for the Influenza Estimator web tool.
The first dashboard I had made was made using simple HTML and CSS. You can find more about it here:
However, as pointed out by my mentor Lea, I could make it better, and so once I was done with the project I started working on something better.
I have used the Plotly Dash toolkit to build this dashboard which makes this really convenient. Dash is a productive Python framework for building web applications.
Written on top of Flask, Plotly.js, and React.js, Dash is ideal for building data visualization apps with highly custom user interfaces in pure Python. It’s particularly suited for anyone who works with data in Python.
Through a couple of simple patterns, Dash abstracts away all of the technologies and protocols that are required to build an interactive web-based application. Dash is simple enough that you can bind a user interface around your Python code in an afternoon.
Dash apps are rendered in the web browser. You can deploy your apps to servers and then share them through URLs. Since Dash apps are viewed in the web browser, Dash is inherently cross-platform and mobile ready.
Live Data
The first section of the dashboard is something that renders the live estimates of Influenza cases in tiles as well as a World Map view.
For the Map, I used The Dash Chloropleth Component. This is what the callback looks like:
Comparing Models
The second Section of the dashboard looks like this:
It primarily has 4 components. One controller, one Histogram, one Scatterplot and one Correlation Line Plot.
For rendering the Histogram, I used this callback:
Similarly, the scatter-plots and line-plots were rendered. Plotly Express makes everything really convenient and is a much faster alternative as compared to the conventional option.
Thus, I was able to prepare a utilitarian frontend for this Influeneza Estimator in no time :)