Skip to content

Design principles

A scenario chain is only as honest as its weakest hand-off. When ground motion, damage, debris and access are computed by separate programs, a missing value easily becomes a zero somewhere along the way. A street with no data is then read as a safe street, and a neighbourhood with half its buildings unmapped is ranked as low risk. quakecascade is built so that this cannot happen silently.

1. Missing is never zero

A value that cannot be computed is NaN, and a status column beside it says why: no_vs30, no_pga, no_building_type, no_travel_time and so on (see Status codes). The status travels with the value through every later stage, so a building without Vs30 reads no_vs30 in the damage, casualty and shelter tables too. A true zero, such as a unit with no buildings, is marked empty.

This extends to everything built on top of the values:

  • a road that only a building of unknown height or unknown damage could reach is no_height or no_damage, not debris-free;
  • a building whose damage state could not be sampled is not read as standing: the roads its debris could reach are flagged as uncertain;
  • a planning unit whose buildings were not all computed is a lower bound. By default (partial_units="exclude") it stays out of the ranking and the shelter balance rather than being ranked low because of a data gap;
  • a site or unit farther than max_snap_m from the network is reported as off the network, never moved to the nearest road.

2. No silent defaults

Every coefficient comes with its source in the docstring and in the method pages: author, year, table or equation. A number without a citable value is a required argument, never a default. The cascade asks for, among others:

  • the debris spread factor and the blocked share that closes a road;
  • the vehicle clear width and the road speeds;
  • the reach of buildings whose height is unknown, as soon as one exists;
  • the height class of buildings whose storeys are unknown, as soon as one exists;
  • the area per sheltered person and the unreachable penalty of the depot model.

Region-specific choices, such as the code-era years that map a city's buildings to Hazus design levels, are never defaults either. The Hazus tables themselves are used as published, and their US calibration is stated wherever they are. Where the literature gives a range, the documentation gives the range, and the sensitivity guide shows how to sweep it.

3. Counts sum, intensities do not

Aggregation follows the nature of a column. Counts (buildings, people, expected collapses) are summed with min_count=1, so an all-missing group stays NaN. Intensities (PGA, Vs30) are summarised by their median. A sum over a group with missing rows is reported as partial, a lower bound, and the per-unit table counts the missing buildings of every column (n_missing_<column>).

4. Metric coordinates only

Every distance is measured in a projected CRS in metres. Geographic coordinates are refused, and so are Mercator projections, whose distances are inflated by 1/cos(latitude), +28 % at 38°. Inputs in different CRSs are refused instead of being measured against each other.

5. Brackets, not single values

Where the input is uncertain in a known way, the package computes a bracket instead of picking a point:

  • damage at several Hazus design levels when the code era of the stock is unknown;
  • ground motion at several percentiles (p10, p50, p90 by default);
  • city totals with Monte Carlo bands under three correlation modes;
  • closures and isolation over many collapse draws (cascade.realisations), because one draw is one possible outcome, not the outcome.

6. Every run can be traced

Each run returns a manifest with the package version, every parameter, a digest of every input and a fingerprint over them, plus a stage log with the counts of missing and assumed values. See Reproduce and report a run.