Skip to main content
Inspiring
March 30, 2023
Question

Json file import and using the data for animation

  • March 30, 2023
  • 1 reply
  • 2470 views

Hello. 

 

I'm having some problems on how to use a JSON file to bring data from Excel file into after effects. 

 

I have a speed log data that has information per second on what the longitude and latitude is in the form of an Excel sheet. I wanna convert that into JSON (or CSV, I'm not sure which is better for afte effects) and then bring it into AE and then just animate it in text. Like I just want the text to animate like a counter but it should parse the json data. Can anyone help on how to do this ? 

 

P.s. I'm attaching the excel data, in case it's required. 

 

This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
March 30, 2023

What do you mean by "just animate it in text"? The data appears to have new entries once a second. Do you just want it to update that often? So time 21:31:00 in the data would correspond to time 0 in the comp and every second an new value would appear?

JohnK159Author
Inspiring
March 30, 2023

Yes. Exactly. 

Dan Ebberts
Community Expert
Community Expert
March 30, 2023

In the simplest form, you'd export your Excel data as a CSV and import that into AE. Then you could have source text expression on a text layer, like this:

t = Math.floor(time);
f = footage("GPS Readings.csv");
f.dataValue([1,t]) + " " + f.dataValue([2,t])

You might want to add some code to keep from running off the end of the data, or maybe format the result in a different way. Also, the degree symbol doesn't seem to survive the trip from the CSV file to the text layer--not sure what's going on there.