How to Geocode in Python Using the Census API | Data Tutorial | Python

preview_player
Показать описание
In this Green Numbers data tutorial I show you how to use the census API to geocode a list of street addresses and read the returned values in a pandas dataframe.

The Census Bureau provides a API that allows you submit a list of street addresses and receive geocoded values in return. Those values include the latitude, longitude, state FIPS code, county FIPS code, census tract, and census block.

There’s a lot of documentation that describes the format of the address file you need to submit, instructions for submission such as selecting the time period when the address range was captured, and the format of the file you receive in return. You can find links to this information in this video’s description.

In this video I’m going to show you:
-what the street address file should look like,
-how to use the API in python to submit the file,
-and how to read the returned data into a pandas dataframe.

Рекомендации по теме
Комментарии
Автор

Great video. Thanks for posting. Could io be to format the request output to a list?

MightyMouse
Автор

The census batch geocoding API seems to be painfully slow on my end. Is that what you find as well? At the moment, I'm trying to geocode in groups of maybe 700 and it has already taken more than 5 min and I have yet to get a response. I've used the censusgeocode package as well, and that also takes so long that it is un-usable, in my opinion. Any suggestions as to how it could be sped up?

nathanthreeleaf