The zip2zcta Module

Utility to download crosswalk files from https://udsmapper.org/zip-code-to-zcta-crosswalk/

Alternative source could be: [Census Reporter](https://github.com/censusreporter/acs-aggregate/blob/master/crosswalks/zip_to_zcta/ZIP_ZCTA_README.md)

class XReader(path_to_file: str)[source]
COLUMNS = ['ZIP_CODE', 'PO_NAME', 'STATE', 'ZIP_TYPE', 'ZCTA', 'zip_join_type']
ignored_columns = {'ENC_ZIP', 'OBJECTID', 'ReportingYear', 'StateName'}
column_map = {'CityName': 'PO_NAME', 'StateAbbr': 'STATE', 'ZCTA_USE': 'ZCTA', 'ZIP': 'ZIP_CODE', 'ZIPType': 'ZIP_TYPE', 'Zip_join_type': 'zip_join_type'}
get_year()[source]
static ensure_join_type(columns: List[str], values: Dict[str, str])[source]
read() List[Dict][source]
map(columns: List[str]) List[str][source]
read_xls() List[Dict][source]
class Importer(arguments)[source]
URL_PATTERN = 'https://udsmapper.org/wp-content/uploads/2022/10/Z{ip}CodetoZCTACrosswalk{year}UDS.xls{x}'
YEARS = [2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021]
TABLE = 'public.zip2zcta'
download(year) str[source]
process(output)[source]
drop()[source]
create()[source]
populate(path_to_data: str)[source]
vacuum()[source]
ingest(path_to_data: str)[source]
execute_db_update(sql: str)[source]