All three tables show exactly the same information: What many data sources give us:įun fact: The table on the left is pretty long. Let’s add some colors, to see the difference in these tables better (The two tables on the right are the same, just with switched columns and rows.). Ugh, that’s not ideal, is it? What we actually need to create a line chart in Datawrapper (and many other charting tools) is this table format: Let's begin: The difference between long and wide formatĮvery time we download something from the We will use pivot tables to create the following chart out of data that I found at Our World in Data: And that’s what I’ll explain in this article.
For example, if your original table has the salary of each person in each country, you could use a pivot table to calculate the average salary in each country (the country is your group).īesides doing all the summarising, pivot tables are excellent to get your data from the long format into a wide format. You can calculate averages, counts, max/min values or sums for numbers in a group. Pivot tables are extra tables in your Excel/Google Sheets/LibreOffice etc., in which you can summarize data from your original table. This article was first published on the Datawrapper blog.
How to get data in the right format with pivot tables