I’m looking for a library, or some sort of method in Python to return a county name from a county code such as 48235 which is Irion County, TX.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you’re looking for is basically a mapping of county codes to counties.
Getting one is a simple as finding a county list (and Google shall help you in this respect:
www.schooldata.com/pdfs/US_FIPS_Codes.xls), and translating the data that’s in there into a data structure that is suitable to your needs (probably a dictionnary, but you could store it in a DB).Reading data in this
.xlsfile should be pretty using thexlrdmodule, but you could also convert it to.csvand use thecsvmodule.Really, what you’re looking at is so basic that there is really no need for a library.