OasisLMF / ktools

In-memory simulation kernel for loss modelling.
BSD 3-Clause "New" or "Revised" License
28 stars 19 forks source link

Introduce csv <---> binary Conversion Tools for Aggregate Vulnerabilities and Weights #362

Closed hchagani-oasislmf closed 10 months ago

hchagani-oasislmf commented 10 months ago

Introduce csv <---> binary Conversion Tools for Aggregate Vulnerabilities and Weights

The following components have been introduced to convert aggregate vulnerability tables between binary and csv formats:

These can be executed from the command line as follows:

$ aggregatevulnerabilitytobin < aggregate_vulnerability.csv > aggregate_vulnerability.bin
$ aggregatevulnerabilitytocsv < aggregate_vulnerability.bin > aggregate_vulnerability.csv

Additionally, the following components have been introduced to convert vulnerability weight tables between binary and csv formats:

These can be executed from the command line as follows:

$ weightstobin < weights.csv > weights.bin
$ weightstocsv < weights.bin > weights.csv