update_geonames: Updates the local copy of the GeoNames database

View source: R/geo-tagging.R

update_geonamesR Documentation

Updates the local copy of the GeoNames database

Description

Downloading and indexing a fresh version of the GeoNames database from the provided URL

Usage

update_geonames(download = TRUE, assemble = TRUE, index = TRUE)

Arguments

download

Logical, whether to download geonames database default: TRUE

assemble

Logical, whether to calculate the geographical hierarchy to index: TRUE

index

Logical, whether to write geographical location in full text index default: TRUE

Details

Run a one shot task to download and index a local copy of the GeoNames database. The GeoNames geographical database covers all countries and contains over eleven million place names that are available; Creative Commons Attribution 4.0 License.

The URL to download the database from is set on the configuration tab of the Shiny app, in case it changes.

The indexing is developed in Spark and Lucene

A prerequisite to this function is that the search_loop must already have stored collected posts in the search folder and that the task download_dependencies has been successfully run.

Normally this function is not called directly by the user but from the detect_loop function.

Value

The list of tasks updated with produced messages

See Also

download_dependencies

detect_loop

get_tasks

Examples

## Not run: 
   library(episomer)
   # setting up the data folder
   message('Please choose the episomer data directory')
   setup_config(file.choose())

   # geolocating last posts
   tasks <- update_geonames()

## End(Not run)

episomer documentation built on Nov. 26, 2026, 5:07 p.m.