Skip to content

Instantly share code, notes, and snippets.

@mkfreeman
Created March 18, 2015 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkfreeman/fedb518953b94efae3b0 to your computer and use it in GitHub Desktop.
Save mkfreeman/fedb518953b94efae3b0 to your computer and use it in GitHub Desktop.
Test route station data
# Station test
library(plyr)
library(data.table)
routes <- read.csv('/Users/michaelfreeman/Downloads/Divvy_RouteShapes_ALL-FINAL.csv')
route_stations <- count(routes, c('stationFromId', 'stationFromLat', 'stationFromLong'))
setnames(route_stations, 'stationFromId', 'id')
setwd('/Applications/MAMP/htdocs/divvy-munging/data_from_divvy/2014/Divvy_Stations_Trips_2014_Q3Q4')
station_locations <- read.csv('Divvy_Stations_2014-Q3Q4.csv')
mergeData <- merge(station_locations, route_stations, by=c('id'))
plot(mergeData$latitude, mergeData$stationFromLat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment