Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Advise needed: Plugin for importing CSV data to a scatter plot

  • Advise needed: Plugin for importing CSV data to a scatter plot

    Posted by Søren Storm on June 7, 2016 at 8:47 pm

    Hello Forum, and thank you for reading this!

    I´m doing science videos, and I need to present a graph, with scattered XY data from an experiment.

    I´m pretty new to AE, so until now, I have done my graphs in Illustrator, seperate in two layers, one for axis / titles, and one layer for data points. Revealing data has been done by unmasking the datalayer on top of the axis/titles layer. It is an ok way of doing it, but still has it´s upsides and downsides. Especially if there is changes to the dataset, or a new dataset comes along.

    I saw that some plugins were able to extract text from a CSV file, for lower thirds, and thought, “hey, maybe I´m able to get data for a graph with a plugin”. I haven´t found any, so now I´m wondering if anyone knows of any plugin or combination of plugins that will do the trick?

    Best regards
    Søren

    Joe Clay replied 9 years, 11 months ago 3 Members · 16 Replies
  • 16 Replies
  • Joe Clay

    June 7, 2016 at 9:22 pm

    Looks like this might help you out:

    https://aescripts.com/aeinfographics/

    Joe Clay
    Workbench.tv

  • Søren Storm

    June 8, 2016 at 7:40 am

    Thank you Joe 🙂

    But as I see it, this plugin only transfers a text and a value, not a x value and a y value. So I might buy it and try to edit it to do what I need 🙂

    Best regards
    Søren

  • Joe Clay

    June 8, 2016 at 2:56 pm

    Ah. I see, it’s more for charts not so much graphs. I would be surprised if no one has made something that does that.

    Joe Clay
    Workbench.tv

  • Walter Soyka

    June 9, 2016 at 12:28 am

    Are you familiar with expressions in Ae? You could parse a CSV file with a few expressions if you haven’t found anything else.

    What does your dataset and graph look like?

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Joe Clay

    June 9, 2016 at 5:05 am

    True, but wouldn’t you need a script for anything meaningful? I mean you’d probably want separate layers or at least separate paths in a shape layer.

    Joe Clay
    Workbench.tv

  • Søren Storm

    June 9, 2016 at 9:03 am

    I think I get what you mean. I have done some scripts in the past, but nothing fancy. I have done some basic copy paste scriptning, were I needed a plane to follow a parabolic path, which involved editing existing code.

    I have an idea of what the overall code might do:

    1) Read file, find number of coordinate pairs (x, y), and determine max / min values

    2) Read coordinates into an array (I guess)

    3) Convert coordinates to fit on the screen (x_max = 1920, y_max=1080, minus some space for the graph axis)

    4) Put each coordinate into a shape (a small circle), in a shape layer

    And that would be it. Later on I would like to experiment with things like letting the coordinates scroll through the screen (if its a large dataset). This I guess could be achieved by setting the coordinate for each frame, minus e.g. the framenumber, and masking the coordinates out.

    BUT: I have no clue on how to do 1) – 4). Any help would be greatly appreciated! 🙂

    Best regards
    Søren

  • Søren Storm

    June 9, 2016 at 9:06 am

    I think paths into a shape layer would be the way to go. I have MANY coordinates. Wouldn´t it be confusing with 500+ layers?

  • Søren Storm

    June 9, 2016 at 9:09 am

    Sorry – the file was not included. I have the example here; from dropbox:

    https://www.dropbox.com/s/620fpaod9ezwuhn/example.txt?dl=0

    If you can´t read it; I have copy pasted part of it here:
    Time (s) Pulse (BPM)
    1 71
    2 71
    3 72
    4 65
    5 65
    6 64,875
    7 64,75
    8 64,625
    9 64,5
    10 64,375
    11 64,25
    12 64,125
    13 64
    14 65
    15 65,6667

    …And so on for 2000 seconds.

  • Joe Clay

    June 9, 2016 at 2:55 pm

    Randomly, I ended up helping a friend last night with a quick script to import text and scale values from a CSV for a tag cloud, and it was easy enough to modify to create this rough script. I’ve never created shape layers before, so I didn’t put in an actual shape yep, but this makes the layers, spaces them out by 10px, and starts the graph from 1,1080 in the corner (I set it up for an HD comp).

    Here’s the script: https://www.dropbox.com/s/qyiuf90cxyifw9b/wbGrapher.jsx?dl=0

    So to use it, you just run it and import your csv (I had to take your csv and modify it because csv’s don’t like decimals that have commas. 🙂 I used numbers to do it but I’m sure you can do it in Google Docs or Excel. You’ll need to do it in an editor that’s not a text file so it doesn’t remove the commas you need to split the data. Anyway, find and replace your commas with periods. And then take off the headings. So it should just be your numbers.

    Then on the first shape layer, add your shape. You can put a simple circle and fill, or whatever you want. Then, copy everything under contents in the shape and select all the remaining layers and paste it. Then just put a null at 1,1080, and parent all of your layers to it. You can scale the null or whatever to change the graph. If you like you can also modify the script. You might want to add a multiplier to the y values. You can scale the null x and y differently, but it’ll stretch the contents of the shape of course.

    I might change the script in the future, so if anyone comes along, hit me up here and I’ll relink a new one if it’s no longer there. I hope this helps!

    Joe Clay
    Workbench.tv

  • Søren Storm

    June 9, 2016 at 3:01 pm

    Wow! Thank you! I can’t wait to check this out! I’ll be back with the result of your work! Thanks Joe!!

Page 1 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy