Read data from csv file

Hello, @fleshcircuit,

What would you like to do with the data? Since you created a large canvas, you probably wanted to display it in some fashion.

Here’s an example that simply displays it as text on a small canvas:

import csv
def setup():
    size(300, 240)
    textSize(24)
    fill(0)
    noLoop()
    background(255)
def draw():
    # get the data and store it in a list for later use
    t = csv.reader(open("BiometricDataTest.csv"), delimiter="\t")
    t_data = []
    for row in t:
        _day, _date, _time, x, y, z = row
        t_data.append([int(x), int(y), int(z)])
    # do something with the data
    for row, data in enumerate(t_data):
        text("{:03d} {:03d} {:03d}".format(data[0], data[1], data[2]), 20, (row + 1) * 32)

Biometric