Sunday, October 29, 2017

Tracking Real-Time Weather Updates With InfluxDB

DZone Database Zone
Tracking Real-Time Weather Updates With InfluxDB
Tracking Real-Time Weather Updates With InfluxDB

Not long ago, I started wondering if I could use InfluxDB to track weather events in real-time. We've had more than a few significant weather events recently — notably named Harvey, Irma, and Maria — and I wanted to see if I could do some tracking, and possibly alerting, of new tropical storm and hurricane events. It turns out that the National Hurricane Center provides live RSS/XML feeds of all the Atlantic Basin Tropical Cyclones (they have feeds of other areas, as well). Perfect! Just what I'm looking for. I'll walk you through how I set up the RSS Feed Reader, parsed the XML feed, and inserted the data into my InfluxDB instance. I'll also show some of the dashboards I created to track these storms. I even decided to see if I could set up some Grafana dashboards, so I'll show you how to do that, as well.

Getting the XML RSS Feed

The RSS feeds are all listed on the National Hurricane Center's page, so finding it was easy. Parsing it was a bit more challenging. I chose to use Node-Red again since it has some easy-to-use built-in data sources, one of which is an RSS Feed Reader. Here's the entirety of my Node-Red flow:

No comments:

Fun With SQL: Functions in Postgres

DZone Database Zone Fun With SQL: Functions in Postgres In our previous  Fun with SQL  post on the  Citus Data  blog, we covered w...