SourceForge.net Logo

Home- Data Collection- Data Mining- GPL Software- Services- FAQ- Tips

Range Chart














This script creates a graph that shows the status of bits during one day. If a bit is on it shows up as a horizontal bar starting at the time it turned on and ending when the bit turned off. Many bits can be viewed on one chart.

Add some records to demonstrate use
mysql -p
*password*
use data
delete from elements where station = 2;
insert into elements values (2,1,"Day","Day time",255,255,51);
insert into elements values (2,2,"Night","Night time",0,0,0);
insert into elements values (2,3,"Overcast","",204,204,204);
insert into elements values (2,4,"Rain","",204,153,255);
insert into elements values (2,5,"Snow","",204,51,51);
insert into elements values (2,6,"Wind","",153,153,255);
insert into elements values (2,7,"Hail","",68,68,68);
delete from data_bit where ts < 19900102000000 and ts > 19900101000000 and station = 2;
insert into data_bit values (19900101060000,2,1,1);
insert into data_bit values (19900101200000,2,1,0);
insert into data_bit values (19900101000000,2,2,1);
insert into data_bit values (19900101060000,2,2,0);
insert into data_bit values (19900101200000,2,2,1);
insert into data_bit values (19900101230000,2,2,0);
insert into data_bit values (19900101040000,2,3,1);
insert into data_bit values (19900101130000,2,3,0);
insert into data_bit values (19900101045000,2,4,1);
insert into data_bit values (19900101121000,2,4,0);
insert into data_bit values (19900101014000,2,6,1);
insert into data_bit values (19900101183600,2,6,0);
quit

Place the script in the /home/data/www/ directory on the server.
Source Code

Call the script like this
range.php?edate=1990-01-01&station=2


Home- Data Collection- Data Mining- GPL Software- Services- FAQ- Tips

SourceForge.net Logo

http://sourceforge.net/projects/frontiertech/