Code to generate the state and county names

    >>> python -c 'import geoid; geoid._generate_names()'

def _generate_names():
    """ Code to generate the state and county names

    >>> python -c 'import geoid; geoid._generate_names()'

    """

    from ambry import get_library

    l = get_library()

    counties = l.partition('census.gov-acs-geofile-2009-geofile50-20095-50')
    states = l.partition('census.gov-acs-geofile-2009-geofile40-20095-40')

    names = {}
    for row in counties.remote_datafile.reader:
        names[(row.state, row.county)] = row.name

    for row in states.remote_datafile.reader:
        if row.component == '00':
            names[(row.state, 0)] = row.name

    pprint.pprint(names)