#!/usr/bin/env python # coding: utf-8 # ### Fennec analysis # In[1]: import ujson as json import matplotlib.pyplot as plt import pandas as pd import numpy as np import plotly.plotly as py from moztelemetry import get_pings, get_pings_properties, get_one_ping_per_client get_ipython().run_line_magic('pylab', 'inline') # In[79]: pings = get_pings(sc, app="Fennec", channel="release", submission_date="20150609", fraction=1) # In[80]: subset = get_pings_properties(pings, ["clientID", "info/manufacturer", "info/device", "info/version"]) # In[81]: subset.filter(lambda x: x.get("clientID", None) is not None).count() # ClientID isn't present in release # In[82]: samsung = pd.DataFrame(subset.filter(lambda x: x["info/manufacturer"] == "samsung" and x["info/device"] == "GT-I9500").collect()) len(samsung) # In[83]: histogram = samsung.groupby("info/version").apply(lambda x: len(x)) # In[91]: (100*histogram/histogram.sum()).plot(kind="bar") pylab.ylabel("submissions %") # In[ ]: