You are currently viewing the United Kingdom version of the site.
Would you like to switch to your local site?
15 MIN READ TIME

TIMELION

Visualise complex data in style using Timelion

Simon Quain shows how to visualise Covid-19 statistics and more with freely available open datasets and Timelion, a plugin for Elasticsearch.

OUR EXPERT

Simon Quain is a site reliability engineer who likes discovering open datasets online to play around with in the Elastic Stack.

You’ve probably heard of Elasticsearch - the search engine that enables you to index and then quickly search through your data. You may have created a few visualisations in Kibana, the GUI for Elasticsearch, pointing and clicking your way through the sleek interface. What you may not have used is a lesser-known visualisation plugin called Timelion.

Timelion is a fantastic visualisation creation tool that makes it possible to write out your queries in its simple and powerful expression language to display graphs. It’s used for displaying time-series data such as population growth or hits to your website. With Timelion, we can calculate moving averages, display the difference between the data for last week and today, and do some basic anomaly detection. It’s a useful tool to know how to work with. Let’s get started.

Installation

If you’re a regular Linux Format reader, there are docker compose examples for setting up a cluster in LXF261. Otherwise installing Elasticsearch and Kibana is relatively straightforward. The only requirement is Java, which you may already have installed. If not a simple sudo apt install default-jre installs it on Debian-based distros or a sudo dnf install java should do the same for the Red Hat family of distros.

Then you just need to go to https://elastic.co/ downloads and download the latest version of Elasticsearch and Kibana for your desired operating system flavour. At the time of writing the link for Kibana is https://artifacts.elastic.co/downloads/kibana/ kibana-7.8.1-linux-x86_64.tar.gz. Then you can extract it with tar -xvzf kibana-7.8.1-linux-x86_64.tar.gz , change into the extracted directory and run ./bin/kibana & to fire up the Kibana instance. When you’ve done exactly the same steps to set up Elasticsearch, replacing ‘kibana’ for ‘elasticsearch’, you should be able to navigate to http://localhost:5601 in your favourite browser and see a shiny new Kibana interface to play around with. If you prefer to install packages with a package manager, the same link as before has information about adding the Elastic repo to your system and installing the Kibana and Elasticsearch packages that way.

The Data Visualizer makes it easy to get your data into Elasticsearch through the Kibana interface without creating a script.
You can superimpose graphs on top of each other and use formatting to get your graphs looking their best.

Get some data

Recent versions of Kibana makes it possible to ingest datasets into our cluster automatically with the Data Visualizer instead of needing to create a script or Logstash config. It can deal with datasets in JSON or CSV format as well as some standard log files such as Apache logs. The only limitation is that they’re less than 100MB in size. This is more than enough for our purposes. We’ll be using the Covid-19 cases worldwide dataset from the EU Open Data Portal at https://data.europa.eu/euodp/en/data/dataset/covid-19coronavirus-data. We downloaded the CSV file from the Resources section of the page. If you have issues, you could choose to download the Excel .xlsx version instead, open with LibreOffice Calc and save it as Text CSV(.csv) format. There’s also a JSON version available for download that you can use as an alternative.

Unlock this article and much more with
You can enjoy:
Enjoy this edition in full
Instant access to 600+ titles
Thousands of back issues
No contract or commitment
Try for 99p
SUBSCRIBE NOW
30 day trial, then just £9.99 / month. Cancel anytime. New subscribers only.


Learn more
Pocketmags Plus
Pocketmags Plus

This article is from...


View Issues
Linux Format
November 2020
VIEW IN STORE

Other Articles in this Issue


In This Issue
Linux is fun!
Some people have gained the impression that Linux might not
NEWS
Questions over Mozilla CEO remuneration
Discussion sparked in the community in September on the subject
Apple Swift System
Swift was brought out by Apple in 2014 to replace
Open source PowerPC laptop
Since IBM open sourced its PowerPC processors (see Newsdesk, LXF255)
HEAD IN THE CLOUD
Keith Edmunds is MD of Tiger Computing Ltd, which provides
STREAMY LOVER
Earlier in September, the much-anticipated release of GStreamer 1.18 was
Dell’s Linux laptops refreshed
We’ve been running plenty of stories of manufacturers releasing Linux-first
Microsoft Edge
A after teasing the possibility of bringing its newly Chromium-powered
Gnome turns v40
Gnome gets a hard time over its desktop but as
Distro watch
With its cutting-edge release KDE Plasma desktop and themed Qt-based
KINGS AND DATABASES
Are architects the new kingmakers of the database world? To
MOORE PROBLEMS
Jon Masters has been involved with Linux for over 22
Kernel Watch
Paul McKenney posted a thread titled “Litmus test for question
REVIEWS
Nvidia GeForce NOW
We weren’t hugely impressed with Google’s Stadia game streaming service,
Enos OS 0.4
A lightweight, Xubuntu-based distro aimed at beginners and those using
Manjaro 20.1.1
The latest point release of the ever-popular Arch-based distro. Available
Mind Control Delete
Get hit by a stray shot: dead. Repeat. Run out
DietPi
A lightweight, Debian-based distro that eschews a graphical interface for
INTERVIEW
BUILD THE ULTIMATE MEDIA SERVER
Samhain is upon us and all kind of creatures and
ZULIP ECONOMY
Tim Abbott has something of an impressive resumé, holding no
ROUNDUP
Power-user distros
Shashank Sharma has tested more distributions than you’ve had microwaved
IN-DEPTH
HISTORY OF THE PC
There’s no doubt that Windows is synonymous with the PC
Pi USER
IT’S TIME TO GET ON BOARD
Gary Croft is a digital and innovation manager at SGS,
Astro Pi 2021 launches your code into space!
The Astro Pi Challenge is an annual contest that gives
Girls in space
Turns out superhydrophobic-coated tanks reduce liquid slosh in spacecraft by
MCU magic
D developer Roey Benamotz has created the Lean Mean Programming
Getting creative with the Pi camera
Les Pounder is associate editor at Tom’s Hardware and a
Emulate the classic ZX Spectrum range
Les Pounder is associate editor at Tom’s Hardware and a
CODING ACADEMY
Developing Noughts and Crosses in Python
Calvin Robinson is a former assistant principal and computer science
REGULARS AT A GLANCE
Answers
Got a burning question about open source or the kernel?
Mailserver
Write to us at Linux Format, Future Publishing, Quay House,
Firefox
Alexander Tolstoy makes it his aim to collect the best
Htop
There are several reasons for using Htop to keep an
Outrun
Outrun is a powerful system tool that can do cool
Pixelitor
We’ve previously reviewed an update of Pinta, a Microsoft Paint.NET
Memavaild
Performance-related tips and tweaks for Linux are normally aimed at
Krop
One of the most widely used formats of exchanging documents
Diagrams
The Python Package Inde (PyPI) contains over 260,000 projects, some
X-moto
Ask someone to name a challenging 2D motocross racing in
Fortify
Children often feel compassion towards theirbeloved toys and try to
Oomox
Since theme engine support was removed from GTK 3.18 a
Flowblade
Linux users who are involved with non-linear video editing have
TUTORIALS
SSH replacement for persistent connections
Shashank Sharma is an avid Arch user and a trial
Live stream from your Linux deskop
Nick Peers wonders if there’s a future in live streaming
Collaborate on office docs with NextCloud
Kseniya Fedoruk is a documents expert at OnlyOffice and spends
Develop RAW photo-editing Skills
Alexander Tolstoy is a long-time enthusiast of image editing using
Chat
X
Pocketmags Support