View source: R/tides_validation.R
| validate_tides | R Documentation |
The transit integrated data exchange standard (TIDES) specifies columns that
should be present in AVL data tables and the data types of these columns.
This function verifies if those columns are present in the input avl_df
are of the correct data type. See Details for more information.
validate_tides(avl_df)
avl_df |
A dataframe of AVL data, either in GPS (longitude/latitude) form or linearized distance form. |
The AVL cleaning functions in this package generally require the input
dataframes to adhere to the TIDES vehicle_locations
table schema. The
following columns and data types are checked by this validator:
location_ping_id: Should be a character string.
trip_id_performed: Should be a character string.
event_timestamp: Should be a POSIXct date-time.
vehicle_id: Should be a character string.
operator_id: Should be a character string. This field is not standard
in TIDES vehicle_locations, and is not a strict requirement for any AVL
processing functions.
longitude and latitude: Should be numeric. These fields are required
only to linearize AVL data, and not used afterwards.
distance: Should be numeric. This field is not standard in TIDES
vehicle_locations, and is generated by get_linear_distances(). It is
required by most other AVL processing functions.
speed: Should be numeric. This field is not a strict requirement for
any AVL processing functions.
Each AVL processing function in transittraj uses specific fields. Each
function verifies that the required fields and data types are present before
proceeding.
A dataframe of each required field, required data type, whether the field is present, and whether the data type matches expectations.
lacmta_val <- validate_tides(avl_df = lacmta_avl)
print(lacmta_val)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.