Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Generating graphs of data from SQL database - dynamically at a web server

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
martinu
Posts: 85
Joined: Wed 01 Jan 2014 7:54 pm
Weather Station: Davis Vantage Vue
Operating System: Raspberry Pi: Raspbian Stretch
Location: Rudston, North Yorkshire

Generating graphs of data from SQL database - dynamically at a web server

Post by martinu »

I am planning to start exporting my data to an SQL database on a web hosting site, probably by FTPing each month's (for example) Apr18.txt file and then doing "load data infile Apr18.txt data_table" to translate that text file into an SQL table with corresponding fields.

I'd like users of my web site to be able to select fields and a range of dates, and plot a graph of this - for example a graph of temperature, wind speed and rainfall rate between August and October (or even 17 August and 25 October).

With suitable data-entry forms and suitable SQL select statements I'm sure I could generate a list of the required values.

The one stumbling block is how to generate a graph (GIF, PNG, SVG) from this list of values (eg temperature versus date/time). I'm at a loss as to how to do this. Are there public sites which can do this generation of image file when supplied with a list of data, maybe with max/min values for scaling axes?

How have other people who produce their own weather station sites solve the problem of producing graphs on-the-fly, rather than using static images that I generate locally before uploading them.

Am I at the mercy of whatever graph-plotting utilities my web hosting company (GoDaddy) may make available on their server?
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Generating graphs of data from SQL database - dynamically at a web server

Post by water01 »

If you can code use Highcharts which is the software that generates Cumuls MX's graphs and is also used in Mark Crossley's historic charts using an SQL database as the source.
David
Image
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Generating graphs of data from SQL database - dynamically at a web server

Post by mcrossley »

Post Reply