def get_user_count(db=db, entry_points=ENTRY_POINTS):
 count_list = []
 percent_list = []
 tags = entry_points.values()
 tags.append('osf')
 total = db.user.find({}).count()
 for entry_point in entry_points.keys():
  count = db.user.find({'system_tags': entry_point}).count()
  percent = round((float(count) / float(total)), 2)
  count_list.append(count)
  percent_list.append(percent)
 osf_count = (total - sum(count_list))
 osf_percent = (1 - sum(percent_list))
 count_list.append(osf_count)
 percent_list.append(osf_percent)
 sorted_index = get_sorted_index(count_list)
 count_list = [count_list[i] for i in sorted_index]
 percent_list = [percent_list[i] for i in sorted_index]
 tags = [tags[i] for i in sorted_index]
 return {'tags': tags, 'count': count_list, 'percent': percent_list, 'total': total}

def get_user_count ( db = db , entry_points = ENTRY_POINTS ) : count_list = [ ] percent_list = [ ] tags = entry_points . values ( ) tags . append ( 'osf' ) total = db . user . find ( { } ) . count ( ) for entry_point in entry_points . keys ( ) : count = db . user . find ( { 'system_tags' : entry_point } ) . count ( ) percent = round ( ( float ( count ) / float ( total ) ) , 2 ) count_list . append ( count ) percent_list . append ( percent ) osf_count = ( total - sum ( count_list ) ) osf_percent = ( 1 - sum ( percent_list ) ) count_list . append ( osf_count ) percent_list . append ( osf_percent ) sorted_index = get_sorted_index ( count_list ) count_list = [ count_list [ i ] for i in sorted_index ] percent_list = [ percent_list [ i ] for i in sorted_index ] tags = [ tags [ i ] for i in sorted_index ] return { 'tags' : tags , 'count' : count_list , 'percent' : percent_list , 'total' : total }
get the number of users created from each entry point: osf .