Skip to main content

Scores Data

This API endpoint allows you to get the Climate Variable Scores of a Assets.

API Endpoint

[POST] https://api.intensel.net/apiv2/project_scores_data/

Request Arguments

ArgumentTypeDescription
project_namestringThe name of the project.
analysis_typestringThe type of the analysis. RCP or SSP.
variableslistThe list of variables.
scenarioslistThe list of scenarios.
yearslistThe list of years.

Available Scenarios and Years

Analysis TypeScenariosYears
RCP0.0, 2.6, 4.5, 8.52020, 2030, 2050
SSP0.0, 2.6, 4.5, 8.52020, 2030, 2050, 2100

Request Example

import requests
URL = "https://api.intensel.net/apiv2/project_scores_data/"
headers = {
'X-Intensel-Api-Key': 'YOUR_API_KEY',
}
payload = {"project_name": "My Awesome Project", "analysis_type": "RCP", "variables": ["rainfall_flood", "river_flood"],
"scenarios": ["0.0", "2.6", "4.5", "8.5"], "years": ["2020", "2030", "2050"]}
response = requests.post(URL, json=payload, headers=headers)
data = response.json()
print(data)

Response Schema

{
"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": {
"$return_period_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.

$return_period_year is the return period year of the hazard variable.

... means that the object can contain more data.

Output in Specific Format

The output of the API can be in a specific format. The format can be specified by the output argument in the request payload.

Example API URL

[POST] https://api.intensel.net/apiv2/project_scores_data/?output=csv

Available formats:

  • json (default)
  • csv (comma separated values)
  • excel (xlsx)
  • html (html table)

Example Response

Scores Data Response JSON -> view response