| trackclean-package | R Documentation |
A toolkit for cleaning high-frequency positional data from real-time location tracking systems (UWB, RFID, and similar technologies). Originally developed for playground movement research, but applicable to any study collecting high-frequency positional data from people moving within a defined space. Provides functions for ID mapping, time period marking, data standardization, and two-phase gap interpolation.
Complete Pipeline:
clean_playground_data: Master function running the complete pipeline
Data Preparation:
fix_tag_replacement: Fix tag replacements before cleaning
Individual Pipeline Steps:
map_ids: Map raw tracking IDs to standardized participant IDs
mark_time_periods: Mark analysis and event time periods
standardize_to_seconds: Standardize data to one-second intervals
interpolate_gaps: Two-phase gap interpolation
Prepare an ID mapping CSV file with columns: raw_id, child_id
Load your raw tracking data
(Optional) Fix any tag replacements with fix_tag_replacement()
Run clean_playground_data() with appropriate parameters
Analyze the cleaned data
library(trackclean)
library(readr)
raw_data <- read_csv(system.file("extdata", "raw_tracking_data.csv",
package = "trackclean"))
# Fix tag replacement (if needed)
raw_data <- fix_tag_replacement(
data = raw_data,
original_id = 3,
replacement_id = 11,
replacement_time = "2025-03-18 11:51:00"
)
# Complete pipeline
cleaned_data <- clean_playground_data(
data = raw_data,
id_mapping = system.file("extdata", "id_mapping.csv", package = "trackclean"),
analyze_start = "2025-03-18 11:47:00",
analyze_end = "2025-03-18 11:57:00",
bell_start = "2025-03-18 11:53:00",
bell_end = "2025-03-18 11:58:00"
)
Maintainer: Tomas Bilevicius Tomas.Bilevicius@vub.be
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.