Skip to content

Track ‘Dark Theme’ in Google Analytics 4 (GA4 and GTM)

In this blog post, we’ll use media queries particular user (device) properties using Google Tag Manager and Google Analytics 4. Some JavaScript knowledge is not a luxury. Using media queries, developers can personalize their app or website based on device and personal preferences by the user. Using the matchMedia method… 

Solve Pandas “ValueError: cannot reindex from a duplicate axis”

Recently, I’ve been working with Pandas DataFrames that had a DateTime as the index. When I tried reindexing the DataFrame (using the reindex method), I bumped into an error. Let’s find out what causes it and how to solve it. The Python error I’m talking about is: A “duplicate axis”?… 

How to read ZIP files in R

In this blog post I discuss how you can load compressed CSV files, such as .zip and .tar.gz. Nowadays, many packages support it and we’ll go over the different methods. When data sets are ping-ponged across an organization, in order to limit network and storage usage, they often come in… 

How to add confidence intervals to a line in ggplot2 (R)

In this blog post, you’ll learn how to add confidence intervals to a line plot in R in the popular ggplot2 visualization package, part of the tidyverse. First, let’s create some random data to work with. For demonstrational purposes, I’ve created two time series from two normally-distributed random variables. These… 

Solve “Error parsing parameter … : Expected: ‘=’, received: ‘EOF’ for input:” in AWS CLI

The following error might occur when you would like to pass the contents of a file to an AWS CLI command. Amazon web services has very strict rules regarding referring to file contents. When you refer to the content of a file you need to use the file:// protocol. The…