Redash — Creating beautiful interactive data dashboards at the speed of thought!
We love interactive dashboards, don’t we? It lets you see the story the way you want to see. Your take on the data in front of you.
Today, we will talk about REDASH and the ease with which you can create beautiful interactive dashboards. By the way, you can check out the tool at https://redash.io/. The open-source is a tool is pretty cool and supports multiple types of data sources to connect.
USE CASE
Our PostgreSQL DB contains cricket tournament data of a local club’s internal tournament. The sample dashboard we will be talking about was a part of a comprehensive dashboard created to aid the virtual player auctions that happened in 2019. The auctions that happened until now were without the help of stats. We introduced the stats based on the data available for last 4 seasons to help them make data backed decision in the auctions.
The process of creating an interactive dashboard works in the following phases.
> Query for the data to be visualized.
> Create one or more visualizations on the output of the query.
> Add the visualization to the Dashboard to tell that piece of the story.
Note: This article assumes you can install ‘Redash’ and set it up to connect to your data source. Check out this Redash Docker Setup link for setup instructions. It is pretty straightforward.
Once you are done connecting to the data source, PostgreSQL in this case, select Create >> Query to go to the interface where we will query the database to get the data to be visualized.
For this use-case, let’s get some basic per season statistics for a batsman whose player_id is 90. (Names are hidden for privacy reasons)
As you can see above. The Table is the default visualization. Click on the ‘+ New Visualization’ to create custom visualization. You will be presented with the below interface.
Select Visualization Type (Chart), provide a visualization name (Batting Trend History), select a ‘Chart Type’ (Line), Provide X and Y columns. Note how multiple Y-Columns are provided for the line graphs. The visualization is ready. With these simple maneuvers, we can see how the Runs, Avg and Strike Rate of a batsman have changed across seasons. There are many chart types and options per chat to play around with. I will leave that for exploration.
Save the visualization — Batting Trend
Let’s Create another visualization. A bar chart depicting boundaries (Fours and Sixes) per season.
Let’s save the visualization — Boundaries Trend. Do not forget to check out the chart options at the Top-Right corner.
Let’s move to create a Dashboard from the visualizations we have just created. Click on Create > Dashboard
Give it a name — Batsman Dashboard and Save it.
You will be presented with a blank dashboard. Click on “Add Widget” or “Add Textbox” at the bottom right. Widget is anything you want to add to the dashboard.
A Textbox is added mentioning what this dashboard is about.
Let’s add the visualizations to this dashboard that we had created earlier. Click on “Add widget” and then select the query and the visualization to be added.
Click on “Add to Dashboard”. Do the same for “Boundaries Trend” Visualization. Resize the widgets and text box as needed and click “Done Editing”. Your Interactive Dashboard is Ready. Go play with it.
Super Easy, isn’t it?
Do not forget to click “Publish” in the top right corner to make this dashboard accessible to any logged-in user in the organization. You can open it for public view by using the “Share Dashboard” option.
We will stop here. There are many options to explore in Redash, however, the objective of this article was to let you know how easy it is to create beautiful interactive visualizations within minutes.
Here are the things you should explore though.
- Parameterized Queries and Dashboards — In our case, the same query/dashboard would work for any player instead of just player id 90 if the parameterized query is written.
- Query fork — Creating a copy of the query along with the dependent visualizations. Very neat and quite useful to try out different versions of the same query.
- Various Chart types and related options.
That’s all for today. Please provide your valuable feedback and comments below. Thank you!