In 2020 we all got used to seeing a lot more data in the media than we were used to. The sophisticated data dashboards created by Johns Hopkins University, among others, became a staple of news presentations about the spread of COVID-19 and were essential viewing.
So, if any positives have come out of the pandemic, maybe one is that more people can understand graphical representations of data.
That experience has, perhaps, led to the greater use of graphs and dashboards in the presentation of data of all types, whether it be medical, financial or other numbers in the news.
Along with graphs that represented the exponential growth of infection rates and tracked R numbers, we also got used to the type of geographic information that we see in the Johns Hopkins dashboard above. The one we see above shows a global view of how the pandemic was developing but we all had our local versions of these systems, too.
Those applications used sophisticated software to represent the data and the geography onto which it was mapped but we can attempt to do something similar — albeit rather simpler — using Plotly and Streamlit.
We’ll start by creating some simple maps in Plotly and work our way up to a data dashboard inspired by Johns Hopkins University using Streamlit.
The final app will look something like the image below.
But before we get to the app, we need to explore how to use Plotly maps.
Plotly supports a few map types but we are going to use outline maps as they are simple to use and clear. The image below shows a Streamlit app with two versions of Plotly outline maps that represent the population of Australian states. The one on the left is a Choropleth: a map with coloured…