readData: Read in the 'new' Catch! TravellAI geojson data (Aug '14 -...

Description Usage Arguments


Adds individual x and y coordinate columns (for both 'from' and 'to' locations; the latter is calculated as the origin of the next observation, since currently the origins and destinations are identical), day of the week, decimal time of day, duration, unique agent ID column, geodesic and haversine distances between origin and destination locations (since the current distance column only has 0 values due to origin and destination coordinates being the same), and speeds (in km/h) based on the calculated distances and durations. Removes all entries with duration = 0, since they seem to be duplicate entries. Optionally can be used to select only a specific date range.


readData(inputPath, minDate = NA, maxDate = NA, saveOutput = TRUE,
  outputPath = paste(inputPath, "BasicData/", sep = ""))



character; the path to the folder where the json files are located


integer (optional); YYMMDD of minimum observation date to include; default is NA


integer (optional); YYMMDD of maximum observation date to include; default (currently) is 160131, set to NA to exclude


boolean (optional); write out the data frame with the added columns; default is TRUE


character (optional); the path to the folder where the updated json files should be saved if saveOutput is set to TRUE; default will create a subdirectory in the input directory called "BasicData"

eyesofbambi/TravelAIR documentation built on May 16, 2019, 9:56 a.m.