Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
default-search-null-breakdown
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
You can’t perform that action at this time.