# This file is part of the Minnesota Population Center's NHGISXWALK.
# For copyright and licensing information, see the NOTICE and LICENSE files
# in this project's top-level directory, and also on-line at:
# https://github.com/ipums/nhgisxwalk
README.txt
files¶blk{1990/2000}{ge/gj}-blk2010{ge/gj}
¶James D. Gaboardi, 06/2020
%load_ext watermark
%watermark
2020-10-01T17:59:32-04:00 CPython 3.8.5 IPython 7.18.1 compiler : Clang 10.0.1 system : Darwin release : 19.6.0 machine : x86_64 processor : i386 CPU cores : 8 interpreter: 64bit
import glob
import nhgisxwalk
import shutil
%load_ext autoreload
%autoreload 2
%watermark -w
%watermark -iv
watermark 2.0.2 nhgisxwalk 0.0.9post1
# Set this to a local directory
cross_dir_in = "path/to/data/"
cross_zip_in = [f for f in glob.glob(cross_dir_in+"nhgis_blk*") if f.endswith("zip")]
# Set this to a local directory
cross_dir_out = "path/to/data/"
target_columns = ["GJOIN2010", "GEOID10", "GJOIN2010", "GEOID10"]
target_columns
['GJOIN2010', 'GEOID10', 'GJOIN2010', 'GEOID10']
dtype = nhgisxwalk.str_types(nhgisxwalk.ID_COLS)
for f, tcol in list(zip(cross_zip_in, target_columns)):
nhgisxwalk.regenerate_blk_blk_xwalk(f, cross_dir_out, tcol, dtype)