if type_of_filter == "nt2012q1_ukie_201206":
    filename_advanced = "../../sav_files/nt2012q1_ukie_201206_rospa_2013-09-05__for_stats.sav"  
    filename_group    = "../../sav_files/nt2012q1_ukie_201206_axaie_2013-12-14_for_stats.sav"    
else:
    filename_advanced = "../../sav_files/rospa-driver-reports-2014-01-07.sav"
    filename_group    = "../../sav_files/nt2012q1_ukie_20130618_ares_2014-01-10_for_stats.sav"  

stats,MAD,road_types  = stats.get_stats_without_scores_with_group(filename_advanced,filename_group)

#ares_data,ares_scores = ut.read_sav_files_with_scores("../../sav_files/ares-reprocessed-xml-profiles-2014-01-14_subids_distance_with_scores.sav")
#ares_data,ares_scores = ut.read_sav_files_with_scores("../../sav_files/axaie_apps_2014-01-27_subids_distance_with_scores.sav")
#ares_data,ares_scores = ut.read_sav_files_with_scores("../../sav_files/axaie-driver-reports-2014-01-10_subids_distance_with_scores.sav")

#ares_data,ares_scores = ut.read_sav_files_with_scores("../../sav_files/axaie_2013-12-14_subids_distance_with_scores.sav")
ares_data,ares_scores = ut.read_sav_files_with_scores("../../sav_files/axaie-driver-reports-2014-01-10_subids_distance_with_scores.sav")
ares_comp_scores      = ut.get_scores_from_dict(ares_data,stats,road_types)

arr =[]
for subid in ares_comp_scores:
    arr.append(int(ares_comp_scores[subid]) )
    
#for subid in ares_scores:
#    arr.append(int(ares_scores[subid]) )
stars = generate_histo_of_stars(arr)
print stars.keys()

y = []
star_x = []
upper = []
lower = []
for star_count in stars: