Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions PiWindAzure/keys_data/lookup_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"model": {
"supplier_id": "OasisLMF",
"model_id": "PiWind",
"model_version": "0.0.0.1"
},
"builtin_lookup_type": "new_lookup",
"keys_data_storage": {
"storage_class": "oasis_data_manager.filestore.backends.azure_abfs.AzureABFSStorage",
"options":{
"azure_container": "data",
"root_dir": "OasisPiWind/keys_data/PiWind/"
}
},
"step_definition": {
"peril":{
"type": "rtree",
"columns": ["latitude", "longitude"],
"parameters": {
"file_path": "areaperil_dict.parquet",
"file_type": "parquet",
"id_columns": ["area_peril_id"],
"nearest_neighbor_min_distance": -1
}
},
"split_loc_perils_covered":{
"type": "split_loc_perils_covered" ,
"columns": ["locperilscovered"],
"parameters": {
"model_perils_covered": ["WTC", "WSS"]
}
},
"create_coverage_type": {
"type": "simple_pivot",
"parameters": {
"pivots": [{"new_cols": {"coverage_type": 1}},
{"new_cols": {"coverage_type": 3}}]
}
},
"vulnerability": {
"type": "merge",
"columns": ["peril_id", "coverage_type", "occupancycode"],
"parameters": {"file_path": "vulnerability_dict.csv",
"id_columns": ["vulnerability_id"]
}
},
"amplification": {
"type": "merge",
"columns": ["peril_id", "postalcode"],
"parameters": {"file_path": "amplification_dict.csv",
"id_columns": ["amplification_id"]
}
}
},
"strategy": ["split_loc_perils_covered", "peril", "create_coverage_type", "vulnerability"]
}
32 changes: 32 additions & 0 deletions PiWindAzure/meta_data/model_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"model_settings":{
"event_set":{
"name": "Event Set",
"desc": "Piwind Event Set selection",
"default": "p",
"options":[
{"id":"p", "desc": "Probabilistic", "number_of_events": 1447}
]
},
"event_occurrence_id":{
"name": "Occurrence Set",
"desc": "PiWind Occurrence selection",
"default": "lt",
"options":[
{"id":"lt", "desc": "Long Term"}
]
}
},
"lookup_settings":{
"supported_perils":[
{"id": "WSS", "desc": "Single Peril: Storm Surge"},
{"id": "WTC", "desc": "Single Peril: Tropical Cyclone"},
{"id": "WW1", "desc": "Group Peril: Windstorm with storm surge"},
{"id": "WW2", "desc": "Group Peril: Windstorm w/o storm surge"}
]
},
"data_settings": {
"damage_group_fields": ["PortNumber", "AccNumber", "LocNumber"]
},
"model_default_samples" :10
}
Binary file added PiWindAzure/model_data/events_p.bin
Binary file not shown.
8 changes: 8 additions & 0 deletions PiWindAzure/model_data/model_storage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"storage_class": "oasis_data_manager.filestore.backends.azure_abfs.AzureABFSStorage",
"options":{
"azure_container": "data",
"root_dir": "OasisPiWind/model_data/PiWind/"
}
}

5 changes: 5 additions & 0 deletions PiWindAzure/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Piwind run on Azure.
this folder contains the minimal set of files and option to run on Azure

For the key server step, credential cannot be stored in the keys_data_storage options, they need to be set with AZURE_STORAGE_CONNECTION_STRING env variable.

Empty file.
3 changes: 3 additions & 0 deletions PiWindAzure/tests/test_1/SourceAccOEDPiWind.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PortNumber,AccNumber,AccCurrency,PolNumber,PolPerilsCovered,PolInceptionDate,PolExpiryDate,LayerNumber,LayerParticipation,LayerLimit,LayerAttachment,OEDVersion
1,A11111,GBP,Layer1,WW1,2018-01-01,2018-12-31,1,0.3,5000000,500000,2.0.0
1,A11111,GBP,Layer2,WW1,2018-01-01,2018-12-31,2,0.3,100000000,5500000,2.0.0
12,599 changes: 12,599 additions & 0 deletions PiWindAzure/tests/test_1/SourceLocOEDPiWind.csv

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions PiWindAzure/tests/test_1/analysis_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"analysis_tag": "base_example",
"source_tag": "MDK",
"model_name_id": "PiWind",
"model_supplier_id": "OasisLMF",
"gul_threshold": 0,
"number_of_samples": 10,
"gul_output": true,
"model_settings": {
"event_set": "p",
"event_occurrence_id": "lt"
},
"gul_summaries": [
{
"aalcalc": true,
"eltcalc": true,
"id": 1,
"oed_fields": ["PortNumber","AccNumber","LocNumber"],
"lec_output": true,
"leccalc": {
"full_uncertainty_aep": true,
"full_uncertainty_oep": true,
"return_period_file": true
}
}
],
"il_output": true,
"il_summaries": [
{
"aalcalc": true,
"eltcalc": true,
"id": 1,
"lec_output": true,
"leccalc": {
"full_uncertainty_aep": true,
"full_uncertainty_oep": true,
"return_period_file": true
}
}
],
"ri_output": true,
"ri_summaries": [
{
"aalcalc": true,
"eltcalc": true,
"id": 1,
"lec_output": true,
"leccalc": {
"full_uncertainty_aep": true,
"full_uncertainty_oep": true,
"return_period_file": true
}
}
]
}
10 changes: 10 additions & 0 deletions PiWindAzure/tests/test_1/oasislmf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"analysis_settings_json": "analysis_settings.json",
"lookup_config_json": "../../keys_data/lookup_config.json",
"lookup_data_dir": "../../keys_data",
"model_data_dir": "../../model_data",
"model_storage_json": "../../model_data/model_storage.json",
"model_settings_json": "../../meta_data/model_settings.json",
"oed_location_csv": "SourceLocOEDPiWind.csv",
"oed_accounts_csv": "SourceAccOEDPiWind.csv"
}
49 changes: 49 additions & 0 deletions PiWindS3/keys_data/lookup_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"model": {
"supplier_id": "OasisLMF",
"model_id": "PiWind",
"model_version": "0.0.0.1"
},
"builtin_lookup_type": "new_lookup",
"keys_data_storage": {
"storage_class": "oasis_data_manager.filestore.backends.aws_s3.AwsS3Storage",
"options":{
"bucket_name": "oasislmf-model-library-oasis-piwind/keys_data",
"region_name": "eu-west-1"
}
},
"step_definition": {
"peril":{
"type": "rtree",
"columns": ["latitude", "longitude"],
"parameters": {
"file_path": "areaperil_dict.parquet",
"file_type": "parquet",
"id_columns": ["area_peril_id"],
"nearest_neighbor_min_distance": -1
}
},
"split_loc_perils_covered":{
"type": "split_loc_perils_covered" ,
"columns": ["locperilscovered"],
"parameters": {
"model_perils_covered": ["WTC", "WSS"]
}
},
"create_coverage_type": {
"type": "simple_pivot",
"parameters": {
"pivots": [{"new_cols": {"coverage_type": 1}},
{"new_cols": {"coverage_type": 3}}]
}
},
"vulnerability": {
"type": "merge",
"columns": ["peril_id", "coverage_type", "occupancycode"],
"parameters": {"file_path": "vulnerability_dict.csv",
"id_columns": ["vulnerability_id"]
}
}
},
"strategy": ["split_loc_perils_covered", "peril", "create_coverage_type", "vulnerability"]
}
32 changes: 32 additions & 0 deletions PiWindS3/meta_data/model_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"model_settings":{
"event_set":{
"name": "Event Set",
"desc": "Piwind Event Set selection",
"default": "p",
"options":[
{"id":"p", "desc": "Probabilistic", "number_of_events": 1447}
]
},
"event_occurrence_id":{
"name": "Occurrence Set",
"desc": "PiWind Occurrence selection",
"default": "lt",
"options":[
{"id":"lt", "desc": "Long Term"}
]
}
},
"lookup_settings":{
"supported_perils":[
{"id": "WSS", "desc": "Single Peril: Storm Surge"},
{"id": "WTC", "desc": "Single Peril: Tropical Cyclone"},
{"id": "WW1", "desc": "Group Peril: Windstorm with storm surge"},
{"id": "WW2", "desc": "Group Peril: Windstorm w/o storm surge"}
]
},
"data_settings": {
"damage_group_fields": ["PortNumber", "AccNumber", "LocNumber"]
},
"model_default_samples" :10
}
Binary file added PiWindS3/model_data/events_p.bin
Binary file not shown.
7 changes: 7 additions & 0 deletions PiWindS3/model_data/model_storage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"storage_class": "oasis_data_manager.filestore.backends.aws_s3.AwsS3Storage",
"options":{
"bucket_name": "oasislmf-model-library-oasis-piwind/model_data",
"region_name": "eu-west-1"
}
}
9 changes: 9 additions & 0 deletions PiWindS3/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Piwind run on S3.
this folder contains the minimal set of files and option to run on s3

For the key server step, credential cannot be stored in the keys_data_storage options, they need to be set in env variable or in ~/.aws
The following environmental variables will be picked up for authentication:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_REGION=us-west-2

Empty file added PiWindS3/tests/test_1/README.md
Empty file.
3 changes: 3 additions & 0 deletions PiWindS3/tests/test_1/SourceAccOEDPiWind.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PortNumber,AccNumber,AccCurrency,PolNumber,PolPerilsCovered,PolInceptionDate,PolExpiryDate,LayerNumber,LayerParticipation,LayerLimit,LayerAttachment,OEDVersion
1,A11111,GBP,Layer1,WW1,2018-01-01,2018-12-31,1,0.3,5000000,500000,2.0.0
1,A11111,GBP,Layer2,WW1,2018-01-01,2018-12-31,2,0.3,100000000,5500000,2.0.0
Loading