Data of CSV File shows as one group

New Here ,
Apr 14, 2022 Apr 14, 2022

Copy link to clipboard

Copied

Hi everyone,

i´m currently trying to path a graph from a CSV file in after effects, but i´m still having a few problems. When importing the CSV file into after effects, it shows as one group (time;cases;...;...) 

Screenshot 2022-04-14 at 11.30.34.png

instead of having each of these in a different group (when importing it as a TSV file it does split it up into different groups, but it cant turn the results into numeric values). 

Screenshot 2022-04-14 at 11.28.16.png

When working with the TSV File the code works but only gives me a straight line a the bottom. Is there anything more wrong with my code?

var numberOfPoints = thisComp.layer("data all.tsv")("Data")("Number of Rows");
var spacingForPoints = thisComp.width / numberOfPoints;
var startingSpaceX = 0;
var thePath = content("Shape 1").content("Path 1").path;
var maximumYValue = effect("MaximumYValue")("Slider");
var lineHeight = 0;

var arrayOfPoints = [];

for(var i = 0; i < numberOfPoints; i++) {
	var data = thisComp.layer("data all.tsv");
	var S_down = data.footage("data all.tsv").dataValue([1,i])
	lineHeight = linear(S_down, 0, effect("MaximumYValue")("Slider"), content("Shape 1").content("Stroke 1").strokeWidth/2, thisComp.height)*-1;
	arrayOfPoints[i] = [startingSpaceX, lineHeight];
	startingSpaceX += spacingForPoints;
}

thePath.createPath(points=arrayOfPoints, inTangents=[], outTangents=[], is_closed=false);

Happy for help! Thanks!

TOPICS
Expressions

Views

44

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 14, 2022 Apr 14, 2022

Copy link to clipboard

Copied

Well, you have semicolons, not commas. Whatever program you use appears to make an oopsie when exporting the data and you need to check that.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 14, 2022 Apr 14, 2022

Copy link to clipboard

Copied

Thanks, fixing that already seemed to work. Onto to my next problem: i was following a tutorial when writing a code and i wont get any further errors. Why does it only show a straight line instead of showing the graph. The code is the exact same as in the tutorial. 

Screenshot 2022-04-14 at 11.48.34.png

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 14, 2022 Apr 14, 2022

Copy link to clipboard

Copied

LATEST

Without any idea about your actual data and what tutorial you are referring to nobody can tell you much. Chances are the values simply need to be multiplied with a fixed facto to produce distinct peaks and valleys in the graph, but of course there could be any number of other issues just as well.

 

Mylenium

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines