I millions of lat,long pairs and I want to convert to FIPS county codes that match with the US census data. In the past I used the census block api but that is too slow for the amount of numbers that I have. Is there a better library / tool that I can load locally ? If not would be possible to use the TIGER data from the census website to create a service like that ? What knowledge is required (projections, minimum distances, ...) ?
Please check out http://www.datasciencetoolkit.org/ a ready to use virtual machine(VM) for geocoding and reverse geocoding, it provides useful information including FIPS codes.
i hope it will help.
See this FFC site, it has moved: https://geo.fcc.gov/api/census/#!/area/get_area
And some python 3 code to get the data:
import urllib, json, requests with urllib.request.urlopen("https://geo.fcc.gov/api/census/area?lat=42.3295&lon=-71.0826&format=json") as url: data = json.loads(url.read().decode()) print(data) print(json.dumps(data, indent=4, sort_keys=True)) print(data['results']['state_fips']) print(data['results']['county_fips']) print(data['results']['county_name'])
You can use FCC Conversion API