get_admin_data.Rd
This function takes a set of longitude and latitude coordinates and retrieves the administrative units that each point lies within.
get_admin_data(lon, lat, path_admin_data)
A numeric vector giving the longitude of the sampling sites in Decimal Degrees.
A numeric vector giving the latitude of the sampling sites in Decimal Degrees.
The file path to the admin data. Note that the function expects .shp
format output from the download_admin_data
function or from another user supplied source.
data.frame
if (FALSE) {
download_admin_data(iso3 = "BGD", path_output = getwd())
get_admin_data(lon = template_es_data$lon,
lat = template_es_data$lat,
path_admin_data = file.path(getwd(), 'BGD_admin_levels.shp'))
}