Uses spatial comparison to determine which polygons the locations fall into and returns the variable associated with those polygons.
If allData = TRUE
, the entire dataframe is returned.
getVariable(
longitude = NULL,
latitude = NULL,
dataset = NULL,
variable = NULL,
countryCodes = NULL,
allData = FALSE,
useBuffering = FALSE
)
Vector or dataframe.
Vector of longitudes in decimal degrees East.
Vector of latitudes in decimal degrees North.
Name of spatial dataset to use.
Name of dataframe column to be returned.
Vector of ISO 3166-1 alpha-2 country codes.
Logical specifying whether a full dataframe should be returned.
Logical flag specifying the use of location buffering to find the nearest polygon if no target polygon is found.
getSpatialData