Page 2 of 2
Re: JPGraph from SQL data
Posted: Thu 18 Feb 2010 11:08 am
by mcrossley
Try putting the dates in the format '2009-12-19'
Mark
Re: JPGraph from SQL data
Posted: Thu 18 Feb 2010 11:27 am
by nitrx
Well it works in the sql console ( it gives me 13 values thats should be ok becuase I've data from dec 19th
http://www.apeldoorn.tk/weer/dayfile.php?m=12&y=2009
LogDate MaxTemp MinTemp AvgTemp
1261198800 0.0 -9.5 -8.60
1261285200 0.3 -7.5 -3.40
1261371600 -0.9 -5.0 -2.50
1261458000 3.0 -1.4 0.70
1261544400 1.4 -3.2 -0.20
1261630800 2.3 -4.3 -1.50
1261717200 4.0 0.6 2.10
1261803600 8.2 1.4 3.80
1261890000 5.7 2.5 4.20
1261976400 7.1 -1.9 2.90
1262062800 2.0 -3.5 -0.40
1262149200 2.0 -1.5 0.20
1262235600 0.4 -0.6 -0.30
1262322000 0.0 -6.6 -1.60
Not formatted very wel but I think these values can't be used by the graph in your example (anyway it was dumb from me to handle a diffrent format as the dabase

)
http://www.apeldoorn.tk/weer/grafiek/grafiek4.php gives as error Bad Select Statement,
thanks anyway
Re: JPGraph from SQL data
Posted: Thu 18 Feb 2010 11:46 am
by nitrx
Oeps it works I selected the wrong table thanks

Re: JPGraph from SQL data
Posted: Fri 19 Feb 2010 8:23 am
by mcrossley
I've had a quick bash at putting up a 'year to date' web page. The rainfall graph needs a bit more work though
http://weather.wilmslowastro.com/historicGraphs.htm
Re: JPGraph from SQL data
Posted: Fri 19 Feb 2010 11:23 am
by nitrx
Looks good

Rainfall can give strange figures indeed if you've 60 mm on a day or 0,1 mm
Re: JPGraph from SQL data
Posted: Fri 19 Feb 2010 11:47 am
by daj
Looks good Mark
I was worried it would get a bit crazy later in the year as you show a few hundred readings but it looks ok.
The last year
http://www.grantownweather.co.uk/histor ... p?days=365
Last 75 days
http://www.grantownweather.co.uk/histor ... hp?days=75
(I am still working on mine before I publish it officially as I am going to offer a range of views/day count)
Re: JPGraph from SQL data
Posted: Fri 19 Feb 2010 11:55 am
by nitrx
Well David your legend is out the graphic area I still have problems with it , I think the between statement is usefull I

only need to make a selector for the periods
Re: JPGraph from SQL data
Posted: Fri 19 Feb 2010 1:35 pm
by Hillbilly
I'm following this with interest, well done Mark for getting it started. David I shall look forward to your published work on a range of views. I too was worried about what a year's data would look like but agree that it looks OK on your example David. I only have 2 month's worth of data so far.
We were thinking along the lines of a bar chart for a year showing a max/min/avg temp for each month to keep it very simple and then a similar one for rainfall, but the year chart works well enough.
I've set up the graphs package and will try Mark's script to get started.
Thanks everyone.

Re: JPGraph from SQL data
Posted: Fri 19 Feb 2010 1:59 pm
by daj
Helen
The last 500 days of weather...
http://www.grantownweather.co.uk/histor ... p?days=500
I'm not sure I would show that much detail but it does prove that the Graphs can handle it
Re: JPGraph from SQL data
Posted: Fri 19 Feb 2010 2:32 pm
by Hillbilly
Thanks, that look surprisingly readable, but agree, unlikely to display more than a year.