def _generate_names():
from ambry import get_library<EOL>l = get_library()<EOL>counties = l.partition('<STR_LIT>')<EOL>states = l.partition('<STR_LIT>')<EOL>names = {}<EOL>for row in counties.remote_datafile.reader:<EOL><INDENT>names[(row.state, row.county)] = row.name<EOL><DEDENT>for row in states.remote_datafile.reader:<EOL><INDENT>if row.component == '<STR_LIT>':<EOL><INDENT>names[(row.state, <NUM_LIT:0>)] = row.name<EOL><DEDENT><DEDENT>pprint.pprint(names)<EOL>
Code to generate the state and county names

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