Find sum of inverse distances between each starting point in x and possible end points, y.

dist_sum_inv(x_df, y_df, x_id = "id", y_id = "id", x_lon_col = "lon",
  x_lat_col = "lat", y_lon_col = "lon", y_lat_col = "lat",
  dist_function = "Haversine", dist_transform = "level", decay = 2,
  scale_units = 1)

Arguments

x_df

DataFrame with starting coordinates

y_df

DataFrame with ending coordinates

x_id

String name of unique identifer column in x_df

y_id

String name of unique identifer column in y_df

x_lon_col

String name of column in x_df with longitude values

x_lat_col

String name of column in x_df with latitude values

y_lon_col

String name of column in y_df with longitude values

y_lat_col

String name of column in y_df with latitude values

dist_function

String name of distance function: "Haversine" (default) or "Vincenty"

dist_transform

String value of distance transform: "level" (default) or "log"

decay

Numeric value of distance weight decay: 2 (default)

scale_units

Double value to divide return value by (e.g., 1000 == km)

Value

DataFrame with sum of distances