knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", message = FALSE ) devtools::load_all(".")
The goal of {birdseyevyu} is to to to facilitate the use of the open-source datavyu software for the analysis of qualitative audiovisual data. This package extensively uses {datavyur} for preparing the data for summary statistics and plotting functions in this package. We do not intend to duplicate the functionality of that excellent package; instead we focus on summarizing datavyu output and preparing the output for use in other analyses.
First, install the datavyu qualitative coding software; see here
You can install the development version of this package from GitHub with;
for now, this is how you'll have to install the package. First, uncomment the line
for # install.packages("remotes")
by removing the # symbol. Then run both that and
the next line of code to install the package.
We'll also install a second package, datavyur, which can assist with our work with datavyu output.
# install.packages("remotes") remotes::install_github("tca2/birdseyevyu") remotes::install_github("iamamutt/datavyur")
library(birdseyevyu)
See the Preparing Data for Analysis vignette.
Using the other R package that works with datavyu, {datavyur} you can find information on all of the files (and their columns and codes) in a given directory (not run here):
library(datavyur) datavyu_search("inst/extdata/datavyu_output_11-16-2020_13-26")
{birdseyevyu} can help to summarize a column. It defaults to summarizing the frequency of codes for a specified column.
Note that, by default, the code name combines the column and code names; so, the hand
code in the above summary would be combined with its column childhands
(or parenthands
) to be specified as childhands.hand
or parenthands_hand
:
summarize_column(column = "childhands", code = "hand", directory = "inst/extdata/datavyu_output_11-16-2020_13-26", summary = "duration")
We can also explore the frequencies by file by changing the by_file
argument to
TRUE
.
We'll be typing that folder file path a number of times. You can set an option that let the folder file path you set be used by default, though you can over-ride it any time you like.
options(directory = "inst/extdata/datavyu_output_11-16-2020_13-26")
Then, use this default by changing the the by_file
argument to TRUE
:
summarize_column(column = "childhands", code = "hand", by_file = TRUE)
To summarize durations (instead of frequencies) change the summary
argument(defaults as "frequency"
) to "duration"
:
my_summary <- summarize_column(column = "childhands", code = "hand", summary = "duration") my_summary
Columns of durations can also be summarized by file:
duration_output <- summarize_column(column = "childhands", code = "hand", by_file = TRUE, summary = "duration")
{birdseyevyu} can also help to plot the summary of a column. Here, we save the output
from summarize_column()
to an object (we call this freq_summary
, but it can
be named whatever we like).
Then, we use this output in the function plot_column_summary()
:
freq_summary <- summarize_column(column = "childhands", code = "hand") plot_column_summary(freq_summary)
This also works by file---so long as the column is summarized by file:
freq_summary <- summarize_column(column = "childhands", code = "hand", by_file = TRUE, summary = "duration") plot_column_summary(freq_summary)
Similarly, if the output is for the duration, rather than the frequency, the durations are plotted:
duration_summary <- summarize_column(column = "childhands", code = "hand", summary = "duration") plot_column_summary(duration_summary)
Like for frequency, these can be ploted by file:
duration_summary_by_file <- summarize_column(column = "childhands", code = "hand", summary = "duration", by_file = TRUE) plot_column_summary(duration_summary_by_file)
Finally, output can be passed between functions with the pipe operator:
summarize_column(column = "childhands", code = "hand", summary = "duration", by_file = TRUE) %>% plot_column_summary()
To visualize frequency of a certain coded datavyu column accounting for the duration of the video, we can use the function plot_time_series()
. First we must prepare the data via saving the prep_time_series()
function as an object (here we use prepared_time_series
).
Note that the available files can be found using datavyur::datavyu_col_search()
:
prepared_time_series <- prep_time_series(column = "childhands", code = "hand", specified_file = "dyad1") prepared_time_series
The units
argument defaults to "s" (seconds), but can be changed to "m" (rounds the data to minutes)
or "ms" (retains datavyu's default units, milliseconds).
We can see how using milliseconds increases the number of data points:
prepared_time_series_ms <- prep_time_series(column = "childhands", code = "hand", specified_file = "dyad1", units = "ms") prepared_time_series_ms
Your prepared_time_series_ms
object can now be plotted usinf the plot_time_series()
function. Here is an example of how time series data can be represented, utilizing the functions defaulted unit value of seconds:
plot_time_series(prepared_time_series)
plot_cooccurence()
summarize_file()
Please note that the datavyu project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
This material is based upon work supported by the National Science Foundation under Grant No. 1920796. Any opinions, findings, conclusions, or recommendations expressed in this material are those of the authors and do not reflect the views of the National Science Foundation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.