<jupyter_start><jupyter_text>- NHGISST - State FIPS Code- NHGISCTY - County FIPS Code- GISJOIN2 - Tract ID<jupyter_code>data.head()
codes = np.unique(data.NHGISST.values)
codes
# import matplotlib
import descartes
%matplotlib inline
print(np.unique(data[data.NHGISST == codes[14]].NHGISCTY.values))
data[data.NHGISST == '060']
print(data[data.NHGISCTY == codes[16]].GISJOIN2)
codes[16]<jupyter_output><empty_output><jupyter_text>Manually verify that the tract crosswalk matches up:<jupyter_code>import matplotlib.pyplot as plt

polygon = data[data.GISJOIN2 == '18009700136'].geometry.values[0]
polygon10 = data10[data10.GEOID10 == "18097320301"].geometry.values[0].centroid
polygon10_2 = data10[data10.GEOID10 == "18097320304"].geometry.values[0].centroid
polygon10_3 = data10[data10.GEOID10 == "18097320500"].geometry.values[0].centroid

x, y = polygon.exterior.xy
x10, y10 = polygon10.x, polygon10.y
x10_2, y10_2 = polygon10_2.x, polygon10_2.y
x10_3, y10_3 = polygon10_3.x, polygon10_3.y
fig, ax = plt.subplots()
ax.plot(x, y, c='r', alpha=0.5)
ax.scatter(x10, y10, c='blue')
ax.scatter(x10_2, y10_2, c='blue')
ax.scatter(x10_3, y10_3, c='blue')
centers_of_population = gpd.read_file("./nhgis0002_shape/nhgis0002_shape/nhgis0002_shapefile_cenpop2010_us_tract_cenpop_2010/US_tract_cenpop_2010.shp")
centers_of_population<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14211695040710584, 'fraction_numerical': 0.11843079200592153, 'mean_word_length': 7.345679012345679, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '131409', 'license': 'MIT', 'n_tokens_mistral': 675, 'n_tokens_neox': 566, 'n_words': 84, 'path': 'find-cities.ipynb', 'repo_name': 'agupta01/segregation-measure', 'size': '1351'}