simulateFatalities: Project simulated fatalities onto road network

View source: R/simulateFatalities.R

simulateFatalitiesR Documentation

Project simulated fatalities onto road network

Description

Places regularly spaced "simulated" or "expected" cases across the face of the map and then finds the "addresses" of those cases via orthogonal projection or simple proximity to road graph network. These data are used to generate "expected" pump neighborhoods.

Usage

simulateFatalities(recompute.regular.cases = FALSE, simulated.obs = 20000L,
  multi.core = TRUE)

Arguments

recompute.regular.cases

Logical. TRUE re-computes regular data. FALSE uses pre-computed data. For replication of data used in the package.

simulated.obs

Numeric. Number of regular cases. For use with recompute.regular.cases = TRUE.

multi.core

Logical or Numeric. TRUE uses parallel::detectCores(). FALSE uses one, single core. With Numeric, you specify the number logical cores (rounds with as.integer()). See vignette("Parallelization") for details.

Value

An R data frame: sim.ortho.proj.

Note

This function is computationally intensive. With "simulated.obs" set to 20,000 (generating 19,993 cases). This function documents the code that generates sim.ortho.proj and regular.cases. In real world terms, the distance between simulated cases is approximately 6 meters.


lindbrook/cholera documentation built on Jan. 13, 2025, 3:49 p.m.