apiKey <- "AIzaSyBPxhDW9_bUJ1juxXEGvY_QcNIZNJPUy7A"
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.0.5
library(ggmap)
## Warning: package 'ggmap' was built under R version 4.0.5
## Google's Terms of Service: https://cloud.google.com/maps-platform/terms/.
## Please cite ggmap if you use it! See citation("ggmap") for details.
register_google(apiKey)
#Cali se escribe la longitud y latitud
qmap(c(-76.5, 3.43), zoom=12, maptype="hybrid")
## Source : https://maps.googleapis.com/maps/api/staticmap?center=3.43,-76.5&zoom=12&size=640x640&scale=2&maptype=hybrid&language=en-EN&key=xxx

paradasMio <- read.delim("C:/Users/omjas/Downloads/MIO_STOPS.txt")
city <- get_map(c(-76.5, 3.43), zoom=12)
## Source : https://maps.googleapis.com/maps/api/staticmap?center=3.43,-76.5&zoom=12&size=640x640&scale=2&maptype=terrain&language=en-EN&key=xxx
mapa <- ggmap(city)
mapa <- mapa + geom_point(data=paradasMio, aes(x=DECIMALLONGITUDE, y=DECIMALLATITUDE), color=paradasMio$TYPE_BUS, size=paradasMio$PASSANGERS_NUM * 0.02)
mapa
