History: Extracted raster data from the static Google map png, loaded it on the R device through ggimage
.
library (png)
library (ggmap)
rasterArray <- readPNG ("My.png")
x = c (40.702147,40.718217,40.711614)
y = c (-74.012318,-74.015794,-73.998284)
myData <- data.frame (x, y)
print (ggimage (rasterArray, fullpage = TRUE, coord_equal = FALSE)
+ geom_point (aes (x = x, y = y), data = myData, colour = I("green"),
size = I(5), fill = NA))
I did run dput
on the rasterArray
but the output is of 20 MBs, can't post here.
BTW, this is the URL of that static map:
Question: For plotting "GPS coordinates" on the R device containing the map in pixels, do I need to scale
the data.frame
?
I saw this page: http://www-personal.umich.edu/~varel/rdatasets/Langren1644.html Do I need to do scaling the way they have shown here?
If yes, then what else other than the man page of scale
function do I need to understand to get this done?
Am I barking at the wrong tree?