How to create a long table
If you want to show more than 20 rows of data, your best choice in Datawrapper is the long table. Check out the example below. It has quite a number of features, such as pagination and even a (very fast) search. So consider the long table as an optional, additional piece of information, e.g. for rankings or detailed local election results. On occasion, a long table can be the main content of a post or article.
The table below consists of 50 entries. With Datawrapper, you can present the whole dataset, make it searchable, sortable, and visually appealing. Header colors can be changed and social media buttons can be added later.
Keep in mind though that in order to enable fully responsiveness the number of columns has some limits. A long table with >10 columns will be squeezed on a mobile screen, simply because of the dimensions of the screen. Should you have that much information the recommended solution is to break up the table into several tables or visualizations. Mobile users can sum up to 50 percent or more of your readers, for them (and for the desktop users as well) it is better to not overdo a table. Instead try to think of breaking up the information you got into pieces, which are easier to understand.
Let us go on to create the table below:
1. Preparing and importing the data
This is the dataset that powers the table above. Basically, it's a 1:1 copy of your dataset but without losing spreadsheet features like sorting and searching. At the same time, it looks better than an embedded Excel table. Note that in the table below the numbers are on the left side of the columns, which indicates that the Excel version below sees them as text.
While Datawrapper is quite good at detecting the format of input you should try to make sure in Excel that the formats are all corrected. A good visual indicator – depending on the version of Excel you use and the language settings is whether the values are aligned on the left or the right of the cells. If they are aligned left, they are understood as text. If they are aligned right, they are detected as numbers. In our example below the separator (a dot) results in the number being falsely detected as text. Given that people around the world use Datawrapper simply take this as a point to check - American users, for example, would see numbers with a comma being understood as text instead of numbers. Datawrapper provides a very easy to use "locale settings" which corrects this with one click. So it is your choice whether you localize the data already in Excel or later in Datawrapper.
Click on the screenshot above to get the data from a Google Sheet.
- One header row containing categories
- Each column containing values of measures according to their dimension
- Values of different dimensions/columns do not necessarily are of the same measures
Once your dataset looks like this, you can copy it into Datawrapper and click "Upload and continue".
2. Check & Describe
By using the number locale all the numbers in the columns starting with C and onward are now aligned right, which means they are correctly parsed as numbers.
In this step, you can check if Datawrapper copied your data correctly. If everything looks like it does in your spreadsheet programme, you're good to go.
Make sure that the box "First row as label" is ticked so that Datawrapper correctly assigns the values to the labels. Click on "Proceed" and Datawrapper will take you to the next step.
The chart type to choose is the " Long Table". If you just started working with the tool note that the selection of the chart type will affect the options available in Refine, Annotate, and Design. We cover the options specifically for the long table in a separate short tutorial found here.