Black Lives Matter. Please consider donating to Black Girls Code today.

Creating a dashboard using a MySQL connection

I’m creating a dashboard that visualizes data pulled from a MySQL database through a python connection. I am using Flask as a way to pass this data from a python script to an html page so that I can then use JavaScript to visualize the data (using the plotly.js library of course). Currently, if the data in the database is updated and I want this to be reflected in my visualizations, I have to refresh the page.

I noticed Plotly offers a database connector software that could make my work easier. Does this software update data in real time? If not, what approach is recommended for my use case? I tried visualizing using python, but it seems that I’m only able to upload my visualizations to the plotly cloud and then getting the iframe so I can embed it in my website, but then the visualization will not be updated unless the python script is executed again.

I appreciate any advice!