My graphs for wind and weather

Hi graph people,
Since working as a power station operator I know the value of charts or graphs and I must see my wind information on a chart to give me the best clues to the trends. For example I like to see the direction of the gust as the gust direction which is often different to the average direction.
Since I had not seen the graphs that I wanted available anywhere I set about teaching myself linux and python on a raspberry pi to create my own. I use the API to get the data and draw the wind icons in different shapes. I played with arrows of different shapes and colours depending on the strength and the sport but then evolved into wind socks because they do not require a description to explain if the arrow points into or with the wind. The code runs and creates the graphs and posts them onto my web site on a regular basis. It then allows me to very quickly see my wind graphs on my web site without advertisments or other file size bloating. I get my graphs much quicker than from the weatherflow web page. I have many more plans with this project but I am currently very busy with other duties so I just thought I would show you where I am up to to this stage. Everything about the graphs is variable.
I am partly posting this now due to reading the comment some one said they will use the API rather than a database and I thought ‘yes exactly my current approach which is working great for me’
I do have good knowledge and experience of databases. However this project currently uses the API because there are many advantages using the data on the weatherflow system via the API. I can run my code from anywhere in the world on any machine. I do not need to maintain a database including backfilling after power failures etc.
I use the API to load then convert into my own json into temporary files in ram which then create all the different graphs which minimises writing to the raspberry pi micro sd card, to virtually nil if I wish. If a fresh graph requires new data not held in temporary files then it calls the API again.
I am trying to create the scale and icons in a way that is self explanatory.
Anyway here are some examples (And today was not particularly pretty because the wind strengths were mainly green compared to windier days):

Here is a more colourful option from a while ago:

cheers Ian :slight_smile:

6 Likes

Nice looking charts.

1 Like

Here is mine too. Is only for wind data. Data are collected from WebSockets in Node-Red and saved to a timescaledb (postgresql). I am using D3 for the graphs.
This is a work in progress.
I was using influxdb but after their update to v2 I had to learn Flux - that was something I did not want to do. So I switched to timescaledb.

2 Likes

Wow nice :slight_smile: Thank you for another perspective
cheers Ian :slight_smile:

I find the time on your charts interesting because it seems to appear as my local time rather than at your local time.

Thank you! I store the values into the database as TIMESTAMPTZ and I display them using standard javascript Date functions. That’s why the timezone is automatically detected based on the user’s browser settings.

2 Likes