Build Pivot Tables in MySQL Using User Variables

One of the most prominent tasks when dealing with databases is to properly filter and extract meaningful data from the underlying database. Due to that, there can be requirements to pivot the data from rows to columns leading to the creation of pivot tables to visualize data better.

Some databases like Microsoft SQL Server or Oracle come with inbuilt functionality to create a pivot table using the inbuilt pivot() function. However, this function is not available in some databases such as MySQL and MariaDB. In this post, we will discuss how to create pivot tables in MySQL without depending on any special functions.

How to Create a Heatmap in Pivot Grids

The ways and levels of perception have always differed from person to person. Although, in our time, most of the information is absorbed visually. This is the main reason why, for a better understanding of the user's content, you need to choose the right type of data visualization. Here, I want to talk about one of the ways of displaying information in tables; heatmaps. 

What is a heatmap?

A heatmap is a graphical representation of data where values of quantitative variables are expressed as colors, mainly by hue or intensity, giving obvious visual cues about how the phenomenon is clustered or varies over space. 

Tutorial on Data Analysis With Python and Pivot Tables With Pandas

One of the first posts on my blog was about Pivot tables. I’d created a library to pivot tables in my PHP scripts. The library is not very beautiful (it throws a lot of warnings), but it works. These days I’m playing with Python Data Analysis and I’m using Pandas. The purpose of this post is something that I like a lot: learn by doing. So I want to do the same operations that I did eight years ago in the post but now with Pandas. Let’s start.

I’ll start with the same data source that I used almost ten years ago. One simple set of records, with clicks and number of users