xxxxxxxxxx
26
// Example using 2d array from getArray()
let table, tableArray;
function preload() {
table = loadTable("https://corgis-edu.github.io/corgis/datasets/csv/classics/classics.csv", "csv", "header");
}
function setup() {
createCanvas(400, 400);
tableArray = table.getArray();
colorMode(HSB, 100);
noLoop();
}
function draw() {
background("white");
noFill();
translate(width / 2, height / 2);
for(let i = 0; i < tableArray.length; i++) {
rotate(i);
stroke(tableArray[i][24], 50, 50, 50);
rect(0, 0, tableArray[i][9] / 10, tableArray[i][10] / 10);
}
}