Visualising Your Real-life Experiences With Time-Series Data

Time-Series For Beginners

Fathima Maha
4 min readJan 21, 2021

Imagine going on a jog with your apple watch opening you to an ecosystem of apps and features measuring everything from your heart rate, distance travelled, pace, to the calories burned. How does all the data that the device measures look behind the system? How is this very dynamic data analysed to show you your weekly averages? And how does this exact data help you plan out your workout schedule for the next week? Here comes the future of our data, Time-Series Data and InfluxDB: Open-Source Time Series Database (A popular preference for Time-Series Database among others).

Before we introduce jargons into this article, let us break it into simpler chunks. Anything that you measure; let it be the temperature around you, the income of your company, your mood throughout the day, all of them noted and ordered with certain timestamps associated with it are called a time series. The timestamp can be nanoseconds, hours, days or even a number of years. Most of the data we work with is mapped against time and we often consider it a convenient way to observe changes and draw patterns from it.

Taking an example from a 2017 New York Times article I came across titled ‘95-Degree Days: How Extreme Heat Could Spread Across the World’, the study predicted the number of extremely hot days around the world when temperatures can soar to 95 degrees Fahrenheit or higher leading people to a greater risk of dying. The time-series data that the study had analysed with the number of days in a year had a certain pattern. The rate was seen to be multiplying and the same forecasted for years till 3000 showed dreadful situation for the planet if countries continue to take only moderate climate action. For a common man reading the article, the severity of the issue cannot be better explained than putting out the data visually. That is exactly what the article did, in a second of time the time-series data was visualised and labelled with their timestamps.

The map above, based on a new analysis from the Climate Impact Lab, shows how 95-degree days are expected to multiply this century if countries take moderate climate action. Source: NY Times

This analysis, forecasting and visualisation is an integral part of everything around us and it was not long ago companies and researchers felt the need for a database solely to work with these huge chunks of time-series data. More and more smart devices are using Internet of Things (a network of material objects measured for physical variables, collected, stored and transferred on the internet); there is huge real-time traffic generated on applications and websites with millions and billions of events in a day.

If you are a company producing IoT devices such as sensors, actuators, gadgets, appliances or a researcher wanting to observe patterns in your study over time, or a company wanting to monitor production and sales levels, Time-series database is a must know. InfluxDB, an open-source time-series database written in Go language is one of the most preferred databases to work with. It is optimized for fast, high-availability storage and retrieval of time series data and empowers developers to build softwares handling massive volumes of data.

While working with this technology as a beginner, I was relieved as to how easy it was to set up Influx on my system and get it running. There are only two prerequisites to learning; getting familiar with Go language and reading the documentation. Almost everything else is sorted as help is all around, with easy to follow tutorials, Influx Data organising interactive webinars and Slack groups you can join to discuss.

Source: Influx Data

InfluxDB works with 3 other open-source components to give you the complete control of your data. This is popularly called as the TICK Stack. Let us get familiar by taking an example of measuring the temperature in your city on a hot day and creating an alerting mechanism when the temperature goes beyond 40 degrees Celcius. Telegraf will be your agent for collecting the metrics that communicate with devices like the thermometer for measuring temperature. InfluxDB receives this data and their timestamps in a bucket and lets you visualise the data with the help of Chronograf, the User Interface for InfluxDB for monitoring the data. Kapacitor acts as the engine with which you can create an alert to your mobile phone when the temperature exceeds the maximum range.

A lot of heat was talked about in this article for introducing time-series, but it definitely does not limit its real-life application there. Look around you and I am sure you’ll find an opportunity for building a utility yourself or creating an alert mechanism with real-time data that is abundantly available. You could be building a notification mechanism for COVID-19 cases in your locality, or collecting research data, drawing patterns, forecasting using Machine Learning or simply assessing your system applications and their severity. Be sure to have fun playing with the data and stay updated on how to work with the TICK Stack!

--

--

Fathima Maha

Hey everyone! I’m 23, a CS grad and clearly not the best at writing, but thanks for checking out :).