Page 1 of 1

Graphing from the monthly logs and dayfile.txt

Posted: Sat 01 Jan 2011 10:17 am
by DaveNZ
This is something I've been working on for a while now: creating historic graphs using monthly logs and dayfile.txt.
First I wrote up a script to create new log files with data every 10 minutes as opposed to 1 minute, which takes up a huge space on the server.

I just threw together a page (not part of the main site) "show-casing" the graphs I managed to output:
http://howick.localweatherview.com/hist ... owcase.php

Some of the data is averaged, still it is rather spiky though.

Overall a great php practice exercise (very time consuming, but there was a lot of time to spare recently!), and I learnt a few new things also.

Motivation behind the whole thing was that every browser can see the graphs as they are PNG's, and not javascript generated, and also because I prefer writing my own scripts - so much more satisfying ;)

My site visitors (who number few!) have barely used the current historic page to my disappointment, so gotta show someone...
Comments/suggestions welcome! :) 8-)

Re: Graphing from the monthly logs and dayfile.txt

Posted: Sat 01 Jan 2011 11:56 am
by captzero
Great work Dave. :clap:

Looks good. Too bad I don't have php on my server. :cry:

Cheers

Re: Graphing from the monthly logs and dayfile.txt

Posted: Sat 01 Jan 2011 8:51 pm
by DaveNZ
You can always ask daj to move to the localweatherview domain! 8-)

Re: Graphing from the monthly logs and dayfile.txt

Posted: Sun 02 Jan 2011 2:42 am
by captzero
Good idea. I sent David a PM. Just waiting to hear back.

Re: Graphing from the monthly logs and dayfile.txt

Posted: Sun 02 Jan 2011 6:46 pm
by TNETWeather
Very nice work Dave.

Re: Graphing from the monthly logs and dayfile.txt

Posted: Fri 06 May 2011 7:46 am
by mcrossley
Dave

Do you have any plans on releasing your scripts? They look very useful.

I've am moving my weather website from a hosted environment to my own 'weather' laptop at home (the traffic is negligible, nearly all me anyway!), and have not yet implemented any MySQL. Your scripts look like I may be able to do without it anyway.

Ta
Mark

Re: Graphing from the monthly logs and dayfile.txt

Posted: Fri 06 May 2011 8:07 pm
by DaveNZ
mcrossley wrote:Dave

Do you have any plans on releasing your scripts? They look very useful.

I've am moving my weather website from a hosted environment to my own 'weather' laptop at home (the traffic is negligible, nearly all me anyway!), and have not yet implemented any MySQL. Your scripts look like I may be able to do without it anyway.

Ta
Mark
No plans at this stage - the script is rather messy and in its current state highly customised.
And I had planned to rewrite it at some stage in a 'better' way. Never enough time though!