Thursday, January 01, 2015

Graphing Rainfall

I spent a little time installing the GD graphics library on my server and then scouted out some PHP graphing libraries. I ended up with PHPGraphLib which is about as stripped down as you could imagine. The results were underwhelming.

Meh.
There's another one called pChart that seems a lot more capable, but I tried to use it and mistook m own incompetence installing GD for its failings, so I punted on it and went to PHPGraphLib. It turns out that all I needed to do was reboot the server* and I was in business. I'm going to re-install the pChart library and try that. This one looks like some researcher needed some quick and dirty graphing functions and threw this one together. It hasn't been updated in quite some time.

* - Rebooting. Is there no problem it can't solve?

4 comments:

Mostly Nothing said...

Rebooting a Unix machine should be a rare occurrence. Mostly just for replacing the kernel. You can add a nd remove modules in the kernel. There is an occasional zombie that holds onto a port, but that's about it.

I had the misfortune of having to reboot a VMware ESXi host a couple nights ago, couldn't connect to it, or the VMs on it, but you could see it was still running. It was very strange. And I only had my iPad, no PC. Though my cohort had his PC we couldn't get connected.

K T Cat said...

I know that I could have solved this problem by restarting services, but I tried that and never found the right combination. I figured that a reboot would restart them all properly and sure enough, it did.

Doo Doo Econ said...

aside from the technical issues and using php, that graph is suspiciously consistent. Nature very rarely offers up consistency on that level.

K T Cat said...

DDE, the graph covers 9 or 10 days where there was no rain. The numerator is inches to date, the denominator is average inches to date. Since the denominator will be monotonically increasing, the shape of the curve over a period with no rain is to be expected. Over the long run, the graph will be a sawtooth as rains come and go.