tonmcg / US_County_Level_Election_Results_08-20

United States General Election Presidential Results by County from 2008 to 2016

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trimmed leading zeros for FIPS

johnmnelson opened this issue · comments

County FIPS are a five-digit key. The counties with a leading zero have been trimmed so that joining to another file with the full FIPS code will likely fail.

Also, thanks for doing this!

Let me agree with @johnmnelson, and also clarify. In the combined_fips, states with State FIPS code in the range {01, ... , 09} are being stored as {1, ... , 9}. This is despite the reporting in your notebook printout. I think that a pretty simple flag in the write call should handle it?

Agreed. The issue was fixed in "US_County_Level_Presidential_Results_12-16.ipynb" notebook and still only exists in the "2016_US_County_Level_Presidential_Results.ipynb". I'd like to delete that last file, but don't know whether it's used by anyone. Thoughts?

I could write a quick patch to create two additional columns on the df that exists currently. (Actually I already did for the project that I'm working on.) If that works, I'll write it an make a pull request?

@d-alex-hughes Forgive me for the delayed response. If you're still able to do that, then we can take a look at the results and accept your PR.