Description Usage Arguments Value Examples
View source: R/process_records.R
Uses functions from the dplyr
package to clean up raw records obtained
from the Bath: Hacked datastore. The process is as follows:
Select columns containing useful information only
Remove any records with NA entries
Remove records for "test car park"
Convert Name and Status to factors
Remove records with negative occupancies
Calculate Proportion column (Occupancy/Capacity)
Remove records with Proportion greater than max_prop
Remove duplicate records (see first_upload
)
1 |
x |
A data frame containing records to be cleaned up (e.g. the data
frame obtained by calling |
max_prop |
The point at which records are discarded due to overly-full Occupancy values (default is 1.1, or 110% full, to allow for circulating cars). |
first_upload |
If |
A data frame of clean records, with 7 columns:
The name of the car park where the record was taken.
The time the record was taken (POSIXct date-time object).
The time the record was uploaded to the Bath: Hacked database (POSIXct date-time object).
The total number of cars in the car park.
The number of parking spaces in the car park.
Description of the change in occupancy since the previous record from that car park.
Calculated as (Occupancy/Capacity).
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.