def vote_report(abbr): report = scan_votes(abbr) combined_report = combine_reports(report['sessions'], _vote_report_dict()) for session in report['sessions'].itervalues(): calculate_percentages(session) calculate_percentages(combined_report) report.update(combined_report) return report
def bill_report(abbr): report = scan_bills(abbr) combined_report = combine_reports(report["sessions"], _bill_report_dict()) for session in report["sessions"].itervalues(): calculate_percentages(session) calculate_percentages(combined_report) report.update(combined_report) return report