Of the charts

The new charts system involves InfluxDB and Grafana, logging data from multiple sources into one database so they can be queried together and represented on the same graph

Of the charts

Previously I have written about various updates to the back-end data collection, storage and processing systems used to generate graphs of weather and air quality data here in Sovereign Harbour, Eastbourne. I have wanted to move towards a system that can be effectively integrated into the Ghost.org blog/CMS software I use on this website, and something that lends itself more easily to comparing and contrasting data from different sources.

I think I have managed to come up with a system involving InfluxDB and Grafana which allows me to log data from multiple different sources into one database so that they can be queried together and represented on the same graph. Data has been logged in this way for the past couple of months with no showstoppers. I've been accessing data via an internal dashboard for some time, and I am at the point now where I feel I can make them more widely accessible.

The first drafts of these graphs are now available for weather and air quality. At the moment the graphs for each data type are on separate pages, but I shall produce a mashup page to allow easy comparison of the two as soon as I can.

The graphs are a little rough and ready at the moment, I am looking into what I can do to make them a little more accessible,  however, they do render cleanly on both desktop or mobile, which is a huge bonus already. HTML5 and CSS3 FTW.

My other concern is performance. Caching Grafana seems not to be something easily, or obviously, possible at the web server/proxy level, for me at this present time. I think I will need to look at the image rendering plugin and export those for publishing on the website. Graphs rendered as plain PNG or JPG images rather than dynamically generated JavaScript objects involving a database query for each graph view will improve page load speed, but I think it could ruin the smooth formatting. Although a judicious choice of image dimensions could get round the issue. More problematic is the fact that my Grafana server is currently running on a Raspberry Pi and Grafana's image rendering plugin is currently unavailable on ARM, it's only on AMD64 at this time. Why the code is not cross-platform is a real puzzler. Anyhow, the upshot is I will need to migrate the Grafana server to an AMD64 system before being able to render images for the website. Work for the working man.