I have function for calculating distance from a location and a dataframe that includes the latitude and longitude of several cities. How can I apply the function to the data