closecityΒΆ

This is the Python software development kit for the Close.City API. It returns travel times from every US census block to nearby places, on foot, by bike, and by public transit. The data behind close.city is served over api.close.city.

from closecity import Client, close_map

# The key (ck_live_) comes from https://account.close.city
close = Client("ck_live_your_key")   # use your own key here

# Routes with geometry return a GeoDataFrame, ready to map:
supermarkets = close.pois_search(lat = 41.823, lon = -71.412, radius_m = 1500, type = 30)
close_map(supermarkets, color = "#e8590c")   # interactive map, bright hoverable points

By default, results come back as a GeoDataFrame where geometry applies (points, isochrones, and block polygons) and a plain DataFrame otherwise. Install with pip install closecity. The catalog and lookup routes are free; the data routes need a key from account.close.city.