Data-driven expressions are a powerful way to easily make infographics templates from spreadsheets in After Effects and export for use in Premiere Pro! I recently worked with Adobe Stock to create data-driven templates available to download *for free* here!
Click the button below to download the sample After Effects CC 2019 file and sample .csv file-
*All expressions are applied to the Source Text property on a Text layer*
1. Sum Total of Numbers Data in a Column
This expression gives you the sum total of all numbers entered in a column
2. Display All Column Data with Line Break
3. Display All Column Data with Spaces
4. Color Hex Expression
5. Display Data Based on Row Number
6. Display Last Value in a Column
7. Line Break Control
It’s not possible to format text in the spreadsheet however the expression below will give you control over the number of characters to display before a line break without breaking up words. I modified this wonderful expression below from this blog post- http://www.arturobracero.com/2018/05/05/how-to-import-json-files-in-after-effects-cc-2018-to-display-twitter-data/
8. Display Column Data Based on Time
The expression below is great for showing how data changes over time! I modified this expression from this video tutorial- https://www.youtube.com/watch?v=NnSvnK4qNA8 and added a slider control to easily change the time increments for each data set.
9. Display Largest or Smallest Number in a Column
Display largest number in a column
Display smallest number in a column
10. Display the Number of Times an Item appears in a Column (text string)
For example, if the word ‘cars’ appears 10 times in a spreadsheet column the expression will return the number 10. First, it’s important to create a text layer with the Item (cars) for the expression.
11. Sort Numbers Ascending and Descending in a Column
12. Sort Number Data Descending with Corresponding Row Text Data
Ok… this one is weird but stay with me here…
This expression looks at a column of numbers, sorts them from largest to smallest, then maps the index or order in which they appear. The ‘map’ part then points to a different column, in this example ‘Text Data’ and sorts the names based on the index of the first number sort.
For example, if you have a spreadsheet with scores and team names this expression will reorder the scores from largest to smallest then reorder and list the corresponding team names as they appear in the spreadsheet- sorted from largest to smallest score.