Member-only story

How to create outstanding animated scatter maps with Plotly and Dash

Animated maps in Plotly can be tricky to configure. In this tutorial, you will learn how to proceed, step by step, and realize a scatter map to follow the Covid pandemic all over the world, day after day.

Thibaud Lamothe 馃
TDS Archive
7 min readJun 8, 2020

--

Maps in Dash

Dash is a Python framework built on top of Flask and Plotly, designed to make data-driven web applications. Thanks to Plotly it provides some basic charts such as histograms and pie charts, and it also comes with a multitude of highly customizable controls such as dropdowns, checkbox, date sliders, and many more.

To build an app you can combine all of these controls and charts in one or more tabs. But when it comes to map drawing, it gets touchy. Plotly has some basic built-in maps plots: enough to show data, but not as nice as 2020 web maps should be. To tackle that weakness, Plotly made a partnership with Mapbox. Together they provide a great service.

Example of Scatter map with default plotly maps (quite ugly)

Today we鈥檒l see how to use Mapbox with Plotly within a dash application, and how to create animated scatter maps.

--

--

TDS Archive
TDS Archive

Published in TDS Archive

An archive of data science, data analytics, data engineering, machine learning, and artificial intelligence writing from the former Towards Data Science Medium publication.

Thibaud Lamothe 馃
Thibaud Lamothe 馃

Written by Thibaud Lamothe 馃

Head of Data @ Iroko, from Paris | Visit my website www.etomal.com | Unlock unlimited content medium.etomal.com/membership | 馃

Responses (4)