Socio-Economics
POST
socio_economics
Returns socio-economics data of a given type for the list of specified administrative divisions and time period. For example, population growth could be compared in two municipalities over the years.
Request#
curl -X POST 'https://api.pricehubble.com/api/v1/socio_economics' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer 74126eab0a9048d993bda4b1b55ae074' \
-d '{
"type": "education_levels",
"divisionsLevel6": [
"103",
"112"
],
"years": {
"min": 2017,
"max": 2017
},
"dossierId": "3bac39b8-2d84-4ae9-a693-40502071ea5d",
"countryCode": "CH"
}'
Exactly one divisionsLevel* must be provided. If you only have an address or coordinates and don't know the official ID of the administrative division, you can use the Administrative Divisions endpoint to look up the administrative division and the respective ID.
Field | Description | Type | Remarks |
---|---|---|---|
type | Socio-Economics type | string | |
divisionsLevel4 | Official IDs of the level 4 division | array of strings | |
divisionsLevel6 | Official IDs of the level 6 division | array of strings | |
divisionsLevel8 | Official IDs of the level 8 division | array of strings | |
divisionsLevel9 | Official IDs of the level 9 division | array of strings | Only available in FR |
divisionsLevel11 | Official IDs of the level 11 division | array of strings | Only available in FR and DE |
divisionsLevel100 | Official IDs of the level 100 division | array of strings | Not available in DE and UK |
years | Years filter on socio-economics data | object | |
years.min | integer | ||
years.max | integer | ||
dossierId | ID of the dossier | string | If this field is added to the request, then the location must be the same as the dossier's location (address or coordinates) |
countryCode | ISO country code | string | Valid values are AT , CH , DE , FR and UK |
Response#
{
"divisions":[
{
"officialId": "103",
"years":[
{
"values":[
{
"absoluteValue": 5000,
"relativeValue": 0.25,
"subtype": "compulsory_education"
},
{
"absoluteValue": 1000,
"relativeValue": 0.05,
"subtype": "no_education"
},
{
"absoluteValue": 4000,
"relativeValue": 0.2,
"subtype": "tertiary_education"
},
{
"absoluteValue": 10000,
"relativeValue": 0.5,
"subtype": "upper_secondary_education"
}
],
"year":2017
}
]
},
{
"officialId": "112",
"years":[
{
"values":[
{
"absoluteValue": 30000,
"relativeValue": 0.3,
"subtype": "compulsory_education"
},
{
"absoluteValue": 10000,
"relativeValue": 0.1,
"subtype": "no_education"
},
{
"absoluteValue": 20000,
"relativeValue": 0.2,
"subtype": "tertiary_education"
},
{
"absoluteValue": 40000,
"relativeValue": 0.4,
"subtype": "upper_secondary_education"
}
],
"year": 2017
}
]
}
]
}
Field | Description | Type | Remarks |
---|---|---|---|
divisions | List of matching socio-economics data grouped by administrative divisions and years | array | |
divisions[i].officialId | Official ID of the administrative division for the returned socio-economics data group | string | |
divisions[i].years | List of socio-economics data, grouped and sorted by year in ascending order for the given administrative division | array | |
divisions[i].years[i].values | List of socio-economics values, per socio-economics subtype, if any | array | |
divisions[i].years[i].values[i].subtype | A socio-economics subtype if one exists for the requested type | string | |
divisions[i].years[i].values[i].absoluteValue | Absolute value for the given year, type and subtype | float | |
divisions[i].years[i].values[i].relativeValue | Relative value compared to the other subtypes | float | min: 0, max: 1 |
divisions[i].years[i].year | The year of the returned socio-economics data | integer |