The goal of
walkboutr is to process GPS and accelerometry data into walking bouts.
walkboutr will either return the original dataset along with bout labels and categories, or a summarized and de-identified dataset that can be shared for collaboration.
You can install the development version of
walkboutr from GitHub with:
# install.packages("devtools") devtools::install_github("rwalkbout/walkboutr")
This is an example of simulated data that could be processed by
walkboutr. The GPS data contain the required columns: time, latitude, longitude, speed. The accelerometry data contain the required columns: time, accerometry counts. These data have no extra columns, do not contain NAs, and don’t contain negative speeds or accelerometry counts. All times are also in date-time format.
library(walkboutr) # generate sample gps data: gps_data <- generate_walking_in_seattle_gps_data() # generate sample accelerometry data: accelerometry_counts <- make_full_day_bout_without_metadata()
Now that we have sample data, we can look at how the
walkboutr package works. There are two top level functions that will allow us to generate either (1) a dataset with bouts and bout categories with all of our original data included, or (2) a summary dataset that is completely de-identified and shareable for research purposes.
walk_bouts <- identify_walk_bouts_in_gps_and_accelerometry_data(gps_data,accelerometry_counts)
This dataset is a set of labelled bouts that are categorized (
bout_category) and contains information on bout specific median speed (
median_speed), the start time of the bout (
bout_start), the duration of the bout (in minutes for computational ease,
duration), and a flag for whether the bout came from a dataset with a complete day worth of data (
summary <- summarize_walk_bouts(walk_bouts)
In this example, we have 2 bout(s), and each bout has a label. Bout 1 occurred on 2012.04.07 and has a complete day worth of data (
complete_day = TRUE) and a start time of 00:02:30. This bout lasted 5 minutes, or 0.0833333 hours. The bout is a non-walk bout because the participant was moving too slowly for this walk to be considered walking.
For more information on bout categories and how these are assigned, please see the vignette titled Generate Walk Bouts.