Objects

Definitions of objects

NavrObject()

Navr Object

load_position_data()

Loads and checks position data into navr object

is_navr_data()

Checks if the data are valid

Preprocessing

Function to preprocess navr object. Adding time and angle columns, smoothing speeds etc.

prepare_navr()

Adds all necessary columns to the navr object

add_area_boundaries()

Validates and adds area boudaries

pick_unreal_speeds()

Finds indices of impossible speed values

remove_unreal_speeds()

Shorthand for picking speeds and then recalculating object

smooth_positions()

Smooths positions of a given boject

smooth_speed()

Smooths speed

Getters

Function to access navr object

filter_times()

Filters navr object to only include times in between

Analysis

Function to closer investigate the navigation behaviour

search_onsets()

Searches for movement onsets and returns time since start for each event

search_stops()

Searches for movement stops and returns time since start for each event

search_deliberation_stops()

Searches for deliberation stop times and durations (time of no movement and increased rotation)

Visualising Navr

Wrappers around general visualising fuctions which take navr object as an input

plot_path(<navr>)

plots the _x and _X coordinates

plot_path()

Plots path of dataset

plot_position_heatmap(<navr>)

Plots position heatmap with given granularity

plot_position_heatmap()

Plots position heatmap with given granularity

plot_speed(<navr>)

PLots speed values in time

plot_speed()

PLots speed values in time

Plot elements

Custom ggplot elemtns to build entire navigation charts

animate_path()

Animates plot built with plot_path function

create_minimal_plot()

Returns blank plot

create_void_plot()

Creates empty plot with invisible theme to clearly plot paths and points

geom_navr_background()

GGplot geom to add custom PNG background to the plot

geom_navr_circle()

Creates geom of a circle to be inserted into the graph

geom_navr_direction()

Adds arrow pointing from a point in a specified angle

geom_navr_heatmap()

geom to add stat_density2d position heatmap

geom_navr_limits()

Adds limits to the plot from the area_boundaries list field

geom_navr_obj_timeseries()

Adds timeseries to the given plot from navr object based on given column

geom_navr_path()

Geom of plotting navr path

geom_navr_path_events()

Plots positions of given events on a path

geom_navr_path_rotation()

Adds rotational information to the path data

geom_navr_path_limits()

Adds limits based on the range of path plus and minus padding

geom_navr_points()

GGplot geom to add specified points to the given plot

geom_navr_timeseries()

Adds timeseries to the given plot

geom_navr_timeseries_events()

Draws vectical lines at times of given events

geom_position_heatmap()

geom to add stat_density2d position heatmap

Helper functions

Helper function, such as rolling_sum, euclid_distnace etc.

vector_from_angle()

Creates x y coordinate of point position given angle X

smooth_vector()

Smooths positions of given vector

angle_from_positions()

Calculates angle from two 2d positions

angle_diff()

Calculates angular difference between passed angle matrices

angle_to_180()

Converts angle to -180 to 180 difference

angle_to_360()

converts positive and negative angles to 0-360

angle_to_radian()

Converts angle to radian

calculate_distances()

Calculates distances froma x and y vectors

calculate_speeds()

Calcualtes vector of doubles with speeds

euclid_distance()

Euclidian distance between two points

euclid_distance_between_rows()

Eucilidan distance covered between each row

rolling_sum()

Calculates rolling sum of a vector across N points

radian_to_angle()

Converts Pi radian angle to degrees