var count; var nodes; function preload(){ table = loadTable('3980.csv', 'csv'); } function setup(){ createCanvas(900, 900); print("Hello world!"); print(table.getRowCount() + ' total rows in table'); print(table.getColumnCount() + ' total columns in table'); //cycle through the table count=0; nodes=[]; for (var r = 0; r < table.getRowCount(); r++){ for (var c = 0; c < table.getColumnCount(); c++) { var temp = table.getString(r,c) if(!nodes.includes(temp)){ nodes.push(temp); } } } print(nodes.length); for(i=0; i50+sep*i && mouseY>50+sep*j && mouseX<50+sep*(i+1) && mouseY<50+sep*(j+1)){ fill(255, 115, 25); rect(50+sep*i,50,sep,800); rect(50,50+sep*j,800,sep); fill(0, 0, 0); text(nodes[j],40+sep*i,60+sep*j); fill(0, 0, 0); text(nodes[i],50+sep*i,50+sep*j); } } } }