Frage

Is it possible to list cities by name rather by longitude and latitude to include them on a map using RgoogleMaps?

Instead of qbbox (see example below), I want to provide a list of cities as an argument.

EX 1. bb = qbbox(c(59.95, 59.7, 59.3, 62),c(10.7,10.3, 11.4,11.4))
War es hilfreich?

Lösung

Solved with ggmap. I used the geocode function to map cities to lon/lat.

library(ggmap)
lonlat <- geocode(unique(cities)) 
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top