Description Usage Arguments Value
This function identifies the closest grid points in a climate model to a city based on the city's latitude and longitude using the Euclidean distance.
1 | closest_point(city, latlong)
|
city |
A numeric vector containing the city's ID, latitude, and longitude, in that order. |
latlong |
A dataframe of latitude and longitude of each
climate grid cell, with latitudes in the first column and
longitudes in the second column. The |
An index corresponding to the column in the climate projections dataframe for that climate model that is closest to the city's coordinates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.