georeference: R package for georeferencing places using GeoNames and Pelagios


georeference finds latitude and longitude of places using the Pelagios, GeoNames, and Wikipedia (georeferenced articles stored in the GeoNames database), gazetteers more suitable for historical and literary texts. Pelagios is not actually a gazetteer per se, but an infrastructure of Linked Open Geodata in the Humanities, that enables, for instance, searching across different gazetteers; georeference limits the Pelagios datasets to the gazetteers Pleiades, ToposText, DARE, iDAI, and GeoNames.

This package bases on the geocode() function from the ggmap package by David Kahle.


You can install the development version from Github, via the package devtools

install.packages("devtools") # Unless you don't have it already installed.


# The function is set as default with Pelagios, so it is the same as:
georef("Rome", source = "pelagios")

# output
  lon     lat     name url                                    searched_name
1 12.4843 41.8926 Roma Rome

For more options please see the usual R package documentation. I wrote a short post with an explanation on how to use it together with the leaflet package for R.


This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

A copy of the GNU General Public License, version 2, is available at

editio/georeference documentation built on May 17, 2019, 7:04 p.m.