geocodeAddresses: Geocode addresses in Colombia

View source: R/geocodeAddresses.R

geocodeAddressesR Documentation

Geocode addresses in Colombia

Description

This function allows you to geocode addresses in Colombia, specifying address, city and a CRS.

Usage

geocodeAddresses(
  df,
  address,
  city,
  countryCode = "CO",
  crs = 3116,
  names_crs,
  names_sep
)

Arguments

df

The dataframe containing the information.

address

The name of the column with the addresses for geocoding.

city

The name of the column with the city of the address.

countryCode

Limits the candidates returned to the specified country or countries. Acceptable values include the 3-character country code. You can specify multiple country codes to limit results to more than one country.

crs

The spatial reference of the x/y coordinates returned by a geocode request. The spatial reference can be specified as either a well-known ID (WKID) or as a JSON spatial reference object. If crs is not specified, the spatial reference of the output locations is 3116

names_crs

Logical. If the crs must be added at the end of the results columns "lon" and "lat"

names_sep

A string to separate the name of the columns "lon" and "lat" and the crs (WKID)

Value

The coordinates (lon, lat) of the address given and the match score.

Examples

df %>% geocodeAddresses(address = direccion_hogar, city = ciudad)

samesag/emu documentation built on Aug. 22, 2023, 3:19 p.m.