Find index from a 2-D data frame (e.g., map)
1 2 3 4 5 6 7 8 9 | find_index_in_2D_df(
data_2D,
query,
num_index_per_query = 1,
x = "lon",
y = "lat",
x_query = "lon",
y_query = "lat"
)
|
data_2D |
2-D data frame where x/y or lon/lat are available and from which the index is derived. |
query |
Data frame for query. Each row of the query (2-d matrix or 2-column data frame) looks for the closest value in distance (to the row) from the data and return its index corresponding to that value in data_2D. |
num_index_per_query |
the number of indices to be returned - typically just one. |
x |
the x (axis) name in data_2D |
y |
the y (axis) name in data_2D |
x_query |
the x (axis) name in the query data frame |
y_query |
the y (axis) name in the query data frame |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.