And so this weekend I've explored some more. I've modified the code to read in the data from a csv file, and then refactored like mad to make it more elegant. The result of half a day's work was a web page indistinguishable (on the surface) from before: but now the charts, and the headings, are generated from the csv file data, so I can add more data each month, and the page will update without any code having to change. So, a success.
Then I decided to add a little bit of interaction: changing the colour of a bar or spot on mouse-over, and showing the actual data value. The d3 library is powerful enough that it was very easy to do.
|in May 2007 we had 76mm of rain|
|in July 2009 we had 63mm of rain|
The actual web page is here, but it may change over time as I add more functionality.