Data visualization with own images

Hey guys!
Please help!
Now I have created if else statement, I have taken it from the example and have linked if else statement from this example with my own images. And it works =) but how to make this if else statement not for the “time” but for the data from my csv-table? Can you help me with this? An example what I would like to do is: if smile < 50 than img 1, if smile >50, than img 2… and so on and this data I would like to take from the csv table… Omg! It´s so compicated:scream:
Here is my code for this moment -
void setup() {
size(700, 700);
}

void draw() {
background(0);
textSize(48);

if (hour() < 5) {
//between midnight and 5AM
text(“Go to sleep!”, 20, height-20);
}
else if (hour() < 12) {
//between 5AM and noon
PImage morning;
morning = loadImage(“morning.gif”);
image(morning,0,0);
}
else if (hour() < 16) {
//between noon and 4PM
PImage hog;
hog = loadImage(“hog.gif”);
image(hog,0,0);
}

else if (hour() < 21) {
//between 4PM and 9PM
PImage evening;
evening = loadImage(“evening.gif”);
image(evening,0,0);
}
else {
//between 9PM and midnight
text(“Good night!”, 20, height-20);
}
}