Creating geo mapping

Geo mapping is a type of chart which is used by data mining experts when the dataset contains location information. The geo mapping plots are supported by the ggmap library. The location information can be accessed in three different ways:

  • By the name of the place, location name, and address
  • By the latitude and longitude of the place
  • By exact location, lower left longitude, lower left latitude, upper right longitude, and upper left latitude

Once the map location is identified, then by using the ggmap function the location can be identified on a map:

>library(ggmap)

>gc <- geocode("statue of liberty", source = "google")

>googMap <- get_googlemap(center = as.numeric(gc))

>(bb <- attr(googMap, "bb"))

>bb2bbox(bb)

>gc<-get_map(location = c(lon = gc$lon, lat = gc$lat))

>ggmap(gc)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.254.101