Skip to main content

Typologies

Stable
Only available in EnglishUS 🇺🇸 and Canada 🇨🇦

Description​

Query locations to receive a specific built environment categorization based on a combination of Local Logic location insights and data, across the United States and Canada, along with localized population density and household density.

Local Logic has categorized over half a billion locations in North America based on their population density and their "access to everything" (defined as accessibility of cafés, grocery stores, restaurants, shops, entertainment, fitness establishments, healthcare, personal care, pharamacies, local businesses, nightlife, and pet stores). Using these data points, each inhabited location in Canada and the United States is categorized by accessibility and density.

Sample typologies map for Philadelphia, PA

This endpoint can be used to tailor location insights and customer experiences based on type of environment a location is in. For example, in dense urban cores, it may make more sense to highlight distance to the nearest public transit stop, while for car-dependant areas, parking availibility could be more relevant.

Local Logic Typologies of the Built Environment​

TypologyDefinitionExamples
urban (high access)Vibrant with very high access to shops and servicesNew York City: Manhattan, most of Brooklyn, most of the Bronx, Hoboken-Union City-Weehawken, NJ
Denver, CO: Downtown corridor around the 16th St Mall
Vancouver, Canada: Most of downtown Vancouver, Mount Pleasant, Commercial Drive, Vancouver business district, commercial area at Terminal Ave, Granville Island
main street hubVery pedestrian friendly with good (but not very high) access to shops and servicesNYC: Pelham Bay, Downtown Mt. Vernon, Coney Island, downtown Hempstead, Stapleton Heights (Staten Island)
Denver: South Broadway in Baker, Larimer St north of Downtown, E 17th Ave in City Park West
Vancouver: West Broadway in Kitsilano, Kerrisdale Village, New Westminster Downtown and Uptown
pedestrian oriented denseGood access to shops and services for day-to-day life, with amenities primarily oriented toward pedestrians
Population density exceeds 5,000/km2
NYC: Much of Whitestone (Queens), Port Richmond (Staten Island), Eastchester (the Bronx), residential Kearny, NJ
Denver: Capitol Hill, Speer, Union Station west of Downtown
Vancouver: Kitsilano, Kerrisdale, Kensington-Cedar Cottage
pedestrian oriented semi or low densityGood access to shops and services for day-to-day life, with amenities primarily oriented towards pedestrians
Population density is below 5,000/km2, with a high proportion of detached homes
NYC: Garden City (NY), Elmwood Park (NJ), much of Bronxville, parts of East New York
Denver: Sunnyside, Sloan Lake, Washington Park, Platt Park
Vancouver: Westside: Arbutus Ridge, Oakridge, Shaughnessy
mall oriented denseGood access to shops and services for day-to-day life, with amenities primarily located in malls and strip malls
Population density exceeds 5,000/km2
NYC: North Bayonne (NJ), downtown White Plains,
Denver: Parts of Glendale, commercial areas of Colfax and E Mississippi in Aurora, East 29th Avenue Town Center
Vancouver: Burnaby Metrotown and Brentwood areas, suburban centers of Richmond and Surrey
mall oriented semi or low densityGood access to shops and services for day-to-day life, with amenities primarily located in malls and strip malls
Population density is below 5,000/km2, with a high proportion of detached homes
NYC: Springfield & Union, NJ; Hartsdale, NY; Glenbrook, Stamford, CT
Denver: Montclair, Hilltop, northern Englewood, Centennial near the Tech Center
Vancouver: Residential areas near suburban centers of Richmond and Surrey
transit friendlyGood public transit access but not in walking distance to a wide range of amenitiesNYC: Southern Secaucus, NJ; Arrochar, Staten Island, NY; Cambria Heights, Queens, NY; near LIRR stations in Long Island
Denver: Around multiple train stations; 40th & Colorado (A), Perry-Sheridan-Lamar (W), Commerce City / 72nd Ave (N)
Vancouver: UBC, SFU, South Vancouver and South Burnaby
car dependentAbove-rural density but without good transit access or high walkability to amenities
Population density exceeds 150/km2
NYC: Long Island east of Nassau County, Belle Harbor (Queens), Dumont (NJ), Mount Pleasant (NY)
Denver: Westminster, Thornton, Cherry Hills Village, Columbine, Golden
Vancouver: Most of Richmond, Surrey, Delta, Coquitlam
rural / otherRural areas surrounded by forest and farmland and non-classifiable areas with low density like parks, airports, industrial developments
Population density is below 150/km2
NYC: Matinecock, NY; Bedminster, NJ; Redding, CT; Central Park; Laguardia Airport
Denver: Industrial North Washington, City Park, Coal Creek, Sedalia
Vancouver: Richmond and Delta agricultural areas

GET v3/typologies​

GET v3/typologes

This API uses JWT token based authentication. This JWT Bearer token is what is used to populate the Authorization header below.

Instructions on how to retrieve this token can be found at Getting Started.

HeaderStatusDescription
AuthorizationrequiredYour bearer token retrieved from our authorization API, ex. Bearer eyJhbGci...
AcceptrequiredThe datatype to request, this API will return application/json.

QueryString​

ParameterStatusDescription
latoptionalA decimal number between -90 and 90, representing the latitude.
lngoptionalA decimal number between -180 and 180, representing the longitude.

Usage examples​

  require('node-fetch')('https://api.locallogic.co/v3/typologies?' + new URLSearchParams({
lat: 45.508888,
lng: -73.561668
}), {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Bearer eyJhbGciOiJ...'
}
})
.then(response => response.json())
.then(body => {
console.log(body)
})
.catch(error => {
console.log(error)
})

Response example​

{
"data": {
"pedestrian oriented semi or low density": {
"population_per_square_km": 1773.408174201228,
"households_per_square_km": 1002.3215604699958
}
},
"meta": {
"message": "Successfully called v3/typologies API. This is a Beta endpoint. Its interface can change without notice.",
"type": "LocalLogic.API.Success",
"statusCode": 200
}
}

GET v3/typologies/{geohash-7}​

This version of the query uses a 7-digit geohash in the United States or Canada to look up the built environment typology. Here is an example of a 7-digit geohash containing Local Logic's office in Montréal, Canada.

GET v3/typologes/{geohash-7}

Header​

This API uses JWT token based authentication. This JWT Bearer token is what is used to populate the Authorization header below.

Instructions on how to retrieve this token can be found at Getting Started.

HeaderStatusDescription
AuthorizationrequiredYour bearer token retrieved from our authorization API, ex. Bearer eyJhbGci...
AcceptrequiredThe datatype to request, this API will return application/json.

Usage examples​

  require('node-fetch')('https://api.locallogic.co/v3/typologies/f25dvv7', {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Bearer eyJhbGciOiJ...'
}
})
.then(response => response.json())
.then(body => {
console.log(body)
})
.catch(error => {
console.log(error)
})

Response example​

{
"data": {
"urban (high access)": {
"population_per_square_km": 11837.653186533324,
"households_per_square_km": 9085.643049730807
}
},
"meta": {
"message": "Successfully called v3/typologies API. This is a Beta endpoint. Its interface can change without notice.",
"type": "LocalLogic.API.Success",
"statusCode": 200
}
}

Error codes​

When calling Local Logic’s API, you may receive an HTTP error code. These errors are explained below. In general, error codes starting with “4” are due to an invalid API call and can be fixed on your end, whereas error codes starting with “5” are due to server errors (that is, problems on our end). If you receive something not described here, please contact us at support@locallogic.co.

400 - BadRequest

This error code happens when the request inputs are incorrect. Use the detail field of the response for clarification. Example:

{
"code": "LocalLogic.API.BadRequest",
"detail": "ValidationErrors: AroundEndpoint is invalid:\n\tinclude is invalid: \"bad_input\" is not an acceptable value: \"groceries\", \"restaurants\", \"nightlife\", \"cafes\", \"shopping\", \"daycares\", \"primary_schools\", \"high_schools\""
}

401 - Unauthorized

This error code happens when your API key cannot access specific resources or locations. For example, some API keys can only access certain countries / states / provinces. Feel free to contact us for more information. Example:

{
"code": "LocalLogic.API.Unauthorized",
"detail": "Your API KEY doesn't support this region"
}

403 - Forbidden

This error code happens when you forgot to include security credentials with your request or you are requesting a parameter that you do not have access to. Example:

{
"message": "Forbidden"
}

404 - NotFound

This error code happens when we don’t have data for the requested location. For example, if you send a lat/lng pair for a location in Antarctica, we will return this error as we don’t have data for Antarctica (yet!). Example:

{
"code": "LocalLogic.API.NotFound",
"detail": "No Location Scores found for this location."
}

422 - Unprocessable Entity

This error code is returned when the correct parameters have been sent however, the data they contain is not valid. For example, if you send a lat/lng pair and the latitude is invalid (ie. not in the range [-90, 90]) and/or the longitude is invalid (ie. not in the range [-180, 180]).

{
"message": "Latitude must be within [-90, 90], Longitude must be within [-180, 180], Requires at least lat/lng pair, or geography_ids. None supplied.",
"code": "LocalLogic.API.BadRequest",
"statusCode": 422
}

500 - ServerError

This error code means that an error occurred on our end. Feel free to retry the same request to see if the problem persists. If you received a lot of these errors, please contact us at support@locallogic.co Example:

{
"code": "LocalLogic.API.ServerError",
"detail": "No Location Scores found for this location."
}

502 - BadGateway

This error code means that an error came from our cloud provider. Feel free to retry the same request to see if the problem persists. Example:

{
"message": "Internal server error"
}