Friday, February 19, 2016

Utilizing County FIP Codes CSV File

FIP (Federal Information Processing) codes identify counties and county equivalents in the USA. Google's geocode information includes county names but lacks the FIP code. Luckily, the county name returned in the Google geocode information matches the county name provided in the Census Bureau FIP data.

I downloaded the US Census Bureau's FIP data as CSV data from their web site.

I created hashmaps of the state and county information that is in the CSV file. After obtaining the geographic information for the address from Google (see previous post), the state abbreviation and county name can be used to get the FIP code from the data stored in the hashmaps by calling stateCountyMap.get("TX").get("Collin County").getFip();