Analysis Data
This API endpoint allows you to get the combined Hazard, Loss, and Scores Data of Assets.
API Endpoint
[POST] https://api.intensel.net/apiv2/project_analysis_data/
Request Arguments
Argument | Type | Description |
---|---|---|
project_name | string | The name of the project. |
analysis_type | string | The type of the analysis. RCP or SSP. |
scenarios | list | The list of scenarios. |
years | list | The list of years. |
with_mitigation | boolean | Include mitigation risk in the analysis. |
with_content | boolean | Include content risk in the analysis. |
with_long_term_impact | boolean | Include long term impact in the analysis. |
loss_variables | list | The list of loss variables. |
score_variables | list | The list of score variables. |
hazard_variables | list | The list of hazard variables. |
Available Scenarios and Years
Analysis Type | Scenarios | Years |
---|---|---|
RCP | 0.0, 2.6, 4.5, 8.5 | 2020, 2030, 2050 |
SSP | 0.0, 2.6, 4.5, 8.5 | 2020, 2030, 2050, 2100 |
Request Example
- Python
- JavaScript
- cURL
import requests
URL = "https://api.intensel.net/apiv2/project_analysis_data/"
headers = {
'X-Intensel-Api-Key': 'YOUR_API_KEY',
}
payload = {
"project_name": "test 17_03_25-2",
"analysis_type": "SSP",
"scenarios": ["8.5", "4.5", "2.6"],
"years": ["2050", "2030", "2100"],
"with_mitigation": True,
"with_content": True,
"with_long_term_impact": True,
"loss_variables": ["rainfall_flood"],
"score_variables": ["rainfall_flood"],
"hazard_variables": ["rainfall_flood"]
}
response = requests.post(URL, json=payload, headers=headers)
data = response.json()
print(data)
const axios = require('axios');
const URL = "https://api.intensel.net/apiv2/project_analysis_data/";
const headers = {
'X-Intensel-Api-Key': 'YOUR_API_KEY',
};
const payload = {
"project_name": "test 17_03_25-2",
"analysis_type": "SSP",
"scenarios": ["8.5", "4.5", "2.6"],
"years": ["2050", "2030", "2100"],
"with_mitigation": true,
"with_content": true,
"with_long_term_impact": true,
"loss_variables": ["rainfall_flood"],
"score_variables": ["rainfall_flood"],
"hazard_variables": ["rainfall_flood"]
};
axios.post(URL, payload, {headers: headers}).then((response) => {
console.log(response.data);
});
curl -X POST "https://api.intensel.net/apiv2/project_analysis_data/" -H "accept: application/json" -H "X-Intensel-Api-Key: YOUR_API_KEY" -H "Content-Type: application/json" -d "{\"project_name\":\"test 17_03_25-2\",\"analysis_type\":\"SSP\",\"scenarios\":[\"8.5\", \"4.5\", \"2.6\"],\"years\":[\"2050\", \"2030\", \"2100\"],\"with_mitigation\":true,\"with_content\":true,\"with_long_term_impact\":true,\"loss_variables\":[\"rainfall_flood\"],\"score_variables\":[\"rainfall_flood\"],\"hazard_variables\":[\"rainfall_flood\"]}"
Response Schema
{
"request_info": {
"project_name": string,
"analysis_type": string,
"asset_names": string[]
},
"hazard_data": {
"requested_variables": string[],
"analysis_type": string,
"asset_names": string[],
"data": [
{
"$hazard_variable": {
"meta_data": {
"units": string
},
"results": {
"$scenario_$year": float,
...
}
}
}
]
},
"loss_data": {
"requested_variables": string[],
"data": [
{
"name": string,
"latitude": float,
"longitude": float,
"loss_data": {
"$hazard_variable": {
"meta_data": {
"units": string
},
"results": {
"physical_loss": {
"$scenario_$year": float,
...
},
"operational_loss": {
"$scenario_$year": float,
...
}
}
}
}
}
]
},
"score_data": {
"requested_variables": string[],
"analysis_type": string,
"asset_names": string[],
"data": [
{
"name": string,
"latitude": float,
"longitude": float,
"score_data": {
"$hazard_variable": {
"meta_data": {
"units": string
},
"results": {
"$scenario_$year": float,
...
}
},
"overall": {
"meta_data": {
"units": string
},
"results": {
"$scenario_$year": float,
...
}
}
}
}
]
}
}
Response Schema Description
$
prefix to key means that the key is a dynamic value.
string[]
means an array of strings.
float
means a floating point number.
string
means a string.
$hazard_variable
is the name of the hazard variable.
$scenario_$year
is the scenario and year combination.
...
means that the object can contain more data.
Example Response
Analysis Data Response JSON -> view response