| getData | R Documentation |
This function downloads toponym data for the package.
getData(countries, overwrite = FALSE, toponym_path = NULL)
countries |
character string vector with country designations (names or ISO-codes). |
overwrite |
logical. If |
toponym_path |
character string. Path name for downloaded data. If not specified, this function will call |
The data is downloaded from the GeoNames download page and thereby made accessible to readFiles(). The function allows users to update GeoNames data and to set the date of access to that database to the current date.
Parameter countries accepts all designations found in country(query = "country table"). If "all", data from all countries stored in the package folder is selected.
Parameter toponym_path accepts "pkgdir" for the package directory or a full, alternative path.
With toponymOptions(), users can specify the path for toponym data downloaded by getData() across sessions. See help(toponymOptions).
No return value.
## We recommend setting a persistent path for downloaded data by using toponymOptions()
## Users can always set the path manually when a function is used
## For illustration purposes,
## 1. the path is manually set each time
## 2. and wrapped in donttest because data will be downloaded in the following examples:
getData(countries = "NL", toponym_path = tempdir())
## downloads and extracts data for NL to the temporary directory
getData(countries = c("DK", "DE"), toponym_path = tempdir())
## downloads and extracts data for DK and DE to the temporary directory
getData(countries = c("DK", "DE"), overwrite = TRUE, toponym_path = tempdir())
## downloads, extracts, and overwrites data for DK and DE in the temporary directory
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.