Understanding long format (tidy) data
We have a moderately complex dataset that we will be working with. It consists of four CSV files, containing information on almost all the countries and regions in the world. We have more than 60 metrics spanning more than 40 years, which means that there are quite a lot of options and combinations to choose from.
But before going through the process of preparing our dataset, I'd like to demonstrate our end goal with a simple example, so you have an idea of where we are heading. It will also hopefully show why we are investing time in making those changes.
Plotly Express example chart
Plotly Express ships with a few datasets for practicing and testing certain features whenever you want to do so. They fall under the data
module of plotly.express
, and calling them as functions returns the respective dataset. Let's take a look at the famous Gapminder dataset:
import plotly.express as px gapminder = px.data.gapminder() gapminder...