Skip to main content

Damage and Loss Model Library

Project description

Damage and Loss Model Library (DLML)

License

A curated, open-source, version-controlled library of standardized damage and loss models for natural-hazard risk assessment.


About the library

The Damage and Loss Model Library (DLML) is a project from the NHERI SimCenter that addresses a persistent gap in natural-hazards engineering: the lack of a centralized, standardized, and easy-to-use home for damage and loss models. It gathers performance models from established sources — the component library from FEMA P-58 and building- and infrastructure-level models from FEMA Hazus — alongside peer-reviewed models from the research community, and publishes them in one consistent, machine-readable form.

The library is built on three principles:

  • Version-controlled. Every model belongs to a released snapshot, so an analysis can be tied permanently to a specific version of the data — supporting reproducible research and defensible professional practice.
  • Standardized and machine-readable. Models are converted to a single tabular schema (CSV parameters plus JSON metadata), ready for computational workflows with no manual transcription.
  • Documented provenance. Every model carries rich metadata and a citation to its source, so users can trace it to its origin and credit the original developers.

Hazard coverage: seismic, hurricane, and flood — spanning building components, whole buildings, and infrastructure network assets.

Data Organization

The data is a tree of datasets. A dataset is a leaf folder identified by its path (hazard/asset_type/resolution/methodology), for example seismic/building/component/FEMA P-58 2nd Edition. Each dataset provides one or more collectionsfragility, consequence_repair, and/or loss_repair — and each collection is a table of models, one per row (typically one per component/building/asset). Parameters are in <collection>.csv; the matching <collection>.json holds the metadata (descriptions, limit and damage state details, citations).

How to use the DLML

Each of these is a different route to the same curated data.

Install the Python package

pip install simcenter-dlml

The data ships inside the package (no runtime download), and you can read it with the dlml API:

import dlml

dlml.list_datasets()
# ['flood/building/portfolio/Hazus v6.1',
#  'seismic/building/component/FEMA P-58 2nd Edition', ...]

fema_p58 = "seismic/building/component/FEMA P-58 2nd Edition"
dlml.available_collections(fema_p58)      # ['consequence_repair', 'fragility']
fragility = dlml.get_fragility(fema_p58)  # a pandas DataFrame of model parameters
metadata = dlml.get_metadata(fema_p58, "fragility")

# Validate asset features against a dataset's input schema:
seismic = "seismic/building/portfolio/Hazus v6.1"
dlml.validate_asset(seismic, {"StructureType": "W1", "DesignLevel": "Pre-Code"})
# []  -> valid
dlml.validate_asset(seismic, {"StructureType": "W1"})
# ["$: 'DesignLevel' is a required property"]

The core package needs only Python 3.9+, pandas, numpy, and jsonschema.

Explore the models with the DLML Explorer

The DLML Explorer is a web app for discovering, visualizing, and assembling models: search and filter the library, inspect interactive fragility curves and consequence functions, add components to a selection, and download a project-ready bundle. The easiest way to try it is the hosted version:

Open the DLML Explorer »

You can also run it locally — for example, to explore alongside your own private models — by installing the explorer extra:

pip install "simcenter-dlml[explorer]"
dlml explorer

(The explorer extra targets Python 3.10+.) And you can inspect the library straight from the command line:

dlml list                 # every dataset and its collections
dlml info <dataset-id>    # a dataset's collections and model counts

Use with Pelicun and the SimCenter tools

The library is the data backbone for Pelicun, SimCenter's open-source damage-and-loss engine, and is available automatically through the PBE and R2D desktop applications that run Pelicun under the hood.

Work with the raw data

You can also read the CSV/JSON files directly from a clone of this repository:

git clone https://github.com/NHERI-SimCenter/DamageAndLossModelLibrary.git

A legacy documentation website with auto-generated model pages also remains available; it will be revised over time to complement the DLML Explorer.

Contributing

We welcome new and improved models from researchers and practitioners. A formal contributor's guide is in progress; for now, the best way to start is to open a GitHub Issue to discuss the model data you'd like to add. Our goal is a simple pull-request workflow for data that conforms to the schema.

License and acknowledgments

This library is distributed under the BSD 3-Clause license. See LICENSE for details.

We gratefully acknowledge the generous in-kind contribution from Degenkolb Engineers — and in particular Tshajlij Lee and Hannah Thompson — to the development of the DLML Explorer.

This material is based upon work supported by the U.S. National Science Foundation under Grants No. 1612843 and No. 2131111. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the U.S. National Science Foundation.

Contact

For questions or support, please open an issue on the GitHub repository.

Adam Zsarnóczay, NHERI SimCenter, Stanford University — adamzs@stanford.edu

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simcenter_dlml-3.0.tar.gz (12.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simcenter_dlml-3.0-py3-none-any.whl (12.9 MB view details)

Uploaded Python 3

File details

Details for the file simcenter_dlml-3.0.tar.gz.

File metadata

  • Download URL: simcenter_dlml-3.0.tar.gz
  • Upload date:
  • Size: 12.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for simcenter_dlml-3.0.tar.gz
Algorithm Hash digest
SHA256 1ef0dda4f209adf08daea88bb4be9715af06b329f8e91f3f5548e3f30ebbface
MD5 077aa69492a85c01b4115cf9bfab4055
BLAKE2b-256 77baf2fc361a44c9f695433aad1de1c6b7a68bb10638bfbbac4098d0944addd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for simcenter_dlml-3.0.tar.gz:

Publisher: publish.yml on NHERI-SimCenter/DamageAndLossModelLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simcenter_dlml-3.0-py3-none-any.whl.

File metadata

  • Download URL: simcenter_dlml-3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for simcenter_dlml-3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc262f852ce714ce683a1aa338cce79a7cd43d64780524a8c228c1c4878c0f4d
MD5 4294393aeabade6c78762f34654037a6
BLAKE2b-256 7084c4c201b78c5983e8f4d5d7d24bd4d7ccdd36a863b231e0f7695535f7f46e

See more details on using hashes here.

Provenance

The following attestation bundles were made for simcenter_dlml-3.0-py3-none-any.whl:

Publisher: publish.yml on NHERI-SimCenter/DamageAndLossModelLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page