Skip to contents

Calculate geographic distance between two nonprofits. Primarily as an internal function in calc_distance, but can be used on its own. See Appraisal Process Vignette for detailed information on how this value is calculated.

Usage

get_geo_dist(org1, org2, geo.weights)

Arguments

org1

output of get_org_values() for first org

org2

output of get_org_values() for second org

geo.weights

geo.weights from output of get_weights()

Value

Numeric value of the geographic distance of two nonprofits.

Examples

org1 <- get_org_values(
  state = "IL", 
  location.type = "metro",
  total.expense = 500000,
  ntee = "A20")
  
org2 <- get_org_values(
  state = "OH", 
  location.type = "suburban",
  total.expense = 300000,
  ntee = "A20")
  
geo.weights <- get_geo_weights()
  
get_geo_dist(org1, org2, geo.weights)
#> [1] 0.60206