Description Usage Arguments Value
Get the distance matrix between two data frames that have "longitude" and "latitude" columns
1 | get_dist_mat(pop, places, dist_fxn = haversine_dist)
|
pop |
data frame of the population with m rows |
places |
data frame of places to assign with n rows |
dist_fxn |
currently "haversine" with args for x1, y1, x2, y2, returning a scalar value between 0 and 1 |
m x n matrix with scaled distance between 0 and 1. Eg. Entry ij means that the scaled distance between row i from pop and row j from places is entry ij.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.