September 30th, 2021
Let’s see what that means.
For a few years now, you could add columns in step 2: Check & Describe when creating a Datwrapper chart. They could help you sum up columns, replace or split text, deal with dates, create random numbers, and do a dozen things more. All this is still possible – we just made it easier to use.
Say you uploaded a column called “values” to the Datawrapper chart editor. Now you want to multiply it with itself, five times. So you go to step 2: Check & Describe and click on “Add column”. Last week you then had to type in
values ^ 6.
You can find the full list of expressions in our Academy.
Here’s an overview of what changed and what didn’t:
Math.round(values*10)/10, you can now type
||in your IF statements, you can now use the simpler
You can now add a column and include columns in your calculations that you calculated earlier.
The video at the top shows an example: We first create a column called
gdp and then use that column in an IF statement to create the column
We’re trying to save you some time, so each number column comes with aggregated values. For example, to get a column with the minimum value of your column
percentchange, you can write
percentchange__min. Datawrapper also supports
This can be helpful for conditions:
IF(salary > salary__mean, "earns more than the average", "earns less than the average")
The expression above gives you a column that shows whose salaries are greater or smaller than the average one.
Your added columns adapt to your data. Say your Datawrapper chart links to a CSV or Google Sheet and the data changes. Or you paste new data in step 1. In both cases and as long as the column headers stay the same, the calculations will run again on the new data. Your added columns will always show the correct numbers.
To add a new column yourself and explore how they work, hover over the following chart and click “Edit this chart” in the top right corner. This will bring you into step 3: Visualize. Now go back to step 2, and you will see that we already added two new columns. Play around with them or add more:
You might have added columns and calculations in the past. These charts will still work correctly: We changed your formulas to make them work with the new syntax. In case something still looks unexpected, please let us know at email@example.com and we’ll fix it as soon as possible.
We hope the new syntax makes it easier to calculate with your data. You can find more explanations and four examples of how to use added columns in our Academy article “How to calculate in added columns”. Feedback, questions, hints? Write to us at firstname.lastname@example.org. We’re happy to hear from you.