Package: evacpath 0.2.0

Elvin Cordero

evacpath: Least-Cost Pedestrian Evacuation Modeling

Tools for road-constrained, least-cost pedestrian evacuation modeling. The package provides reusable functions for preparing hazard zones, generating road-based evacuation origin points, identifying escape/safety points, creating slope-based conductance surfaces, calculating least-cost distance to safety, and converting distance outputs into evacuation-time polygons. It is designed to support workflows like tsunami evacuation modeling while remaining adaptable to other regions and hazards. Tsunami-specific helpers support separate land-only hazard zones, water-combined escape zones, road-aware escape boundaries, and study-area inset cropping for quality assurance and quality control. Methods build on Cordero et al. (2025) <doi:10.1007/s44367-025-00018-y>, Lewis (2021) <doi:10.1007/s10816-021-09522-w>, and Joseph Lewis's 'leastcostpath' package (2023) <https://CRAN.R-project.org/package=leastcostpath>.

Authors:Elvin Cordero [aut, cre]

evacpath_0.2.0.tar.gz
evacpath_0.2.0.zip(r-4.7)evacpath_0.2.0.zip(r-4.6)evacpath_0.2.0.zip(r-4.5)
evacpath_0.2.0.tgz(r-4.6-any)evacpath_0.2.0.tgz(r-4.5-any)
evacpath_0.2.0.tar.gz(r-4.7-any)evacpath_0.2.0.tar.gz(r-4.6-any)
evacpath_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
evacpath/json (API)

# Install 'evacpath' in R:
install.packages('evacpath', repos = c('https://el-cordero.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/el-cordero/evacpath/issues

Pkgdown/docs site:https://el-cordero.github.io

On CRAN:

Conda:

5.35 score 325 downloads 27 exports 39 dependencies

Last updated from:6330b4529c. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK179
source / vignettesOK249
linux-release-x86_64OK171
macos-release-arm64OK84
macos-oldrel-arm64OK87
windows-develOK113
windows-releaseOK106
windows-oldrelOK114
wasm-releaseOK155

Exports:calc_evac_timecalc_min_distance_to_safetycalculate_lc_pathcalculate_min_distclean_roadscompare_evac_scenarioscrop_roads_to_inner_extentdiagnose_evac_modelfind_escape_pointshas_errorsinterpolate_distance_surfacemake_conductance_surfacemake_evac_gridmake_evac_polygonsmake_region_areamake_road_aware_escape_zonemake_road_maskmake_road_originsmake_roads_in_zonemap_evac_bottlenecksprepare_evac_inputsprepare_hazard_zoneprepare_tsunami_zonesread_spatialrun_evacpathvalidate_evac_routeswrite_evac_outputs

Dependencies:abindclassclassIntclicodetoolscpp11DBIdoParallele1071FNNforeachgluegstatigraphintervalsiteratorsKernSmoothlatticeleastcostpathlifecyclemagrittrMASSMatrixpkgconfigproxyRcpprlangs2sfsftimespspacetimestarsterraunitsvctrswkxtszoo

Bottlenecks and route validation
Retain modeled routes | Map modeled high-use corridors | Compare with reference routes

Last update: 2026-07-18
Started: 2026-07-11

Comparing evacuation scenarios with evacpath
Load example inputs | Run a baseline model | Compare walking speed and path assumptions | Diagnose inputs | Map bottlenecks

Last update: 2026-07-18
Started: 2026-06-01

Evacuation workflow: function-by-function diagnostics
Representative packaged output | Setup | Locate example input files | Read Spatial Inputs | Raw input diagnostics | Clean Roads | Prepare Tsunami Zones | Check the land/water classification | Check the two tsunami zones | Crop roads to an inner extent before escape-point detection | Combine buffered roads with the escape zone | Compare escape-point methods | Prepare Core Inputs | Create the Evacuation Grid | Create the Road Mask | Create Road Origin Points | Create the Conductance Surface | Calculate Least-Cost Distance | Convert Distance to Time | Create Evacuation Polygons | Run the High-Level Wrapper | Final map check | Write Outputs | Troubleshooting checklist | References

Last update: 2026-07-18
Started: 2026-05-18

Example workflow
Example inputs | Candidate safety exits | Modeled evacuation time | Scenario comparison | Outputs users can write

Last update: 2026-07-18
Started: 2026-07-11

Get started with evacpath
Install and load | Load the packaged example data | Run the workflow | What you get back

Last update: 2026-07-18
Started: 2026-07-11

Modeling assumptions
Coordinate reference system | Hazard, terrain, and road inputs | Buffers and origin density | Conductance and least-cost paths | Output clipping

Last update: 2026-07-18
Started: 2026-07-11

Scenario comparison

Last update: 2026-07-18
Started: 2026-07-11

Tsunami evacuation workflow
Three spatial roles | Prepare the zones | Model travel to safety

Last update: 2026-07-18
Started: 2026-07-11

Using evacpath in a new region
Regional checklist | Minimal workflow | Common customizations | Case-specific preprocessing | References

Last update: 2026-07-18
Started: 2026-05-18

Readme and manuals

Help Manual

Help pageTopics
evacpath: Least-cost pedestrian evacuation modeling in Revacpath-package evacpath
Convert distance to evacuation timecalc_evac_time
Calculate minimum least-cost distance from origins to safetycalc_min_distance_to_safety
Calculate a least-cost path between one origin and one destinationcalculate_lc_path
Calculate the minimum path distance from a list of least-cost pathscalculate_min_dist
Clean a road/pathway networkclean_roads
Compare evacuation scenarioscompare_evac_scenarios
Crop roads to an inset extent before escape-point detectioncrop_roads_to_inner_extent
Diagnose evacuation-model inputsdiagnose_evac_model
Identify escape/safety points where roads cross the hazard-zone boundaryfind_escape_points
Test whether diagnostics contain errorshas_errors
Interpolate a distance surface from least-cost distance pointsinterpolate_distance_surface
Create a slope-based conductance surfacemake_conductance_surface
Create an evacuation gridmake_evac_grid
Create evacuation-distance and evacuation-time polygonsmake_evac_polygons
Make an output clip area for evacuation polygonsmake_output_clip_area
Create a broader analysis region around a study areamake_region_area
Add buffered road corridors to an escape-boundary zonemake_road_aware_escape_zone
Create a road-constrained analysis maskmake_road_mask
Create road-based origin points inside the evacuation zonemake_road_origins
Create a buffered road area inside an inundation or analysis zonemake_roads_in_zone
Map modeled evacuation bottlenecksmap_evac_bottlenecks
Read and project the core evacuation inputsprepare_evac_inputs
Prepare a hazard zone from an inundation rasterprepare_hazard_zone
Prepare separate tsunami zones for escape analysis and visualizationprepare_tsunami_zones
Read a spatial inputread_spatial
Run the full evacuation-path modeling workflowrun_evacpath
Validate modeled evacuation routesvalidate_evac_routes
Write evacpath outputs to diskwrite_evac_outputs