Narberth Weather
- weather huh!
It seems the whole country is freezing, except here in West Wales, where it's raining again. There are times I hate it here, and to be honest, that's most of the time. The problem is I like (some of) the people here. That's not to say I wouldn't like (some of) the people where ever I was, it's just that the wind kinda blew me this way.
- Was 2011 warmer than 2010?
This isn't an argument for/againt global warming and anyway, weather is not climate. I'll say it againweather != climate.
Anyway for the two full years I've been collecting data here are the results:
Year Avg-temp °C 2010 9.82 2011 9.98 So that I can remember how to do this next year, here's the mysql command:
mysql -H -e "SELECT year(datetime) AS Year , round(avg(temper),2) AS "Avg-temp" FROM data WHERE YEAR(datetime) > 2009 AND YEAR(datetime) < 2012 GROUP BY year(datetime);" tlogger -p - Early Crocus
Today the first crocus flower bloomed in my garden, actually on a tub on my patio. I say patio, but it's actually the entire outdoor space. Is this early for crocuses?
- Testing a new webserver.
I found a faster webserver. Since these pages are served up by a very old laptop with 198MB of RAM I didn't really need all thesinging/dancing features of Apache. I found Nginx, pronounced engine ex, installed it an had it running in about 5 minutes.It is supposed to use fewer resources than Apache and so far it appears to be very fast in comparison.
- Another year over so here's some monthly averages.
Year Month Temp 2009 October 14.1 2009 November 8.7 2009 December 2.8 2010 January 1.7 2010 February 3.7 2010 March 5.8 2010 April 11.2 2010 May 12.5 2010 June 17.5 2010 July 17.1 2010 August 16.0 2010 September 13.9 2010 October 10.4 2010 November 5.0 2010 December 0.2 2011 January 3.3 2011 February 6.4 2011 March 6.3 2011 April 12.8 2011 May 12.7 2011 June 15.0 2011 July 16.6 2011 August 15.8 2011 September 14.4 2011 October 12.0 2011 November 9.6 2011 December 5.9 - Check page script.
#!/bin/sh
response=$(wget --server-response http://paddy/nt 2>&1 | grep Last-Modified: | awk '{print $2, $3, $4," ", $5, $6, $7}')
# Time should be within 10 mins of current time
time=$(date '+%s') # Gets current time in seconds
ptime=$(date --utc --date "$response" +%s)
# Add 10 mins, 600 seconds to ptime
ptime=$(echo "650+$ptime" | bc) # 10 mins plus a bit of slack
if [ "$time" -gt "$ptime" ]
then
echo "Weather page is too old" | mailx -r mikee@saxicola.co.uk -s "Server possibly down. Check httpd and crond." mikee@saxicola.co.uk
kdialog --msgbox "Weather page too old" --title "Check Server"
fi - Another outage.
Another outage in the data. I've had a couple of issues both on my desktop and on my server of crond dying. This makes my previous cron script tat checks if the httpd is running kind of redundant! I'll have to now write some other monitoring script that includes checking the cron daemon. Strangly enough, looking at last years data there's an outage in the same week. Coincidence? Aliens??
- Webserver Died
I just discovered that the webserver had died on Wednesday so there's a gap in the weather data. I have been meaning to write a script to perodically check if it's up and never got around to it. The cause was a hard drive that I knew was about to fail and ignored it for too long. Anyway back up now after a couple of hours rebuilding it on a new HDD.
- Some Temperature Data
Some temperture data for the past (almost) two years.
Averages are shown for each month.
Year Month Mean Temp 2009 October 14.1 2009 November 8.7 2009 December 2.8 2010 January 1.7 2010 February 3.7 2010 March 5.8 2010 April 11.2 2010 May 12.5 2010 June 17.5 2010 July 17.1 2010 August 16.0 2010 September 13.9 2010 October 10.4 2010 November 5.0 2010 December 0.2 2011 January 3.3 2011 February 6.4 2011 March 6.3 2011 April 12.8 2011 May 12.7 2011 June 15.0 2011 July 16.6 2011 August 16.1 - Further Number Crunching
So having obtained a mean and std-dev (-0.1633076 deg, 1.103905 deg), I see there is an apparent tendency for it to be cooler on Sundays. But how significant are the figures? A density plot indicates that the data are normally distributed.

Doing a t-test gives the following answer:
One Sample t-test- data:avg_sat_mon_sun_diff[, 2]
- t = -1.3639 , df = 84 , p-value = 0.08812
- alternative hypothesis:
true mean is less than 0
Which means that given a confidence interval of 95% we can't say that it is colder on Sundays. From the test we can only be 91% confident, which is certainly not high enough to announce in the press. So much for fame and fortune then, maybe the Daily Mail will be interested?
Next up, is it colder (wetter, windier) on weekends than midweek?
Almost raw data are available for download.
- data:avg_sat_mon_sun_diff[, 2]