View source: R/sim_riskbydistance.R
sim_riskbydistance | R Documentation |
Creates a simple set of 100 distances and at each distance simulated demographics, risk levels, population density and size, etc. Useful to see how those decay with distance and how the EJ metrics one might use depend on those factors and domain analyzed.
sim_riskbydistance(
dist = 1:100,
ypopdensity.start = 100,
ypopdensity.end = 50,
ypopdensity.rate = 0.95,
ydemog.start = 66,
ydemog.end = 33,
ydemog.rate = 0.95,
yrisk.start = 100,
yrisk.end = 1,
yrisk.rate = 0.8,
silent = FALSE
)
dist |
Best not to change this. Distances simulated, such as 1 through 100 (that could be kilometers, for example). |
ypopdensity.start |
population density at closest point to emissions source |
ypopdensity.end |
at furthest point |
ypopdensity.rate |
decay rate with distance such as 0.95 for 5 percent drop per 1 of the 100 distance increments |
ydemog.start |
Demographic group of interest nearby, as percent of pop, 0-100 |
ydemog.end |
at furthest point |
ydemog.rate |
decay rate with distance such as 0.95 for 5 percent drop per 1 of the 100 distance increments |
yrisk.start |
Risk metric (e.g., 0 to 100) at nearest point. |
yrisk.end |
at furthest point |
yrisk.rate |
decay rate with distance such as 0.95 for 5 percent drop per 1 of the 100 distance increments |
silent |
whether to print subset of table to console, and suggested plot code |
silently returns data.frame of many indicators, at each of the 100 distances
x <- sim_riskbydistance()
plot_3_by_distance(x)
sim_plotratios(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.