Skip to content

Release v3.2: California RC bridge fragilities, Hazus metadata clean-up, Explorer filters - #48

Merged
zsarnoczay merged 18 commits into
NHERI-SimCenter:mainfrom
zsarnoczay:main
Oct 3, 2026
Merged

zsarnoczay merged 18 commits into
NHERI-SimCenter:mainfrom
zsarnoczay:main

Conversation

@zsarnoczay

Copy link
Copy Markdown
Collaborator

This pull request brings main to version 3.2.

  • Three new datasets of seismic fragility models for California
    reinforced concrete bridges from the Chen et al. (2025) database:
    116 bridge system models, 801 bridge component models, and 25
    EDP-based component models. Twelve new demand types support the
    EDP-based models.
  • The Hazus water pipeline models gain metadata, so the four models
    appear in the Explorer and the documentation.
  • The Hazus datasets are titled by methodology and version, the v6.1
    and hurricane descriptions name the right manual versions, and the
    bridge descriptions are organized in paragraphs.
  • The Explorer's Browse and Search page filters by Hazard, Asset type,
    and Source, with the tree grouped under asset-type headings.
  • The documentation renders multi-paragraph descriptions, Markdown
    links, and damage-state weights.
  • The explorer extra requires Streamlit 1.58 or later on Python 3.10
    and later.

The subtypes carry unit-count detail worth keeping in inventories, and
the damage and loss models do not distinguish them. The auto-population
script collapses them to RES3 where the occupancy enters the DL
configuration, so the asset record keeps its subtype.
The ground failure models need a depth class (Shallow or Deep), while
data sources like NSI describe the foundation system (slab, crawlspace,
pile). The old name conflated the two. The Hazus manuals never name
this input, so no FEMA vocabulary is affected, and the flood dataset's
FoundationType is a genuine system type and stays as is.

BREAKING CHANGE: the seismic Hazus v6.1 schema property FoundationType
is now FoundationDepth. The auto-population script still accepts a
Shallow or Deep value under the legacy key for backwards compatibility.
An absent GroundFailure or LifelineFacility flag now defaults to False;
the script used to write None, which its own validation rejects.
LifelineFacility selects the damage model family, so it is now a declared
input. OccupancyClass is read unconditionally, so requiring it moves a
missing value from a KeyError after validation to a proper validation
failure.

BREAKING CHANGE: the seismic Hazus v6.1 schema now requires
OccupancyClass.
The PGA-based lifeline facility fragilities stop at High-Code, while
the general building stock models extend to Very High-Code and
Severe-Code. A lifeline evaluation of a building designed to one of the
stronger levels previously requested a model that does not exist. Those
levels now map to the High-Code lifeline models. The same inventory can
now be assessed with either the lifeline or the general building stock
models.
The new schema is the v6.1 schema without the two levels Hazus 6.1
introduced; a test asserts exactly that relation, so the copies cannot
drift apart. The new config references this dataset for its damage and
loss data instead of the alias that resolves to v6.1.
The generator builds two fragility datasets from the Chen et al. (2025)
bridge database (DesignSafe PRJ-5910, v1): it applies the label and
value corrections, mints one dotted ID per curve, writes the packaged
CSV and JSON, and records every ID's source row in a crosswalk. The
editorial text lives in metadata_text.json beside it.
Sa(1.0 s) fragilities for 26 groups of California RC bridges from
Chen et al. (2025): 116 bridge-system models under portfolio/ and 801
component models under component/. Six duplicate system rows and 95
all-N/A rows are omitted; each model's Comments name its source study,
ground-motion suite, and any correction applied to the published
values. Tripwire counts in tests move to 13 datasets and 20 fragility
pairs.
Datasets that are not FEMA, Hazus or SimCenter got an empty badge in
the browse tree and search facets. They now share one category,
RESEARCH, resolved by the same function in both places.
Note: pelicun copies EDP_TYPES at import, so these twelve names
become valid pelicun demand types without a pelicun change.
The generator turns the 24 rows of EDP_Fragility Database.csv
(DesignSafe PRJ-5910 v1) into 25 lognormal fragility models, each a
function of the response of its component. The source file moves here
from the Sa(1.0 s) authoring folder so the repository keeps one copy;
the Sa(1.0 s) generator reads it from the new place for its capacity
check.

It reads models.csv, the published rows with one row per model and a
Model ID of the form CRCB.<component>[.<qualifier>].<scope>.<source>,
whose segments select each model's demand type, reference and text.
Demand-Directional is 1 because each EDP is defined in a direction;
Column drift is stored as a ratio. Row 6 covers four bridge groups from
two studies and becomes two models; it defines only extensive and
complete unseating, so its slight and moderate medians are set equal to
extensive.
The column was 0 in every row of the three California RC bridge
fragility tables. pelicun skips its Incomplete handling when the
column is absent, and the data format tests do not require it. The
fragility and consequence figures of the documentation plotter and the
consequence figure of the Explorer read the column unconditionally;
they now treat a missing column as complete. The bridge datasets reach
only the plotter's fragility figure, since they have no consequence
data.
The generated dataset pages interpolate the description into a dedented
template. A description with a line break added unindented lines, so
dedent found no common margin and the page title turned into a block
quote. Markdown links in the FEMA P-58 descriptions printed literally,
since the build is RST only. The generator now indents continuation
lines to the template margin and converts the links to RST.

The plotter read the key DemageStateWeights, so no page ever showed
damage-state weights. The key is spelled correctly now, and the table
array is built as dtype object so that a missing weight stays NaN.
Three seismic building datasets shared the title "Hazus Earthquake
Methodology - Buildings", and the v6.1 description said version 5.1.
Titles now name the methodology and version, without the asset type,
so datasets of the same source share a title across asset types. The
story-level set is a "story-level prototype" with a description of how
it was derived from the building-level models. The hurricane dataset
says version 5.1. The bridge descriptions are organized in
paragraphs.

The Hazus building generators had pre-v3.0 input paths, and the v6.1
generator read the v5.1 inputs. They resolve their paths from the
script location now, and the story-level generator applies its own
general_information.json over the portfolio metadata it copies.
The four pipeline models shipped as a bare fragility.csv, so the
Explorer and the documentation skipped the dataset. The new
fragility.json describes the Hazus repair-rate models the curves
come from.
The Browse and Search page filters by Hazard, Asset type, and Source,
each list narrowed by the selections before it, and the tree groups
sources under asset-type headings. The filters select whole datasets
and no longer prune by component ID: datasets that share IDs (the Hazus
building portfolios and the story-level set, the two hurricane
portfolios) could not be told apart, and an ID filter rendered every
model of every matching source on each rerun. Choosing a Source opens
that source without expanding its models. The Component group filter
and the source badges are removed; an empty EXCLUDED_DATASETS set gives
the tree and the index one place to leave out a duplicate dataset.
Bump the version to 3.2, refresh uv.lock, date the 3.2 changelog entry,
and add the release notes.

Raise the Streamlit floor of the explorer extra to 1.58 on Python 3.10
and later. Streamlit 1.58 needs Python 3.10, so a bare floor does not
lock against requires-python >=3.9; the second entry keeps 1.48 on 3.9,
where the extra is already uninstallable.
@zsarnoczay
zsarnoczay merged commit 869423b into NHERI-SimCenter:main Oct 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant