Linux

Analyzing and graphing weather data with wview

Scott Reeves shows how to extract climatological data from the open source weather program, wview. This data can be further analyzed or filtered using awk or Perl, and allows for the customization of graphs.

In a previous post I introduced the weather station software called wview. The post was more on how to configure wview, rather than taking a look at some of the other aspects of wview. In this post I will give an overview of some of the features of wview, which you can download here if you haven't already.

One of the features I like to start with is the almanac page, located at file:///var/lib/wview/img/almanac.htm. Figure A (click to enlarge all figures) shows the almanac page.

Figure A

The almanac page gives you a single view of daily, monthly and yearly highs, lows and averages for wind speed, rainfall and temperature. The almanac page as shown in Figure A is therefore a good starting point. I tend to have the almanac page up most times on my Linux netbook (on which wview is installed).

The almanac page also lets you navigate to the other pages of interest. In this case, one of the next pages to look at is the one called "Current Conditions". Clicking on "Current Conditions" takes you to the page shown in Figure B.

Figure B

From here, you can obtain a graphical representation of what the weather has done in the last 7, 28 and 365 days. There is also a button called "Weather Summary", which we will get to after a short digression.

One of the features that drew me to open source in the first place was the extra configurability and the ability to do your own changes to a piece of software. What I like about wview is that, whilst it does some elementary charts, it also lets you export the data to a text file, allowing you to extract data you want and do your own analysis. Whilst I don't necessarily have time to do this, there are times when I want to check whether the old anecdotal "last summer was much hotter/wetter/cooler" is correct by applying a few statistical tools to check if this is really the case.

As shown in Figure B, there is a "Weather Summary" button. When we click on the "Weather Summary" button we get Figure C. This takes us to the area of most interest, namely the area where we can extract our own data and do our own graphs or tables, if desired.

Figure C

Figure C has the area where you can extract your data circled. You can extract data for a specific day, month or year. What I have done is take a sample output from each of these to illustrate the type of data you can obtain. We start off with daily data. In this example, I have extracted the data for the 10th December 2012. The results are as shown in Figure D. You can save this as a text file, and do your own manipulation using awk or Perl. As an aside, my weather station does not measure UV, hence the value of "-10000.00" for the Solar radiation and UV columns. The rest of the data as shown in Figure D is fairly standard; average temperatures, wind speed, highs and lows for each, etc.

Figure D

Next we take a look at the monthly results. This is an average for each day of the month. Figure E show what it looks like. One extra statistic you get for the monthly report is the dominant wind direction.

Figure E

Finally, Figure F shows the yearly report. This will give you an overall summary for the year. Note that (in this case) there are no statistics for January; this was because my station was offline for January 2012.

Figure F

As you can see, wview doesn't limit you to the graphs it produces. You can extract the data and do your own analysis using awk or Perl. If  you desire, you can also produce your own graphs showing metrics such as rainfall, wind speed, and temperature.

About

Scott Reeves has worked for Hewlett Packard on HP-UX servers and SANs, and has worked in similar areas in the past at IBM. Currently he works as an independent IT consultant, specializing in Wi-Fi networks and SANs.

0 comments