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

def convert_congress(congress):
    """
    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
    """

    logger.info("Begin processing Congress {0}".format(congress['congress']))

    congress_obj = Congress(congress)
    lis_to_bio = lis_to_bio_map(congress['dest'])

    logger.debug("made congress object")
    logger.debug(congress_obj)

    # We construct lists that can be used to construct dataframes.  Adding to
    # dataframes is expensive so we don't do  that.

    bills = process_bills(congress)
    amendments = process_amendments(congress)
    votes = process_votes(congress, lis_to_bio)

    try:

        logger.debug(" ======================  SAVING {}".format(congress))

        congress_obj.legislation = pd.DataFrame(bills['legislation'] if bills[
            'legislation'] else [[None] * 12])
        congress_obj.legislation.columns = [
            'congress', 'bill_id', 'bill_type', 'introduced_at', 'number',
            'official_title', 'popular_title', 'short_title', 'status',
            'status_at', 'top_subject', 'updated_at'
        ]

        f = [s for s in bills['sponsors'] if s]
        sponsors = f if f else [[None] * 5]
        congress_obj.sponsors = pd.DataFrame(sponsors)
        congress_obj.sponsors.columns = [
            'type', 'thomas_id', 'bill_id', 'district', 'state'
        ]

        c = [s for s in bills['cosponsors'] if len(s) > 0]
        cosponsors = c if c else [[None] * 5]
        congress_obj.cosponsors = pd.DataFrame(cosponsors)
        congress_obj.sponsors.columns = [
            'type', 'thomas_id', 'bill_id', 'district', 'state'
        ]

        c = [s for s in bills['committees'] if len(s) > 0]
        committees = c if c else [[None] * 4]
        congress_obj.committees = pd.DataFrame(committees)
        congress_obj.committees.columns = [
            'type', 'name', 'committee_id', 'bill_id'
        ]

        s = [s for s in bills['subjects'] if len(s) > 0]
        subjects = s if s else [[None] * 3]
        congress_obj.subjects = pd.DataFrame(subjects)
        congress_obj.subjects.columns = ['bill_id', 'bill_type', 'subject']

        e = [s for s in bills['events'] if len(s) > 0]
        events = e if e else [[None] * 16]
        congress_obj.events = pd.DataFrame(events)
        congress_obj.events.columns = [
            'bill_id', 'acted_at', 'how', 'result', 'roll', 'status',
            'suspension', 'text', 'type', 'vote_type', 'where', 'calander',
            'number', 'under', 'committee', 'committees'
        ]

        # Amendment data is not avalible for all congresses
        if amendments:
            congress_obj.amendments = pd.DataFrame(amendments)
            congress_obj.amendments.columns = [
                'amendment_id', 'amendment_type', 'amends_amendment',
                'amends_bill', 'amends_treaty', 'chamber', 'congress',
                'description', 'introduced', 'number', 'proposed', 'purpose',
                'sponsor_id', 'committee_id', 'sponsor_type', 'status',
                'updated'
            ]

        congress_obj.votes = pd.DataFrame(votes['votes'])
        congress_obj.votes.columns = ['amendment_id', 'bill_id', 'category',
                                      'congress', 'chamber', 'date', 'number',
                                      'requires', 'result', 'result_text',
                                      'session', 'type', 'updated_at',
                                      'vote_id', 'yes', 'no', 'not_voting',
                                      'present']

        congress_obj.votes_people = pd.DataFrame(votes['people'])
        congress_obj.votes_people.columns = ['vote', 'vote_id', 'bioguide_id',
                                             'party', 'state', 'date']

        save_congress(congress_obj, congress['dest'])

    except Exception as e:
        logger.error(
            "################### ERRROR SAVING ########################")
        logger.error("congress {0}".format(congress))
        exc_type, exc_obj, exc_tb = sys.exc_info()
        fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
        raise e