Python in Digital Analytics: Automating Facebook metric reports

I am very happy to come back to this topic, after started this blog by writing about Facebook metrics 6 months ago.

Just a little side note – I used to code a lot at 16 years old – never found much fun and gave up once I made it to college. Ironically, this time I had a lot of joy learning Python to connect to Facebook API for “insights” in the past few months.

The business case here is straightforward: We need to understand how we are doing in social media channel from the metrics perspective. As I addressed in my previous post, the data exporting feature of Facebook business manager is simply not good enough.

Using Python, I was able to directly call Facebook’s Graphic API, and retrieve the metrics –  impressions, likes, shares, comments, link clicks etc –  of each individual posts as far as 2 years ago, to a CSV file. Then I can port it with Microsoft PowerBI and do all kinds of analysis and visualization.

What I like this the most, is by having this Python code in place, I can bypass the traditional “Extract, Transform and Load” process of using the data warehouse.  As a proud “full stack” analyst, I want my “data to insights” journey as simple as possible. Also, I can’t afford the typical 1 day of delay (of data warehousing), as a social media post can go viral and suddenly receive 100 “likes” in 4 hours.

Now let me explain how it works in a bit more geeky way…Read More »

Building a digital dashboard – Part 1: business side

In the last couple of years, I have been asked numerous times for a “dashboard”. In reality I was asked a chart showing “what is my project (‘s KPI) doing”.  I usually performed a few data pukes and provided one PowerPoint slide, once the KPI is clearly defined, and the source data is in a “reasonable-messy” format.  I was not impressed by the business reality of over-used term “dashboard”.

“What is a dashboard” 

In my opinion, a true “dashboard” should serve beyond “what”, but also “why”. Read More »

How to use Apple Watch to monitor and improve swim performance

I love new technology stuff. That is why I bought the Apple Watch 2 series 2 the day when it was launched. Mostly attracted by its waterproof feature for swim tracking, I was so pumped and even lined up in the retail store to get it on the first day.

Now I have been using it for almost 5 months and recorded 29 swimming workout. I’d conclude that it is a worthwhile purchase, as it helped me monitor and improve swim performance. Although the journey is not a smooth as I expected, let me share my experience.Read More »

What 2017 Australian Open Men’s final means to me

I recently found out one benefit of handling parenting duties early in the morning  – watching sports happening on the other side of the globe. The game I watched, is the 2017 Australian Open Men’s final tennis between the legendary Roger Federer, 17 time grandslam champion and arguably the “greatest of all time” tennis player, versus Rafael Nadal, a 14 time grandslam champion, my early 20s “idol” for his toughness and mastery of top spin.



Going over the game detail is not the intention of this blog post. (This link will guide you to the official game recap).  I’d rather share what I have learned, or more specifically, what inspired me from this match.

Read More »