MATLAB Interface for JBA Risk Management
This interface allows users to access JBA Risk data directly from MATLAB. JBA Risk provides flood maps, catastrophe models and analytics for the insurance, reinsurance, property management and government sectors for use in quantifying and mitigating flood risk.
- MATLAB R2022a or later
Users can retrieve JBA Risk data directly from MATLAB. More information can be found here:
and additional documentation for the JBA Risk REST API is here:
https://api.jbarisk.com/docs/1.1/index.html
https://api.jbarisk.com/docs/1.0/index.html
JBA Risk provides a token to establish a valid API connection for all requests. Users can retrieve information required to make subsequent data requests given an URL endpoint and additional request parameters.
conn = jbarisk("token");
Create Request structure with two locations for the following examples. The geometry is defined in WGS84 coordinates in these examples.
reqStruct.country_code = "US5";
reqStruct.geometries(1).id = "point 1";
reqStruct.geometries(1).wkt_geometry = "POINT(-101.1412927159555553 43.94424115485919)";
reqStruct.geometries(1).buffer = 10;
reqStruct.geometries(2).id = "point 2";
reqStruct.geometries(2).wkt_geometry = "POINT(-102.1412927159555553 42.94424115485919)";
reqStruct.geometries(2).buffer = 10;
jsonParams = '{"country_code": "US5","geometries": [{"id": "point 1","wkt_geometry": "POINT(-101.65 43.45)","buffer": 10}]}';
Retrieve country information. The returned information represents dataset identifiers of baseline maps.
conn.HttpMethod = "GET";
[data,response] = countries(conn);
[data,response] = countries(conn,"US5");
[data,response] = countries(conn,"US5","geometry","POINT(-101.1412927159555553 43.94424115485919)","buffer","10");
conn.HttpMethod = "OPTIONS";
[data,response] = countries(conn);
[data,response] = countries(conn,"US5");
[data,response] = countries(conn,"US5","geometry","POINT(-101.1412927159555553 43.94424115485919)");
conn.HttpMethod = "POST";
[data,response] = countries(conn,"US5",jsonParams);
[data,response] = countries(conn,"US5",reqStruct);
Retrieve cimate change scenarios for a specified dataset identifier. The scenarios are representative concentration pathways.
conn.HttpMethod = "GET";
[data,response] = ccscenarios(conn,"US5");
[data,response] = ccscenarios(conn,"US5","scenario","rcp45");
[data,response] = ccscenarios(conn,"US5","scenario","rcp45","time_start","2020","time_end","2040","time_filter","2020-2040");
conn.HttpMethod = "OPTIONS";
[data,response] = ccscenarios(conn,"US5");
[data,response] = ccscenarios(conn,"US5","scenario","rcp45");
conn.HttpMethod = "GET";
[data,response] = flooddepths(conn,"US5");
[data,response] = flooddepths(conn,"US5",[]);
[data,response] = flooddepths(conn,"US5","rcp45_2016-2045");
[data,response] = flooddepths(conn,"US5",[],"geometry","POINT(-101.1412927159555553 43.94424115485919)","buffer","10");
[data,response] = flooddepths(conn,"US5","rcp45_2016-2045","geometry","POINT(-101.1412927159555553 43.94424115485919)","buffer","10");
conn.HttpMethod = "OPTIONS";
[data,response] = flooddepths(conn,"US5");
[data,response] = flooddepths(conn,"US5",[]);
[data,response] = flooddepths(conn,"US5","rcp45_2016-2045");
[data,response] = flooddepths(conn,"US5",[],"geometry","POINT(-101.1412927159555553 43.94424115485919)","buffer","10");
[data,response] = flooddepths(conn,"US5","rcp45_2016-2045","geometry","POINT(-101.1412927159555553 43.94424115485919)","buffer","10");
conn.HttpMethod = "POST";
[data,response] = flooddepths(conn,"US5",[],reqStruct);
[data,response] = flooddepths(conn,"US5",[],jsonParams);
[data,response] = flooddepths(conn,"US5","rcp45_2016-2045",reqStruct);
[data,response] = flooddepths(conn,"US5","rcp45_2016-2045",jsonParams);
conn.HttpMethod = "GET";
[data,response] = floodscores(conn,"US5");
[data,response] = floodscores(conn,"US5",[]);
[data,response] = floodscores(conn,"US5","rcp45_2016-2045");
[data,response] = floodscores(conn,"US5",[],"geometry","POINT(-101.1412927159555553 43.94424115485919)","buffer","10");
[data,response] = floodscores(conn,"US5","rcp45_2016-2045","geometry","POINT(-101.1412927159555553 43.94424115485919)","buffer","10");
conn.HttpMethod = "OPTIONS";
[data,response] = floodscores(conn,"US5");
[data,response] = floodscores(conn,"US5",[]);
[data,response] = floodscores(conn,"US5","rcp45_2016-2045");
[data,response] = floodscores(conn,"US5",[],"geometry","POINT(-101.1412927159555553 43.94424115485919)","buffer","10");
[data,response] = floodscores(conn,"US5","rcp45_2016-2045","geometry","POINT(-101.1412927159555553 43.94424115485919)","buffer","10");
conn.HttpMethod = "POST";
[data,response] = floodscores(conn,"US5",[],reqStruct);
[data,response] = floodscores(conn,"US5",[],jsonParams);
[data,response] = floodscores(conn,"US5","rcp45_2016-2045",reqStruct);
[data,response] = floodscores(conn,"US5","rcp45_2016-2045",jsonParams);
Retrieve calculated pricing data for a specific vulnerabilty curve given a region and dataset identifier.
conn.HttpMethod = "GET";
[data,response] = pricingdata(conn,"R-GBL-X-X","Global","US5",[],"geometry","POINT(-101.65 43.45)");
[data,response] = pricingdata(conn,"R-GBL-X-X","Global","US5","rcp45_2016-2045","geometry","POINT(-101.65 43.45)");
conn.HttpMethod = "OPTIONS";
[data,response] = pricingdata(conn,"R-GBL-X-X","Global","US5",[],"geometry","POINT(-101.65 43.45)");
[data,response] = pricingdata(conn,"R-GBL-X-X","Global","US5","rcp45_2016-2045","geometry","POINT(-101.65 43.45)");
conn.HttpMethod = "POST";
[data,response] = pricingdata(conn,"R-GBL-X-X","Global","US5",[],reqStruct);
[data,response] = pricingdata(conn,"R-GBL-X-X","Global","US5","rcp45_2016-2045",reqStruct);
[data,response] = pricingdata(conn,"R-GBL-X-X","Global","US5",[],jsonParams);
[data,response] = pricingdata(conn,"R-GBL-X-X","Global","US5","rcp45_2016-2045",jsonParams);
conn.HttpMethod = "GET";
[data,response] = risktypes(conn,"UK");
conn.HttpMethod = "OPTIONS";
[data,response] = risktypes(conn,"UK");
conn.HttpMethod = "GET";
[data,response] = vulnerabilitycurveregions(conn);
conn.HttpMethod = "OPTIONS";
[data,response] = vulnerabilitycurveregions(conn);
The license is available in the LICENSE.TXT file in this GitHub repository.
Community Support
MATLAB Central
Copyright 2024 The MathWorks, Inc.
引用格式
MathWorks Computational Finance Team (2024). MATLAB Interface for JBA Risk Management (https://github.com/mathworks/jbarisk), GitHub. 检索时间: .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!@jbarisk
无法下载基于 GitHub 默认分支的版本
版本 | 已发布 | 发行说明 | |
---|---|---|---|
1.0.0 |
|