Welcome to uszipcode Documentation

uszipcode is the most powerful and easy to use programmable zipcode database, and also a searchengine in Python. Besides geometry data (also boundary info), several useful census data points are also served: population, population density, total wage, average annual wage, house of units, land area, water area. The geometry and geocoding data I am using is from google map API on Mar 2016. To know more about the data, click here. Another popular zipcode Python extension has lat, lng accuracy issue, which doesn’t give me reliable results of searching by coordinate and radius.

# Search zipcode within 30 miles, ordered from closest to farthest>>>res=search.by_coordinate(39.122229,-77.133578,radius=30,returns=5)>>>len(res)# by default 5 results returned5>>>forzipcodeinres:...# do whatever you want...# Find top 10 population zipcode>>>res=search.by_population(lower=0,upper=999999999,...sort_by="Population",ascending=False,returns=10)# Find top 10 largest land area zipcode>>>res=search.by_landarea(lower=0,upper=999999999,...sort_by="LandArea",ascending=False,returns=10)# Find top 10 most wealthy zipcode in new york>>>res=search.find(city="newyork",wealthy_lower=100000,...sort_by="Wealthy",returns=10)# at least $100,000 annual income

Fuzzy city name and state name searchenables case, space insensitive, typo tolerant input. You don’t have to know the correct spelling of the city or state. This is very helpful if you need to build a web app with it.