Skip to content

Instantly share code, notes, and snippets.

@georgf
Last active April 21, 2016 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save georgf/234b7c861cc78824071d0ed9cf7a6aa2 to your computer and use it in GitHub Desktop.
Save georgf/234b7c861cc78824071d0ed9cf7a6aa2 to your computer and use it in GitHub Desktop.
default-search-null-breakdown
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# 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