1

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))
tesgoe
  • 1,012
  • 3
  • 10
  • 19

1 Answers1

0

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

library(ggmap)
lonlat <- geocode(unique(cities)) 
tesgoe
  • 1,012
  • 3
  • 10
  • 19