kosukeimai / wru

Who Are You? Bayesian Prediction of Racial Category Using Surname and Geolocation
132 stars 31 forks source link

Ensure unique counties from larger voterfiles #75

Closed 1beb closed 2 years ago

1beb commented 2 years ago

When pulling census data as part of our predict_race call, the counties are split into groups by state. However, duplicates are left over. This is carried through in get_census_geo, causing the link for the initial county level pull to contain duplicated counties and the census data API to fail.

Added a line to call unique on each states' counties before passing it to the initial census data pull.

This should fix #72