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.

| improve this answer | |
  • That link is just a mine of excellent stuff ! – fabrizioM Nov 12 '13 at 15:40
  • Yes, @fabrizioM Its a really power toolkit to do offline geocoding & reverse geocoding. – Farhat Abbas Nov 13 '13 at 6:01
  • Is there anyone offering a paid hosted service? I want to convert my lat/longs to FIPS codes, but I'd prefer to pay a small monthly fee instead of hosting this service myself. – modulitos Jul 28 '17 at 18:56
  • @Lucas. Please check out fcc.gov/developer/census-block-conversions-api. I hope it will help. – Farhat Abbas Jul 30 '17 at 6:15

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(json.dumps(data, indent=4, sort_keys=True))

| improve this answer | |

You can use FCC Conversion API

For example: http://data.fcc.gov/api/block/find?format=json&latitude=28.35975&longitude=-81.421988&showall=true

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.