closest_focal_point: For the polygon provided, find the closest focal point in the set provided
Description
For one row of an sf data frame, calculate the distance to the closest focal
point. Return the name of the focal point, and the angle between focal point and centroid.
Usage
closest_focal_point(centroid, focal_points)
Value
data frame containing the name and location of the closest focal
# Create a set of polygon centroidscentroids <- create_centroids(tas_sa2, "sa2_5dig_2016")
# Find the closest capital city for the first centroidclosest_focal_point(centroids[1, ], capital_cities)