<commit_before>The risklite library
=========================================


The `risklite` library provides support for running risk computations
by using the calculators in risklib. It has utilities to read ground
motion fields, exposures, vulnerability and fragility models from csv
files; it has also utilities to write loss maps and damage
distributions in csv format.  Moreover it provides several pre-built
calculators. The list of available calculators can be obtained
as follows:

>>> from openquake.risklite.calculators import registy
>>> sorted(registry)
['scenario', 'scenario_damage', ...]

Running a risk computation for a predefined calculator
involves two simple steps:

- put in a directory all the needed input files, plus an .ini
  file specifying the files and the calculator to use
- launch the script

    $ run_risk <input_directory> <config.ini>

For instance for a scenario computation the needed files are:

- the ground motion fields, gmf.csv, in the format
  ``lon lat gmv1 ... gmvN`` where ``N`` is the number of realizations
  of the ground motion field; the file must be tab separated
- the exposure file, exposure.csv, in the format
  ``lon lat asset_ref number_of_units taxonomy```
- the vulnerability functions, vulnerability.csv, in the format
  ``taxonomy IMT [iml...] [loss_ratio...] [cov...] distribution``

A valid configuration file could be the following::<commit_msg>Fixed a mispelling in the docs<commit_after>The risklite library
=========================================


The `risklite` library provides support for running risk computations
by using the calculators in risklib. It has utilities to read ground
motion fields, exposures, vulnerability and fragility models from csv
files; it has also utilities to write loss maps and damage
distributions in csv format.  Moreover it provides several pre-built
calculators. The list of available calculators can be obtained
as follows:

>>> from openquake.risklite.calculators import registry
>>> sorted(registry)
['scenario', 'scenario_damage', ...]

Running a risk computation for a predefined calculator
involves two simple steps:

- put in a directory all the needed input files, plus an .ini
  file specifying the files and the calculator to use
- launch the script

    $ run_risk <input_directory> <config.ini>

For instance for a scenario computation the needed files are:

- the ground motion fields, gmf.csv, in the format
  ``lon lat gmv1 ... gmvN`` where ``N`` is the number of realizations
  of the ground motion field; the file must be tab separated
- the exposure file, exposure.csv, in the format
  ``lon lat asset_ref number_of_units taxonomy```
- the vulnerability functions, vulnerability.csv, in the format
  ``taxonomy IMT [iml...] [loss_ratio...] [cov...] distribution``

A valid configuration file could be the following::
{'fraction_non_alphanumeric': 0.0964109781843772, 'fraction_numerical': 0.0007037297677691766, 'mean_word_length': 4.663346613545817, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4392139', 'n_tokens_mistral': 760, 'n_tokens_neox': 700, 'n_words': 370}