Monday, June 1, 2009

Verizon Family and Friends: By the Numbers

You could guess what your 10 most called are, or you could measure. Guess what I prefer. Find the "Download SpreadSheet" (sic) option on the Verizon site, and pipe it through some Python like this;

import csv, operator
calls = list(csv.DictReader(open('/home/kcarnold/Desktop/VoiceDetails.action'),
delimiter='\t'))
not_in = [c for c in calls if 'M2MAllow' not in c['Usage Type']]
minutes = {}
for call in not_in:
   number, mins = call['Number'], int(call['Minutes'])
   minutes.setdefault(number, 0)
   minutes[number] += mins
sorted(minutes.items(), key=operator.itemgetter(1))

2 comments:

Unknown said...

Unfortunately, after you initially set up Friends and Family for an account there is no way going forward to tell the difference between a Friends and Family call and a Mobile-to-Mobile (M2MAllow) call. Feel free to tell Verizon would you like to be able to tell the difference.

Unknown said...

You mean that Friends and Family calls get labeled as M2MAllow in the spreadsheet now? Ok, then add a condition to the not_in line:

and c['Number'] not in ['8885551212','8665432101', ...]