import ujson as json
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import plotly.plotly as py
from __future__ import division
from moztelemetry import get_pings, get_pings_properties, get_one_ping_per_client, get_clients_history
%pylab inline
Populating the interactive namespace from numpy and matplotlib
WARNING: pylab import has clobbered these variables: ['extract'] `%matplotlib` prevents importing * from pylab and numpy
pings = get_pings(sc, app="Firefox",
channel="aurora",
version="41.0a2",
build_id=("201507100000", "209999999999"),
fraction=0.1,
schema="v4")
pings = get_one_ping_per_client(pings)
def extract(ping):
try:
monitors = ping["environment"]["system"]["gfx"]["monitors"]
if len(monitors) == 1:
return monitors[0]["refreshRate"]
else:
return None
except:
return None
refresh_rates = pd.Series(pings.map(extract).collect())
refresh_rates.value_counts()
60 19328 59 1408 1 463 75 428 50 271 40 265 64 130 85 114 120 48 30 47 32 45 144 31 70 23 48 19 56 13 61 11 58 8 29 6 72 6 62 4 42 4 24 4 63 4 96 3 53 3 25 3 65 3 76 2 23 1 180 1 47 1 49 1 57 1 74 1 80 1 119 1 0 1 dtype: int64