Skip to content

Instantly share code, notes, and snippets.

@githoov
Created April 14, 2016 15:55
Show Gist options
  • Save githoov/6994ba01ed02f8297cfa3e20bd0aeab7 to your computer and use it in GitHub Desktop.
Save githoov/6994ba01ed02f8297cfa3e20bd0aeab7 to your computer and use it in GitHub Desktop.
# query: https://metanew.looker.com/x/HBhS99t
# median pickup time
df <- read.csv(file = "~/Downloads/pickups.csv", header = TRUE)
names(df) <- c("id", "month", "pickup_time")
ddply(df, .(month), summarize, median_duration = median(pickup_time, na.rm = TRUE))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment