Interactive Map / Index of Economic Freedom 1995-2020 in Tableau
- Sergio Pedraza J
- 10 jul 2020
- 1 Min. de lectura
Actualizado: 13 jul 2020
I have developed an interactive map in Tableau Public that shows how free countries are in terms of economics, from 1995 to 2020 (more information in https://www.heritage.org/index/about).
(Click the picture to open the viz in Tableau Public)
Let me briefly show you how I built this visualization.
1. Data Gathering.
The data source for this visualization is the heritage.org website (https://www.heritage.org/index/explore?version=84).
Because of a restriction in the Heritage website, to download the full dataset from 1995 to 2020, I exported the results year by year to several .csv files.
After this, I proceeded to combine all those files and preprocess the data to prepare it for the visualization tool.
2. Data Preprocessing.
All the raw .csv files and python scripts to perform this step can be found in the following github’s repository: https://github.com/sergiopedrazaj/Index-of-Economic-Freedom-1995-2020/.
I decided to use the power of Python’s pandas and glob libraries to combine all the .csv files into one dataset, as follows (“Combine .CSV Files.ipynb” in the repository):
Once I generated the “1995_2020.csv” file, I preprocessed the dataset to avoid missing values alerts in Tableau. The Preprocess Data script generates the “1995_2020_preprocessed.csv” file:
3. Data Visualization.
Dashboard available in: https://public.tableau.com/profile/sergio.pedraza#!/vizhome/IndexofEconomicFreedom1995-2020/IndexofEconomicFreedom
I connected the “1995_2020_preprocessed.csv” file to Tableau Public as shown in the following picture:

Then, I plotted the data using the “Map” visualization. I added a “Year” controller to show how the classification of each country change over the years according the Index, as shown in the following picture:

If you liked it, let me know!
Have a great day!
Comentarios