Hi,
Intro:
This is my version of COVID19 tracker using Plotly Dash for the United States. I leveraged several features of Dash to put together my first Dash web application. After using Dash, I developed a much deeper appreciation for the framework.
Highlights:
I think one of the most powerful features is Row + Col to create collapsable components or widgets on the web application. The web app is hosted on Digital Ocean running on Ubuntu 18.04 server with nginx and uWSGI. I’m also using SSL through Cloudfare. I have a cron job running daily to update the covid19 data in my MongoDB instance.
Challenge:
I could not quite figure out how to update my web app with the new data even after reading through the use of Redis, hidden divs, and so forth. Essentially, I wrote a few data transformation classes in Python to manipulate raw John’s Hopkin’s covid19 data into what I wanted for my dashboard.
My Solution:
In my mind, I would need a full reload to pull the new data into the web app, which would also trigger all my data transformation layers, and this would work because the custom data transformation process isn’t heavy-duty. I ended up using touch-reload in uWSGI .ini file to enable graceful reloading and just scheduled “touch uwsgi.ini” as a cron job to run daily. This is working for me.
If anyone has a scalable approach to this, please let me know. Additionally, let me know if you have any feedback! Thanks, guys!
URL: https://cv19trackerus.com
Best,
Do
5 posts - 3 participants







