Skip to content

Instantly share code, notes, and snippets.

Evan epsalt

Block or report user

Report or block epsalt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View usa_map_ggplot.r
states <- map_data("state")
cities <- read.csv("data/cities.csv")
trip_map <- ggplot()+
geom_map(data=states, map=states, aes(x=long, y=lat, map_id=region),
fill="#ffffff", color="grey70", size=0.4)+
geom_path(data=trip, aes(x=long, y=lat), linetype=1)+
geom_text(data=cities, aes(x=long, y=lat, group=NULL,
label = rep('x', nrow(cities))),
color="red")+
View keybase.md

Keybase proof

I hereby claim:

  • I am epsalt on github.
  • I am epsalt (https://keybase.io/epsalt) on keybase.
  • I have a public key whose fingerprint is 2B6E 77F9 FA16 6760 2FE7 9385 2D77 E111 AD47 68FC

To claim this, I am signing this object:

@epsalt
epsalt / gmaps_json_to_df.r
Last active Jan 31, 2017
Load a location history JSON and convert to cleaned up data.frame
View gmaps_json_to_df.r
library(RJSONIO)
library(magrittr)
loc_file <- "data/loc_history.json"
## Parse JSON
loc <- RJSONIO::fromJSON(loc_file)
## Drop everything except timestamp, lat, long
dropped <- lapply(loc[[1]], function(a) a[1:3])
@epsalt
epsalt / loc_history.json
Created Jan 29, 2017
Sample JSON from Google Location History
View loc_history.json
{
"locations": [{
"timestampMs": "1472048632150",
"latitudeE7": 510354955,
"longitudeE7": -1140796058,
"accuracy": 22,
"activitys": [{
"timestampMs": "1472048632075",
"activities": [{
"type": "still",
You can’t perform that action at this time.