Caro-COOPS Bulletin Board Forum Index Caro-COOPS Bulletin Board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   CalendarCalendar   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

buoy query and graphs

 
Post new topic   Reply to topic    Caro-COOPS Bulletin Board Forum Index
   -> Tools, Perl / PHP
View previous topic :: View next topic  
Author Message
jcothran



Joined: 24 Feb 2003
Posts: 189
Location: Columbia, SC

PostPosted: Tue Oct 19, 2004 2:55 pm    Post subject: buoy query and graphs Reply with quote

This is some minimal documentation that describes the content of this zip file. This is some code which I use to produce graphs and download some data for the website.

A sample of this can be seen at
http://www.carocoops.org/carocoops_website/buoy_query.php

The graphing package used is 'gnuplot':

Gnuplot
gallery images(underneath the code listings)
http://t16web.lanl.gov/Kawano/gnuplot/gallery/index-e.html
home
http://t16web.lanl.gov/Kawano/gnuplot/index-e.html

Visualize your data with gnuplot
http://www-106.ibm.com/developerworks/library/l-gnuplot/?ca=dgr-lnxw41gnuplot

If you just want to see the basic gnuplot scripts that I've used, look under /server/graph at the *.lib files

The folder 'website' represents php and support files which run on the web server. These files build up a query request and output(plot graph, show data, download data) that is responded to by perl scripts on the server.

Under the folder 'server' I've included all the scripts which are called by the website(located under /server/graph) along with a few batch files(updateGraphDayWeek, updateGraphYear) I run from time to time to pregenerate a few graphs.

For each of the graph types under '/server/graph/' the primary file to look at is the one with the 'PlotGraph' suffix. The 'ShowData' and 'DownloadData' are different from these files only by what's listed as different in the file 'PlotvsShowDiff'.

For the website, I use 'smarty'(http://smarty.php.net/) as a templating system and the starting page is 'buoy_query.php', but the only thing really important on this page regards the call to 'ob_start()' before loading the content page(buoy_query_content). The ob_start call begins output buffering and better allows me to control the browser output depending on the processing of the page form(http://us2.php.net/ob_start).

The buoy_query_content page uses a predefined array(found at the bottom of list_functions.php) to determine the arguments to pass to the subcalls. The subcalls decide what the SQL query will be and how to process the resultset.

I also use some database/path configuration utilities which for the files under 'server' run against the 'processBuoys.ini' file.

If folks want to use this code and need more documentation, send me an email at jcothran@carocoops.org and I'll try to answer questions in this documentation as needed.

Jeremy



buoy_query.zip
 Description:

Download
 Filename:  buoy_query.zip
 Filesize:  60.67 KB
 Downloaded:  1369 Time(s)

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Caro-COOPS Bulletin Board Forum Index
   -> Tools, Perl / PHP
All times are GMT - 5 Hours
Page 1 of 1

 
Jump to: 
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by php BB © 2001, 2002 php BB Group