Learn R Programming

mregions (version 0.1.8)

mr_geo_code: Geocode with Marineregions

Description

Geocode with Marineregions

Usage

mr_geo_code(place, like = TRUE, fuzzy = FALSE, ...)

Arguments

place

(character) a place name

like

(logical) adds a percent-sign before and after place value (a SQL LIKE function). Default: TRUE

fuzzy

(logical) Uses Levenshtein query to find nearest matches. Default: FALSE

...

Curl options passed on to httr::GET()

Value

If no results, an empty list. If results found, a data.frame with the columns:

  • MRGID (integer)

  • gazetteerSource (character)

  • placeType (character)

  • latitude (numeric)

  • longitude (numeric)

  • minLatitude (numeric)

  • minLongitude (numeric)

  • maxLatitude (numeric)

  • maxLongitude (numeric)

  • precision (numeric)

  • preferredGazetteerName (character)

  • preferredGazetteerNameLang (character)

  • status (character)

  • accepted (integer)

Examples

Run this code
# NOT RUN {
# search for 'oostende', like=TRUE, and not fuzzy
mr_geo_code(place = "oostende", like = TRUE, fuzzy = FALSE)

# search for 'oostende', like=FALSE, and not fuzzy
mr_geo_code(place = "oostende", like = FALSE, fuzzy = FALSE)

# search for 'oostende', like=FALSE, and fuzzy
mr_geo_code(place = "oostende", like = FALSE, fuzzy = TRUE)

# search for 'oostende', like=TRUE, and fuzzy
mr_geo_code(place = "oostende", like = TRUE, fuzzy = TRUE)

# search for 'ast', like=TRUE, and fuzzy
mr_geo_code(place = "ast", like = TRUE, fuzzy = TRUE)
# }

Run the code above in your browser using DataLab