Thread: Noob help for charting on web site, need assistance
I am new to the mailing list and to PostgreSQL. I am currently running PostgreSQL 9.0.4 on a Windows XP laptop. I am successfully logging sensor data to a database (temperature, humidity, voltage, etc…), I would like to display the datain a chart on a web site. Currently I am have everything on the same Windows system, PostgreSQL, data acquisition system,Apache Web server, pgAdmin III, and pgAgent. I am updating the database with a csv file (generated by the data acquisition system) with the COPY command in an SQL script(updates every minute via SQL script and pgAgent). Not the best way, but it works for now. I would like to use something simple (if there is such a thing) to show a chart of sensor output over time base on a SQLquery, e.g. hourly average past 24 hrs, daily average, weekly average, etc… The system is on a local network that shouldnot be accessible from the outside network, behind a firewall with net10 address. Because some use Macs and iPads,I can't use a Flash based product, eliminating some options. I have looked a number of charting "products", mostly based off of a google search and this page: http://webtecker.com/2008/06/12/10-free-chart-scripts/ The charting "products" include the following: Flot, Open Flash Chart, AmCharts, Emprise JavaScript Charts, PlotKit, Flotr, PHP/SWF Charts, Visifire, FusionCharts, andJFreeChart. I appreciate any help in pointing me toward a solution and/or recommendations for how to graphically display sensor dataover time. Regards, Greg Howard
On 09/14/2011 02:56 PM, Greg Howard wrote: > I am new to the mailing list and to PostgreSQL. > > I am currently running PostgreSQL 9.0.4 on a Windows XP laptop. > > I am successfully logging sensor data to a database (temperature, humidity, voltage, etc…), I would like to display thedata in a chart on a web site. Currently I am have everything on the same Windows system, PostgreSQL, data acquisitionsystem, Apache Web server, pgAdmin III, and pgAgent.... If you are running PHP you can check out JpGraph. Not free but not too expensive either and there are lots of chart options. Sparklines might be just the ticket - especially for mobile devices. One implementation is at http://sparkline.org/ Both the above are in PHP so you would need that on your system. You could do something in JavaScript. gRaphaël is pretty cool: http://g.raphaeljs.com/ And RRDtool makes nice graphs of sensor-type data: http://oss.oetiker.ch/rrdtool/ Cheers, Steve
On 09/14/2011 04:56 PM, Greg Howard wrote: > I am new to the mailing list and to PostgreSQL. > > I am currently running PostgreSQL 9.0.4 on a Windows XP laptop. > > I am successfully logging sensor data to a database (temperature, humidity, voltage, etc…), I would like to display thedata in a chart on a web site. Currently I am have everything on the same Windows system, PostgreSQL, data acquisitionsystem, Apache Web server, pgAdmin III, and pgAgent. > > I am updating the database with a csv file (generated by the data acquisition system) with the COPY command in an SQL script(updates every minute via SQL script and pgAgent). Not the best way, but it works for now. > > I would like to use something simple (if there is such a thing) to show a chart of sensor output over time base on a SQLquery, e.g. hourly average past 24 hrs, daily average, weekly average, etc… The system is on a local network that shouldnot be accessible from the outside network, behind a firewall with net10 address. Because some use Macs and iPads,I can't use a Flash based product, eliminating some options. > > I have looked a number of charting "products", mostly based off of a google search and this page: http://webtecker.com/2008/06/12/10-free-chart-scripts/ > > The charting "products" include the following: > > Flot, Open Flash Chart, AmCharts, Emprise JavaScript Charts, PlotKit, Flotr, PHP/SWF Charts, Visifire, FusionCharts, andJFreeChart. > > I appreciate any help in pointing me toward a solution and/or recommendations for how to graphically display sensor dataover time. > > Regards, > Greg Howard > > > > > I use cron, perl and gnuplot. Simple (if you know perl) to get the data in any format you want, and graph. Cron so itsup to date, but wont bring the box down if 50 people hit refresh as fast as they can. -Andy
On 09/14/2011 02:56 PM, Greg Howard wrote: > > I am new to the mailing list and to PostgreSQL. > > I am currently running PostgreSQL 9.0.4 on a Windows XP laptop. > > I am successfully logging sensor data to a database (temperature, humidity, voltage, etc…), I would like to display thedata in a chart on a web site. Currently I am have everything on the same Windows system, PostgreSQL, data acquisitionsystem, Apache Web server, pgAdmin III, and pgAgent. > > I am updating the database with a csv file (generated by the data acquisition system) with the COPY command in an SQL script(updates every minute via SQL script and pgAgent). Not the best way, but it works for now. > > I would like to use something simple (if there is such a thing) to show a chart of sensor output over time base on a SQLquery, e.g. hourly average past 24 hrs, daily average, weekly average, etc… The system is on a local network that shouldnot be accessible from the outside network, behind a firewall with net10 address. Because some use Macs and iPads,I can't use a Flash based product, eliminating some options. > > I have looked a number of charting "products", mostly based off of a google search and this page: http://webtecker.com/2008/06/12/10-free-chart-scripts/ > > The charting "products" include the following: > > Flot, Open Flash Chart, AmCharts, Emprise JavaScript Charts, PlotKit, Flotr, PHP/SWF Charts, Visifire, FusionCharts, andJFreeChart. > > I appreciate any help in pointing me toward a solution and/or recommendations for how to graphically display sensor dataover time. I would suggest importing it into Google Docs and charting it as you would a spreadsheet and then sharing that. Sincerely, Joshua D. Drake -- Command Prompt, Inc. - http://www.commandprompt.com/ PostgreSQL Support, Training, Professional Services and Development The PostgreSQL Conference - http://www.postgresqlconference.org/ @cmdpromptinc - @postgresconf - 509-416-6579
On Wed, Sep 14, 2011 at 5:56 PM, Greg Howard <ghoward@sunscience.biz> wrote: > Flot, Open Flash Chart, AmCharts, Emprise JavaScript Charts, PlotKit, Flotr, PHP/SWF Charts, Visifire, FusionCharts, andJFreeChart. > We've used AmCharts with great success. Flaw is that it is flash, and doesn't show up on the ipad. We are moving to Hicharts JS which uses HTML5 to make awesome looking charts that display everywhere. It is, however, much lower-level than AmCharts API so you have to do a lot of JS work yourself to generate the plots. But as Joshua recommends, try using Google.... not necessarily importing into google docs, but just directly use their chart API.