localgeo is a package that coverts a US City+State to lon/lat. This is a ridiculously small package and is really just a function interface over the cities.rda file in the data directory. So, just grab that if you want to wrap your own work around it.

It was made in response to http://stackoverflow.com/a/27868207/1457051 since there's no reason to waste bandwidth or cycles on an internet API when you can have the data locally.

The following functions are implemented:

News

Installation

devtools::install_github("hrbrmstr/localgeo")
options(width=120)

Usage

library(localgeo)

# current verison
packageVersion("localgeo")

print(geocode("Eliot", "ME"))

print(geocode(city=c("Houston", "Pittsburgh"),
              state=c("TX", "PA")))

Test Results

library(localgeo)
library(testthat)

date()

test_dir("tests/")


hrbrmstr/localgeo documentation built on May 17, 2019, 5:10 p.m.