Last active
April 21, 2016 15:20
-
-
Save georgf/234b7c861cc78824071d0ed9cf7a6aa2 to your computer and use it in GitHub Desktop.
default-search-null-breakdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# ### Bug 1249288 - Breakdown of null values for defaultSearch | |
# In[1]: | |
import ujson as json | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import numpy as np | |
import plotly.plotly as py | |
import datetime as dt | |
from uuid import UUID | |
from moztelemetry import get_pings, get_pings_properties, get_one_ping_per_client, get_clients_history | |
get_ipython().magic(u'pylab inline') | |
# In[2]: | |
submission_dates = ("20160420", "20160422") | |
core_pings = get_pings(sc, | |
app="Fennec", | |
channel="beta", | |
doc_type="core", | |
source_version="2", | |
submission_date=submission_dates, | |
fraction=1.0) | |
# In[3]: | |
pings_count = core_pings.count() | |
pings_count | |
# ### How many different clients are we seeing? | |
# In[4]: | |
one_per_client = get_one_ping_per_client(core_pings) | |
num_clients = one_per_client.count() | |
num_clients | |
# ### Find pings which submit the distribution field | |
# In[6]: | |
distribution_pings = core_pings.filter(lambda p: p.get("distribution", None) != None) .collect() | |
len(distribution_pings) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment