///////////////////////////////////////////////////////////////////////////////////////// import java.util.*; // variables text PFont font_01; PFont font_02; PFont font_03; ////////////////////////////////////////////////////////////////////////////////////////// //global List of the data ArrayList transactions = null; // arrays hours int[] arre ={ 0,0,0,0,0,0,0,0,0,0,0,0}; int[] arre1 ={ 0,0,0,0,0,0,0,0,0,0,0,0}; // String text String lavel = (" AM PM 1D ST "); // variables position int menu = 650; int posx = 70; int posy = 500; // variables for average and so on int sum =0; int am = 0; int pm = 0; int ave =0; int ave24 =0; int ave_am =0; int ave_pm =0; int sum1 =0; int am1 = 0; int pm1 = 0; int ave1 =0; int ave241 =0; int ave_am1 =0; int ave_pm1 =0; int xavg =0; int xavg1 =0; // variables for stardard deviation, Z and CC int process =0; int process1 =0; float std_dev = 0; float std_dev1 = 0; float Z =0; float Z1 =0; float lo = log(10); float cc= 0; String dia = "One Day"; ////////////////////////////////////////////////////////////////////////////////////////// void setup() { size(1000,700, P2D); frameRate(10); // load Fonts font_01 = loadFont("Helvetica-16.vlw"); textFont(font_01, 14); font_02 = loadFont("Helvetica-12.vlw"); textFont(font_02, 12); font_03 = loadFont("HelveticaNeue-30.vlw"); textFont(font_03, 30); // function to count number of elements per hour counter(); // function for averages, Z, and CC averages(); } ////////////////////////////////////////////////////////////////////////////////////////// void draw() { background(30,20,100); //color fill stroke and some text fill(10,10); stroke(40,200,200); rect(10,10,width-20,height-20); fill(255,10); textFont(font_01, 14); fill(40,200,200,150); rect(10,menu,(width/3)-5,40); text("Seattle Public Library One Day Traffic", 55, 40); textFont(font_02, 12); text("by Andres Burbano", 55, 620); text("Information Visualization MAT UCSB", 690, 40); textFont(font_01, 14); // mouse potion and important functions if(mouseX > 10 && mouseX < (width/3)-5 && mouseY > menu && mouseY 10+(width/3)-5 && mouseX < 10+((width/3)*2) && mouseY > menu && mouseY 10+((width/3)*2)-5 && mouseX < width-10 && mouseY > menu && mouseY