Skip to contents

This function takes a set of longitude and latitude coordinates and retrieves the administrative units that each point lies within. The administrative units are given in the ISO-3166 Alpha-3 country code standard (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3).

Usage

coords_to_iso3(lon, lat)

Arguments

lon

A numeric vector giving the longitude of the sampling sites in Decimal Degrees.

lat

A numeric vector giving the latitude of the sampling sites in Decimal Degrees.

Value

data.frame

Examples


coords_to_iso3(lon = c(90.37, 90.38, 90.37),
               lat = c(23.80, 23.80, 23.81))
#>     lon   lat admin_0_iso admin_0_name
#> 1 90.37 23.80         BGD   Bangladesh
#> 2 90.38 23.80         BGD   Bangladesh
#> 3 90.37 23.81         BGD   Bangladesh