geocode_google_Colombia: A function to geocode colombian addresses using google...

View source: R/geocode_google_Colombia.R

geocode_google_ColombiaR Documentation

A function to geocode colombian addresses using google geocoding API and googleway package

Description

This function allows you to geocode addresses in Colombia and get the results as a readable dataframe.

Usage

geocode_google_Colombia(
  df,
  direccion,
  key,
  suffix,
  barrio,
  codigo_postal,
  localidad,
  join,
  join_id
)

Arguments

df

The df containing the addresses

direccion

The name of the column (quoted) where the address is located (it must be formed as "address", "city", "country")

key

The google API key used for geocoding

suffix

The suffix for the resultant columns generated by the geocoding

barrio

Logical. If true, returns the information of the neighborhood

codigo_postal

Logical. If true, returns the information of the postal code

join

Logical. If true, the resultant dataframe is united with the original dataframe

join_id

A string indicating the name of the column to join the results into the new dataframe

Value

A dataframe containing the coordinates in crs 4326 with the addresses geocoded

Examples

direcciones <- geocode_google_Colombia(df, "direccion_google", key = "ABC", suffix = "_com", barrio = T, codigo_postal = T)

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