Common Metrics
Lesson 1 of 1
  1. 1
    As a data scientist, when you’re not investigating spikes or dips in your data, you might be building dashboards of KPIs, or key performance indicators for a company. KPIs are often displayed …
  2. 2
    At the heart of every company is revenue, and Mineblocks is no exception. For our first KPI we’ll calculate daily revenue.
  3. 3
    Great! That query doesn’t take refunds into account. We’ll update the query to exclude refunds. Fields like refunded_at will only have data if the transaction was refunded, and otherwise left null.
  4. 4
    Mineblocks is a game, and one of the core metrics to any game is the number of people who play each day. That KPI is called Daily Active Users, or DAU. DAU is defined as the number of unique…
  5. 5
    Great! Since Mineblocks is on multiple platforms, we can calculate DAU per-platform.
  6. 6
    We’ve looked at DAU and Daily Revenue in Mineblocks. Now we must understand the purchasing habits of our users. Mineblocks, like every freemium game, has two types of users: * purchasers: users w…
  7. 7
    The more popular (and difficult) cousin to Daily ARPPU is Daily ARPU, Average Revenue Per User. ARPU measures the average amount of money we’re getting across all players, whether or not they’ve …
  8. 8
    Daily ARPU is defined as revenue divided by the number of players, per-day. To get that, we’ll need to calculate the daily revenue and daily active users separately, and then join them on their dat…
  9. 9
    Great! Now you’re familiar with using the with clause to create temporary result sets. You just built the first part of ARPU, daily_revenue. From here we can build the second half of ARPU in our w…
  10. 10
    Nice work, you just defined ARPU for Mineblocks! In our ARPU query, we used using instead of on in the join clause. This is a special case join. from daily_revenue join daily_players using (dt)…
  11. 11
    Now let’s find out what percent of Mineblock players are returning to play the next day. This KPI is called 1 Day Retention. Retention can be defined many different ways, but we’ll stick to th…
  12. 12
    Before we can calculate retention we need to get our data formatted in a way where we can determine if a user returned. Currently the gameplays table is a list of when the user played, and it’s no…
  13. 13
    Now that we have our gameplays table joined to itself, we can start to calculate retention. 1 Day Retention is defined as the number of players who returned the next day divided by the number of o…
  14. 14
    While every business has different metrics to track their success, most are based on revenue and usage. The metrics in this lesson are merely a starting point, and from here you’ll be able to crea…