Read in and process geonames data dump files into a data.frame.

places_download(country = NULL, code = NULL)

Arguments

country

A country name (use places_lookup). For all countries use "allcountries" (note > 300 MB file).

code

A two letter iso country code (use places_lookup)

Value

a data.frame

Details

Column names are converted to lower, spaces replaced with underscores and brackets removed. download_date added to table with the users system date. places_import cannot handle three letter country codes will throw an error.

Examples

# NOT RUN {
AI <- places_download(code = "AI") %>% places_import()
kenya <- places_download(country = "kenya") %>% places_import()
all <- places_download(country = "allcountries") %>% places_import()
# }