View source: R/interpolate_trips.R
interpolate_trips | R Documentation |
interpolate_trips, interpolate your tracking data to a specific interval
interpolate_trips(
GPS_data = GPS_data,
interval = interval,
column_date = column_date,
column_time = column_time,
datetime_format = datetime_format,
column_lat = column_lat,
column_lon = column_lon,
column_trip = column_trip
)
GPS_data |
Is the data you want to interpolate |
interval |
Is the interval you want to use, in seconds, for example 900 s is 15 minutes |
column_date |
Is the name of the column where you have the Date, if you dont have date separately, you can always create a new column only with the date |
column_time |
Is the name of the column where you have the Time, if you dont have time separately in a column, you can always create a new column only with the time |
datetime_format |
Is the format you use for your date and time, for example "%d/%m/%Y %H:%M:%S", "%d-%m-%Y %H:%M:%S" or "%Y-%m-%d %H:%M:%S" |
column_lat |
Is the name of the column where you have the Latitude |
column_lon |
Is the name of the column where you have the Longitude |
column_trip |
Is the name of the column where you have the Trip number, if you dont have number of trip please check the function count_trips |
Gives back a data frame with the interpolated data, only four columns will be returned: dt, Longitude, Latitude, and trip_number
GPS_interpolated<-interpolate_trips(GPS_data=GPS01_trips,interval='900 sec',
column_date='DateGMT',column_time='TimeGMT',column_trip='trip_number',
column_lat='Latitude',column_lon='Longitude',datetime_format="%d/%m/%Y %H:%M:%S")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.