Open the results in QGIS¶
cascade.export_geopackage joins the result tables to their geometries and writes one
GeoPackage layer per table. It also writes the run manifest next to the file, so every map can be
traced to the run that produced it. It needs geopandas (pip install "quakecascade[geo]").
from quakecascade import cascade
result = cascade.run(inputs, params)
written = cascade.export_geopackage(result, inputs, "scenario.gpkg")
print(written["layers"]) # ['buildings', 'roads', 'units', 'sites', 'hospitals', ...]
print(written["manifest"]) # scenario.manifest.json
To keep the layers in Python instead (for plotting, or to write another format), use
cascade.result_layers(result, inputs), which returns a dict of GeoDataFrames.
Layers¶
| Layer | Geometry | Main columns |
|---|---|---|
buildings |
footprints | pga_g_p50, p_complete, total_s4, public_shelter, sampled_state, root_status, height_assumed, unit_id |
roads |
centrelines | closed, p_any_collapse, expected_per_100m, blocked_share, blockage_status, passable, navigable_status, road_class, width_m |
units |
planning units | expected_complete, casualties_s3_s4, public_shelter, n_missing_*, unit_status, access_pre, access_post, hospital_isolation, score, rank, criteria_status |
sites |
candidate depot sites | capacity, nearest_demand, overload_ratio, served, site_status, selected_depot |
hospitals, fire_stations |
points | the input columns |
Every layer is in the run CRS. Every value column comes with the status column that explains its
gaps. Style by value, but filter or hatch by status: a building with root_status = no_vs30 has
no damage value at all, and the map should not show it as undamaged.
Suggested styles¶
- Roads: closed roads in a strong colour,
navigable_status = partialorblockage_status = no_damagedashed (uncertain), the rest grey. For many draws, exportcascade.realisations(...).roadsand style byclosed_frequency. - Units: graduated by
score. Units withcriteria_status = no_complete_sumhatched: they were left out of the ranking because some of their buildings could not be computed. - Buildings: graduated by
p_complete.root_statusother thancomputedgets an outline only.