Home- Data Collection- Data Mining- GPL Software- Services- FAQ- Tips
Frequency Calculation ChartThis script creates a graph that shows a frequency calculation between events. The database call returns a record set containing the times in which the events occurred. The script then figures out the number of seconds between each event. Dividing this number into 3600(seconds in 1 hour) gives the frequency. The frequency is then plotted on the chart as a horizontal line. The time of each event is plotted as a red dot using the time for the X axis and the frequency for the Y axis. Add some records to demonstrate use mysql -p *password* use data delete from data_bit where ts < 19900102000000 and ts > 19900101000000 and station = 1; delete from comments where ts < 19900102000000 and ts > 19900101000000 and station = 1; insert into comments values (19900101003000,1,"OPEN SOURCE POWER"); insert into comments values (19900101012000,1,"Frontier Technologies"); insert into comments values (19900101052000,1,"MORE -- Slide the bar"); insert into data_bit values (19900101004500,1,0,1); insert into data_bit values (19900101010100,1,0,1); insert into data_bit values (19900101010200,1,0,1); insert into data_bit values (19900101010300,1,0,1); insert into data_bit values (19900101010400,1,0,1); insert into data_bit values (19900101010500,1,0,1); insert into data_bit values (19900101010600,1,0,1); insert into data_bit values (19900101010700,1,0,1); insert into data_bit values (19900101010800,1,0,1); insert into data_bit values (19900101020000,1,0,1); insert into data_bit values (19900101023000,1,0,1); insert into data_bit values (19900101024000,1,0,1); insert into data_bit values (19900101030000,1,0,1); insert into data_bit values (19900101030030,1,0,1); insert into data_bit values (19900101030100,1,0,1); insert into data_bit values (19900101030130,1,0,1); insert into data_bit values (19900101030200,1,0,1); insert into data_bit values (19900101030230,1,0,1); insert into data_bit values (19900101030300,1,0,1); insert into data_bit values (19900101030330,1,0,1); insert into data_bit values (19900101030400,1,0,1); insert into data_bit values (19900101030430,1,0,1); insert into data_bit values (19900101030500,1,0,1); insert into data_bit values (19900101040000,1,0,1); insert into data_bit values (19900101040130,1,0,1); insert into data_bit values (19900101040300,1,0,1); insert into data_bit values (19900101040430,1,0,1); insert into data_bit values (19900101040600,1,0,1); insert into data_bit values (19900101120430,1,0,1); insert into data_bit values (19900101120550,1,0,1); insert into data_bit values (19900101150000,1,0,1); insert into data_bit values (19900101180130,1,0,1); insert into data_bit values (19900101180300,1,0,1); insert into data_bit values (19900101180430,1,0,1); insert into data_bit values (19900101180600,1,0,1); quit Place the script in the /home/data/www/ directory on the server. Source Code Call the script like this frequency.php?edate=1990-01-01&station=1&element=0&value=1 |
Home-
Data Collection-
Data Mining-
GPL Software-
Services-
FAQ-
Tips
http://sourceforge.net/projects/frontiertech/