Value Drivers
Descriptionβ
Query for the top features that make locations within a neighborhood valuable based on Local Logic measures and scores. The value drivers are calculated derived from Local Logic's valuation engine as applied across different asset classes across entire neighborhoods.
GET v3/value-drivers/{geog_id}
β
Accepted values for geog_id
are g10_*
, g20_*
and g30_*
. Other values will result with a 404 (not found) status code.
GET v3/value-drivers/{geog_id}
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.
Header | Status | Description |
---|---|---|
Authorization | required | Your bearer token retrieved from our authorization API, ex. Bearer eyJhbGci... |
Accept | required | The datatype to request, this API will return application/json . |
QueryStringβ
Parameter | Status | Description |
---|---|---|
limit | optional | The limit of value drivers to fetch. -1 means no limit. |
Usage examplesβ
- NodeJS
- Python
require('node-fetch')('https://api.locallogic.co/v3/value-drivers/g20_f25dyhf3?' + new URLSearchParams({
}), {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Bearer eyJhbGciOiJ...'
}
})
.then(response => response.json())
.then(body => {
console.log(body)
})
.catch(error => {
console.log(error)
})
import requests
response = requests.get(
"https://api.locallogic.co/v3/value-drivers/g20_f25dyhf3",
headers={
"Accept": "application/json",
"Authorization": "Bearer eyJhbGciOiJ..."
},
)
print(response.json())
Response exampleβ
{
"data": {
"meta": {
"message": "This is a Beta endpoint. Its interface can change without notice."
},
"value_drivers": [
{
"name": "FITNESS_ESTABLISHMENT_ACCESS",
"value": 4.401399,
"value_qualifier": "HIGH",
"weight": 0.000741
},
{
"name": "COFFEE_SHOP_ACCESS",
"value": 3.179949,
"value_qualifier": "HIGH",
"weight": 0.000689
},
{
"name": "NIGHTLIFE_ACCESS",
"value": 3.12326,
"value_qualifier": "HIGH",
"weight": 0.000631
},
{
"name": "PEDESTRIAN_ORIENTED_STREET_ACCESS",
"value": 3.805161,
"value_qualifier": "HIGH",
"weight": 0.000531
},
{
"name": "RAPID_TRANSIT_SERVICE_ACCESS",
"value": 3.558977,
"value_qualifier": "HIGH",
"weight": 0.000515
},
{
"name": "BUS_SERVICE_ACCESS",
"value": 3.91037,
"value_qualifier": "HIGH",
"weight": 0.000426
},
{
"name": "PARKS",
"value": 4.820454,
"value_qualifier": "HIGH",
"weight": 0.000308
},
{
"name": "CLOTHING_AND_ACCESSORY_STORE_ACCESS",
"value": 3.218212,
"value_qualifier": "HIGH",
"weight": 0.000306
},
{
"name": "ENTERTAINMENT_VENUE_ACCESS",
"value": 2.691957,
"value_qualifier": "HIGH",
"weight": 0.000209
},
{
"name": "NEAREST_PHARMACY_PROXIMITY",
"value": 3.319748,
"value_qualifier": "LOW",
"weight": 0.000195
},
{
"name": "SPORTS_FACILITY_ACCESS",
"value": 3.690975,
"value_qualifier": "HIGH",
"weight": 0.000146
},
{
"name": "RESTAURANT_ACCESS",
"value": 3.94121,
"value_qualifier": "HIGH",
"weight": 0.000112
},
{
"name": "DEPARTMENT_STORE_ACCESS",
"value": 3.311129,
"value_qualifier": "MED",
"weight": 5.1e-05
},
{
"name": "SHOPS_AND_SERVICES_ACCESS",
"value": 3.355069,
"value_qualifier": "HIGH",
"weight": 4.3e-05
},
{
"name": "NEAREST_HIGHWAY_PROXIMITY",
"value": 1.035646,
"value_qualifier": "MED",
"weight": -1.2e-05
},
{
"name": "SPECIALTY_GROCERY_STORE_ACCESS",
"value": 3.344644,
"value_qualifier": "HIGH",
"weight": -0.000119
},
{
"name": "COMMON_NEEDS_ACCESS",
"value": 4.045221,
"value_qualifier": "HIGH",
"weight": -0.000143
},
{
"name": "TRAIN_SERVICE_ACCESS",
"value": 1.610418,
"value_qualifier": "HIGH",
"weight": -0.000343
}
]
},
"meta": {
"message": "Successfully called v3/value-drivers API.",
"statusCode": 200,
"type": "LocalLogic.API.Success"
}
}
SDK Implementationsβ
Value Drivers is used by one Local Logic SDK:
SDK | Description |
---|---|
Property Value Drivers SDK | Retrieve the top drivers of property value within the neighborhood. |
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"
}