Skip to contents

Read

These functions are the links between R and your data.

read_animalta()
Read AnimalTA data
read_bonsai()
Read centroid tracking data from Bonsai
read_deeplabcut()
Read DeepLabCut data
read_idtracker()
Read idtracker.ai data
read_lightningpose()
Read LightningPose data
read_movement() experimental
Read movement data
read_sleap()
Read SLEAP data
read_trackball()
Read trackball data
read_treadmill() experimental
Read treadmill data
read_trex()
Read TRex Movement Tracking Data

Clean

These functions ensure that your data is ready for analysis.

check_na_timing()
Visualize the timing of missing values in the data
check_na_gapsize()
Visualize the occurrence of gap sizes in the data
check_confidence()
Visualize the distribution of confidence values for each keypoint
check_pose()
Analyze the distribution of distances from keypoints to the centroid
filter_na_confidence()
Filter low-confidence values in a dataset
filter_na_speed()
Filter values by speed threshold
filter_na_roi()
Filter coordinates outside a region of interest (ROI)
replace_na()
Replace Missing Values Using Various Methods
replace_na_linear()
Replace Missing Values Using Linear Interpolation
replace_na_locf()
Replace Missing Values Using Last Observation Carried Forward
replace_na_spline()
Replace Missing Values Using Spline Interpolation
replace_na_stine()
Replace Missing Values Using Stineman Interpolation
replace_na_value()
Replace Missing Values with a Constant Value
filter_movement() experimental
Smooth Movement Data
filter_lowpass()
Apply Butterworth Lowpass Filter to Signal
filter_highpass()
Apply Butterworth Highpass Filter to Signal
filter_lowpass_fft()
Apply FFT-based Lowpass Filter to Signal
filter_highpass_fft()
Apply FFT-based Highpass Filter to Signal
filter_kalman()
Kalman Filter for Regular Time Series
filter_kalman_irregular()
Kalman Filter for Irregular Time Series with Optional Resampling
filter_rollmean() experimental
Apply Rolling Mean Filter
filter_rollmedian() experimental
Apply Rolling Median Filter
filter_sgolay()
Apply Savitzky-Golay Filter to Movement Data

Transformations

These functions allow you to make tranformations to your coordinate system, such as translations, rotations or conversion to polar coordinates.

transform_to_egocentric() experimental
Transform coordinates to egocentric reference frame
translate_coords() experimental
Translate coordinates (Cartesian)
rotate_coords() experimental
Rotate coordinates in Cartesian space
map_to_cartesian()
Map from polar to Cartesian coordinates
map_to_polar()
Map from Cartesian to polar coordinates

Calculate

These functions are where your results begin to emerge.

add_centroid()
Add Centroid to Movement Data
calculate_kinematics() experimental
Calculate kinematics from position data
calculate_statistics() experimental
Calculate summary statistics
calculate_derivative()
Calculate the derivative (dx/dt) Calculate the derivative (dx/dt) with four arguments
calculate_direction()
Calculate direction Calculate direction (angle) from x and y distance using the (two-argument) arc-tangent. Converts to circular.
calculate_distance()
Calculate distance (Pythagoras) Calculate distance from an x and y distance, using Pythagoras theorem.
calculate_speed()
Calculate Speed from Position Data
calculate_straightness()
Calculate straightness measures

Metadata

These functions allow you to interact with your metadata.

init_metadata() experimental
Initiate movement metadata
get_metadata() experimental
Get/extract metadata
set_uuid() experimental
Set UUID
set_start_datetime() experimental
Set starting datetime
set_framerate()
Adjust time values to reflect a new framerate
set_individual()
Assign a new individual identifier to all rows in a dataset

Helpers

These functions help you along the way.

get_example_data()
Download example tracking data
group_every() experimental
Group every N observations together
align_timeseries()
Align a time series with a reference series using cross-correlation
find_lag()
Find optimal time lag between two time series using cross-correlation
find_peaks()
Find Peaks in Time Series Data
find_troughs()
Find Troughs in Time Series Data
plot_position_timeseries()
Plot Time Series of Keypoint Position
plot_speed_timeseries()
Plot Time Series of Keypoint Speed
classify_by_stability()
Classify Movement States Based on Stability Analysis
classify_by_threshold()
Classify Values Into Sequences with Minimum Run Length Constraints
classify_high_periods()
Classifies Periods of High Activity in Time Series Using Peaks and Troughs
classify_low_periods()
Classifies Periods of Low Activity in Time Series Using Peaks and Troughs