Google is watching you and how

Here is some R code we have written.

library(jsonlite)
a=fromJSON(“/home/rstudio/R/Takeout/Location History/LocationHistory.json”)
b=as.data.frame(a)

mygoog=NULL
mygoog$latitude=b$locations.latitudeE7/10000000
mygoog$longitude=b$locations.longitudeE7/10000000
mygoog$time=as.POSIXct(as.numeric(b$locations.timestampMs)/1000 , origin=”1970-01-01″)

mygoog=as.data.frame(mygoog)

library(ggmap)
Map zoom = 12,
size = c(640, 640),
scale = 2, maptype = c(“terrain”),
color = “color”)

plot1 geom_path(data = mygoog, aes(x = longitude, y = latitude
),
alpha = I(0.5),
size = 0.8)
suppressWarnings(print(plot1))

mygoog2=mygoog[time>”2015-09-21 12:09:31″,,]
plot1 <- ggmap(Map) +

geom_path(data = mygoog2, aes(x = longitude, y = latitude
),
alpha = I(0.5),
size = 0.8)
suppressWarnings(print(plot1))

Author: Ajay Ohri

http://about.me/ajayohri

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s