def convert_congress(congress):
logger.info("<STR_LIT>".format(congress['<STR_LIT>']))<EOL>congress_obj = Congress(congress)<EOL>lis_to_bio = lis_to_bio_map(congress['<STR_LIT>'])<EOL>logger.debug("<STR_LIT>")<EOL>logger.debug(congress_obj)<EOL>bills = process_bills(congress)<EOL>amendments = process_amendments(congress)<EOL>votes = process_votes(congress, lis_to_bio)<EOL>try:<EOL><INDENT>logger.debug("<STR_LIT>".format(congress))<EOL>congress_obj.legislation = pd.DataFrame(bills['<STR_LIT>'] if bills[<EOL>'<STR_LIT>'] else [[None] * <NUM_LIT:12>])<EOL>congress_obj.legislation.columns = [<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:status>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>'<EOL>]<EOL>f = [s for s in bills['<STR_LIT>'] if s]<EOL>sponsors = f if f else [[None] * <NUM_LIT:5>]<EOL>congress_obj.sponsors = pd.DataFrame(sponsors)<EOL>congress_obj.sponsors.columns = [<EOL>'<STR_LIT:type>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:state>'<EOL>]<EOL>c = [s for s in bills['<STR_LIT>'] if len(s) > <NUM_LIT:0>]<EOL>cosponsors = c if c else [[None] * <NUM_LIT:5>]<EOL>congress_obj.cosponsors = pd.DataFrame(cosponsors)<EOL>congress_obj.sponsors.columns = [<EOL>'<STR_LIT:type>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:state>'<EOL>]<EOL>c = [s for s in bills['<STR_LIT>'] if len(s) > <NUM_LIT:0>]<EOL>committees = c if c else [[None] * <NUM_LIT:4>]<EOL>congress_obj.committees = pd.DataFrame(committees)<EOL>congress_obj.committees.columns = [<EOL>'<STR_LIT:type>', '<STR_LIT:name>', '<STR_LIT>', '<STR_LIT>'<EOL>]<EOL>s = [s for s in bills['<STR_LIT>'] if len(s) > <NUM_LIT:0>]<EOL>subjects = s if s else [[None] * <NUM_LIT:3>]<EOL>congress_obj.subjects = pd.DataFrame(subjects)<EOL>congress_obj.subjects.columns = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>e = [s for s in bills['<STR_LIT>'] if len(s) > <NUM_LIT:0>]<EOL>events = e if e else [[None] * <NUM_LIT:16>]<EOL>congress_obj.events = pd.DataFrame(events)<EOL>congress_obj.events.columns = [<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:result>', '<STR_LIT>', '<STR_LIT:status>',<EOL>'<STR_LIT>', '<STR_LIT:text>', '<STR_LIT:type>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'<EOL>]<EOL>if amendments:<EOL><INDENT>congress_obj.amendments = pd.DataFrame(amendments)<EOL>congress_obj.amendments.columns = [<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT:description>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:status>',<EOL>'<STR_LIT>'<EOL>]<EOL><DEDENT>congress_obj.votes = pd.DataFrame(votes['<STR_LIT>'])<EOL>congress_obj.votes.columns = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT:date>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT:result>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT:type>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT:yes>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>']<EOL>congress_obj.votes_people = pd.DataFrame(votes['<STR_LIT>'])<EOL>congress_obj.votes_people.columns = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT:state>', '<STR_LIT:date>']<EOL>save_congress(congress_obj, congress['<STR_LIT>'])<EOL><DEDENT>except Exception as e:<EOL><INDENT>logger.error(<EOL>"<STR_LIT>")<EOL>logger.error("<STR_LIT>".format(congress))<EOL>exc_type, exc_obj, exc_tb = sys.exc_info()<EOL>fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[<NUM_LIT:1>]<EOL>raise e<EOL><DEDENT>
Recurse the passed govtrack congress directory and convert it's contents
to a set of csv files from the legislation contained therein.
:return dict: A Dictionary of DataFrames