OpenSourceActivismTech / us-zipcodes-congress

Mapping of US zipcodes to Congressional Districts
Other
51 stars 13 forks source link

Inaccuracies in Arkansas #4

Closed maeday432 closed 1 year ago

maeday432 commented 1 year ago

Hi! Thank you so much for this. I noticed the data lists 38769 (a Mississippi zip code) for AR-01, along with several (65729, 65733, and 65761) Missouri zip codes. This was the first district I looked at so I'm not sure if there are any issues anywhere else.

jlev commented 1 year ago

Hi @maeday432, thanks for checking. Those zipcodes appears to be on the border with Arkansas, and so a postal subscriber could indeed be residing in AR-01 even if they get their mail delivered in another state.

This package uses the ZCTA areas from the US Census, with several caveats listed in the Readme. Most importantly, these can actually cross state lines. They aren't specific to towns, counties, or other federal boundaries.

If this is a problem for your usage, I'd suggest filtering by state if you have that when you are doing the lookup. In my use case, I don't because we prompt individuals for their zipcode over the phone, and then match them with all of their potential representatives.

jlev commented 1 year ago

But, I do see that there is a mistake in the merge_data code that caused only the first matching ZCTA to be included in the export. I've fixed that with the most recent commit (bbd29d06989737efa393c764798b66506cd348df).

Now 38769 is listed in both AR-1 and MS-2. This matches my pre-2022 data, and also the zcta_county_rel_10 table that the Census provided in 2010.