The quickest way to feel what Close gives you: read the walk times from a starting point, map the supermarkets you can reach on foot, then draw how far a 30-minute walk takes you. The example city is Providence, Rhode Island.
Running this tutorial uses about 90 tokens.
Build a client, then read what you need from the free catalog.
Pick a starting point (here the centre of Providence) and ask how
long it takes to walk to each kind of amenity.
$point_summary() takes a lat/lon
instead of a block GEOID. Join the catalog’s readable name
and sort by time, so the nearest things are on top.
A 30-minute walk is a travel-time question, not a distance one, so
let the routing answer it directly: $point_pois() returns
every POI reachable from the starting point within
max_minutes, each carrying its walk time, with no isochrone
to overlay. close_map() draws them in one line, shaded by
that walk time (blue = closest), with the starting point marked by an X
and the city boundary behind for context.
nearby_supermarkets <- close$point_pois(
lat = start_lat,
lon = start_lon,
mode = "walk",
type = supermarket_type,
max_minutes = 30
)
city_boundary <- close$place_boundary(geoid = providence_ri$geoid)
closecity::close_map(
x = nearby_supermarkets,
fill = "travel_time",
boundary = city_boundary,
label = "name",
mark = c(start_lon, start_lat)
)An isochrone is the headline map: the area you can reach on foot in
10, 20, and 30 minutes. Shade it by the contour minutes;
blue marks the nearest, most-reachable ring.
Comparing the same starting point and the same 30-minute budget, on foot and by bus, is the clearest way to see what transit buys you.
walk <- close$isochrone(
lon = start_lon,
lat = start_lat,
mode = "walk",
direction = "from",
minutes = 30,
format = "geojson"
)
transit <- close$isochrone(
lon = start_lon,
lat = start_lat,
mode = "transit",
direction = "from",
minutes = 30,
format = "geojson"
)
closecity::close_map(x = walk, color = "#058040")
closecity::close_map(x = transit, color = "#202a5b")```