| Title: | 'RStudio'-Native, Fully Offline Coding of Interview Transcripts |
|---|---|
| Description: | Qualitative data analysis ('QDA') of interview transcripts, field notes and open survey answers on your own computer, completely offline. Supports deductive and inductive coding with codes and subcodes, coding guidelines (definition, anchor example, coding rule), memos, segments by speaker turns, the summarizing qualitative content analysis of Mayring (2014) <https://nbn-resolving.org/urn:nbn:de:0168-ssoar-395173>, word frequencies, keyword in context, case comparisons and code queries (AND, OR, NOT). Cases can span several documents or parts of a document (e.g. the participants of a group interview) and have their own variables. Intercoder agreement between two coders is measured with Cohen's kappa (Cohen 1960) <doi:10.1177/001316446002000104>, Brennan and Prediger's kappa (Brennan and Prediger 1981) <doi:10.1177/001316448104100307> and Krippendorff's alpha (Hayes and Krippendorff 2007) <doi:10.1080/19312450709336664>, with a blind project copy and consensus coding, and team members' project copies can be merged. Graphics (code co-occurrence heatmap, code network, document portraits) are plain 'SVG'; projects can be exported in the 'REFI-QDA' exchange format for other 'QDA' software. Text is imported from plain text, 'Markdown', 'Word' and 'PDF' files or from survey tables ('CSV', 'Excel'), optionally pseudonymised, and frozen at import, so character offsets never drift. All project data lives in a single 'SQLite' file; every action is recorded in an audit trail and can be undone. A local 'shiny' app with an English and a German user interface and a scriptable API that returns tibbles share the same project file. |
| Authors: | Shelly Pröhl [aut, cre] |
| Maintainer: | Shelly Pröhl <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.11.0 |
| Built: | 2026-11-30 16:54:45 UTC |
| Source: | https://github.com/thedivingshellyfish/jellyqda |
Launches a local Shiny app on 127.0.0.1 (loopback only – fully offline)
and opens it in the RStudio Viewer pane when running inside RStudio.
The layout shows all panes at once: document tree, code system, document
browser (mark text with the mouse, then click a code button or the memo
button to store the coding at the exact character offsets), retrieved
segments per selected code, and the memo panel.
qda_app( host = "127.0.0.1", port = NULL, open = TRUE, new_window = TRUE, lang = NULL )qda_app( host = "127.0.0.1", port = NULL, open = TRUE, new_window = TRUE, lang = NULL )
host |
Host to bind; loopback only, default |
port |
Port; |
open |
Logical; open the app at all. |
new_window |
Logical; open the app in a new browser window
(default, recommended – the RStudio Viewer pane is small). With
|
lang |
User interface language, |
The call blocks the console while the app runs (press Esc to stop), like any Shiny app. Open the printed URL in additional browser windows/tabs for a multi-window setup – all windows share the same session and project.
Requires the suggested packages shiny, bslib and
fontawesome (install once; runtime needs no internet).
Invisibly NULL (after the app is stopped).
if (interactive()) { qda_open(file.path(tempfile(), "example.jellyqda")) qda_app() # new browser window; Esc stops the app qda_app(lang = "de") # German user interface qda_app(new_window = FALSE) # inside the RStudio Viewer pane }if (interactive()) { qda_open(file.path(tempfile(), "example.jellyqda")) qda_app() # new browser window; Esc stops the app qda_app(lang = "de") # German user interface qda_app(new_window = FALSE) # inside the RStudio Viewer pane }
Finds pattern (plain text, not a regular expression) in the documents
and codes either the match itself or the whole segment containing
it. Places already coded with this code (same range) are skipped. All new
codings form one action: one undo removes them all again. Useful for
deductive codes that are tied to clear terms – and for a first pass that
is then checked by hand.
qda_autocode( pattern, code, scope = c("match", "segment"), source = NULL, ignore_case = TRUE, whole_word = FALSE, memo = "" )qda_autocode( pattern, code, scope = c("match", "segment"), source = NULL, ignore_case = TRUE, whole_word = FALSE, memo = "" )
pattern |
Search term (plain text). |
code |
Code id or unique label. |
scope |
|
source |
Optional source(s) (ids or names); default all. |
ignore_case |
Logical. |
whole_word |
Logical; only whole words (default: also inside words). |
memo |
Optional comment for every new coding. |
Invisibly, a tibble of the new codings.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Project") qda_autocode("project", code = "Project") # the matches qda_autocode("project", code = "Project", scope = "segment") # whole segments qda_codings()[, c("code", "start", "end")] qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Project") qda_autocode("project", code = "Project") # the matches qda_autocode("project", code = "Project", scope = "segment") # whole segments qda_codings()[, c("code", "start", "end")] qda_close()
Zips the .jellyqda project file (and the originals/ directory, if
present) into a timestamped .zip. The default backup directory is
jellyqda-backups/ outside the project folder, so a backup survives a
broken project directory (a project lying directly in R's temporary folder,
as in the examples, keeps them inside its folder instead, so nothing is left
behind there). Old backups are rotated: only the newest keep
snapshots are kept.
qda_backup(path = NULL, keep = 10, quiet = FALSE, auto = FALSE)qda_backup(path = NULL, keep = 10, quiet = FALSE, auto = FALSE)
path |
Backup directory. Defaults to |
keep |
How many snapshots to keep (rotation). |
quiet |
Suppress the message. |
auto |
Internal: called by the auto-snapshot mechanism. |
An automatic snapshot is also taken after every auto_snapshot logged
actions (see qda_open()).
Invisibly, the path of the written zip file.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) zip_file <- qda_backup(quiet = TRUE) basename(zip_file) # own backup folder and number of backups to keep: qda_backup(path = file.path(tempfile(), "my-backups"), keep = 20, quiet = TRUE) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) zip_file <- qda_backup(quiet = TRUE) basename(zip_file) # own backup folder and number of backups to keep: qda_backup(path = file.path(tempfile(), "my-backups"), keep = 20, quiet = TRUE) qda_close()
A case is the unit you want to compare – a person, a group, an
organisation. It can consist of several whole documents (a person
interviewed twice) or of passages (the speaker turns of one participant
in a group interview, see qda_cases_from_speakers()). Codings count for
a case when they lie in one of its documents or passages.
qda_case_add(name, sources = NULL, description = "")qda_case_add(name, sources = NULL, description = "")
name |
Unique name of the case. |
sources |
Optional documents (ids or names) that belong to the case as a whole. |
description |
Optional short description. |
Invisibly, the new case as one-row tibble (see qda_cases()).
qda_case_assign(), qda_case_set_var(), qda_cases_from_variable()
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_case_add("Team North", sources = 1, description = "Project team, site North") qda_cases() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_case_add("Team North", sources = 1, description = "Project team, site North") qda_cases() qda_close()
Without start/end/segment the whole document belongs to the case.
With start and end (character positions, 1-based, as in
qda_code()) or segment (segment numbers) only these passages belong to
it – e.g. the turns of one participant in a group interview. A document
can belong to several cases. Assigning the same thing twice is ignored.
qda_case_assign(case, source, start = NULL, end = NULL, segment = NULL)qda_case_assign(case, source, start = NULL, end = NULL, segment = NULL)
case |
Case id or name. |
source |
Document (id or name). |
start, end
|
Optional passage (character positions, inclusive). |
segment |
Optional segment number(s) of the document. |
Invisibly, the members of the case (see qda_case_members()).
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_case_add("Person A") qda_case_assign("Person A", 1) # the whole first interview qda_case_assign("Person A", 2, segment = c(3, 5)) # two turns of the second qda_case_members("Person A") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_case_add("Person A") qda_case_assign("Person A", 1) # the whole first interview qda_case_assign("Person A", 2, segment = c(3, 5)) # two turns of the second qda_case_members("Person A") qda_close()
Delete a variable of a case
qda_case_del_var(case, key)qda_case_del_var(case, key)
case |
Case id or name. |
key |
Variable name. |
Invisibly, the remaining variables of the case.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("Person A") qda_case_set_var("Person A", "age", "34") qda_case_del_var("Person A", "age") qda_case_vars("Person A") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("Person A") qda_case_set_var("Person A", "age", "34") qda_case_del_var("Person A", "age") qda_case_vars("Person A") qda_close()
Removes the case and its assignments. The documents, codings and memos
stay untouched. Can be undone with qda_undo().
qda_case_delete(case)qda_case_delete(case)
case |
Case id or name. |
Invisibly, TRUE.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("P1") qda_case_delete("P1") qda_cases() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("P1") qda_case_delete("P1") qda_cases() qda_close()
Counts codings per code (rows, in code-tree order) and per value of a
document variable (columns), e.g. by = "Rolle". Codes count their
subcodes as well (column with_subcodes). Documents without the variable
are collected in the column (ohne).
qda_case_matrix(by = NULL, percent = FALSE, unit = c("document", "case"))qda_case_matrix(by = NULL, percent = FALSE, unit = c("document", "case"))
by |
Name of a document variable (see |
percent |
Logical; column percentages (share of all codings of the group) instead of counts. |
unit |
|
With unit = "case" the columns are cases instead of documents (see
qda_case_add()): one column per case, or – with by – one column per
value of a case variable. A coding counts for a case when it lies in one
of the case's documents or passages; a coding that belongs to two cases of
the same group counts once.
A tibble: code, path, depth, then one column per value (or
case). Attribute "n_units": number of documents (or cases) per column.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_source_set_var(1, "role", "project lead") qda_source_set_var(2, "role", "developer") qda_code_add("Motivation") qda_code(1, "Motivation", segment = 2) qda_code(2, "Motivation", segment = 1) qda_case_matrix("role") qda_case_matrix("role", percent = TRUE) qda_case_add("Person A", sources = 1:2) # one person, two interviews qda_case_matrix(unit = "case") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_source_set_var(1, "role", "project lead") qda_source_set_var(2, "role", "developer") qda_code_add("Motivation") qda_code(1, "Motivation", segment = 2) qda_code(2, "Motivation", segment = 1) qda_case_matrix("role") qda_case_matrix("role", percent = TRUE) qda_case_add("Person A", sources = 1:2) # one person, two interviews qda_case_matrix(unit = "case") qda_close()
What belongs to a case
qda_case_members(case)qda_case_members(case)
case |
Case id or name. |
A tibble, one row per member: id, source_id, source,
start, end (NA for a whole document), chars and text (the
passage; for whole documents the first 200 characters).
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_case_add("Person A") qda_case_assign("Person A", 1, segment = 2) qda_case_members("Person A") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_case_add("Person A") qda_case_assign("Person A", 1, segment = 2) qda_case_members("Person A") qda_close()
Set a variable of a case
qda_case_set_var(case, key, value)qda_case_set_var(case, key, value)
case |
Case id or name. |
key |
Variable name (e.g. |
value |
Value (stored as text). |
Invisibly, all variables of the case.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("Person A") qda_case_set_var("Person A", "role", "nurse") qda_case_set_var("Person A", "age", 34) qda_case_vars("Person A") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("Person A") qda_case_set_var("Person A", "role", "nurse") qda_case_set_var("Person A", "age", 34) qda_case_vars("Person A") qda_close()
Take documents or passages out of a case
qda_case_unassign(case, source = NULL, member = NULL)qda_case_unassign(case, source = NULL, member = NULL)
case |
Case id or name. |
source |
Optional document (id or name): everything of this document is taken out of the case. |
member |
Optional member ids (column |
Invisibly, the remaining members of the case.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_case_add("Person A", sources = 1:2) qda_case_unassign("Person A", source = 2) qda_case_members("Person A") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_case_add("Person A", sources = 1:2) qda_case_unassign("Person A", source = 2) qda_case_members("Person A") qda_close()
Rename a case or change its description
qda_case_update(case, name = NULL, description = NULL)qda_case_update(case, name = NULL, description = NULL)
case |
Case id or name. |
name |
New name (optional). |
description |
New description (optional). |
Invisibly, the case as one-row tibble.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("P1") qda_case_update("P1", name = "Person 1", description = "nurse, night shifts") qda_cases() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("P1") qda_case_update("P1", name = "Person 1", description = "nurse, night shifts") qda_cases() qda_close()
Variables of a case
qda_case_vars(case)qda_case_vars(case)
case |
Case id or name. |
Named character vector (variable name -> value).
qda_case_set_var(), qda_source_vars() for document variables
qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("Person A") qda_case_set_var("Person A", "age", "34") qda_case_vars("Person A") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_case_add("Person A") qda_case_set_var("Person A", "age", "34") qda_case_vars("Person A") qda_close()
List the cases of the project
qda_cases()qda_cases()
A tibble with one row per case: id, name, description,
documents (number of documents with at least a part in the case),
passages (number of passages, i.e. parts of documents), sources
(names of the documents, comma-separated) and one column per case
variable.
qda_case_add(), qda_case_vars(), qda_case_matrix()
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_case_add("Person A", sources = 1:2) # interviewed twice qda_cases() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_case_add("Person A", sources = 1:2) # interviewed twice qda_cases() qda_close()
For group interviews and focus groups: every speaker label found at the
start of a segment ("B1: ...", "[00:03:10] Anna: ...") becomes a case
that contains all turns of this speaker. Segment the document by speaker
turns first (qda_segments_set() with "speaker", or import with
segments = "speaker"). Interviewer labels are left out. The case variable
document records where the speaker comes from.
qda_cases_from_speakers( source, exclude = c("I", "Int", "Interviewer", "Interviewerin", "Moderation", "Mod", "M"), prefix = TRUE )qda_cases_from_speakers( source, exclude = c("I", "Int", "Interviewer", "Interviewerin", "Moderation", "Mod", "M"), prefix = TRUE )
source |
Document (id or name) – or several. |
exclude |
Speaker labels that are not cases (interviewer, moderator). |
prefix |
If |
Invisibly, the touched cases (see qda_cases()).
qda_open(file.path(tempfile(), "example.jellyqda")) f <- file.path(tempdir(), "group.txt") writeLines(c("I: How do you organise the shifts?", "B1: We plan them together.", "B2: Mostly the manager does it.", "B1: But we can swap."), f) qda_import(f, segments = "speaker") qda_cases_from_speakers(1) qda_cases() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) f <- file.path(tempdir(), "group.txt") writeLines(c("I: How do you organise the shifts?", "B1: We plan them together.", "B2: Mostly the manager does it.", "B1: But we can swap."), f) qda_import(f, segments = "speaker") qda_cases_from_speakers(1) qda_cases() qda_close()
For several documents per case: give the documents a variable that names
the case (e.g. person = "P07" on both interviews of P07), then this
function creates one case per value and assigns the documents as a whole.
The variable is also set on the case, so qda_case_matrix(by = key, unit = "case") works right away.
qda_cases_from_variable(key)qda_cases_from_variable(key)
key |
Name of the document variable. |
Invisibly, the touched cases (see qda_cases()).
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md", "interview_03.docx"), package = "jellyqda")) qda_source_set_var(1, "person", "P1"); qda_source_set_var(2, "person", "P1") qda_source_set_var(3, "person", "P2") qda_cases_from_variable("person") qda_cases() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md", "interview_03.docx"), package = "jellyqda")) qda_source_set_var(1, "person", "P1"); qda_source_set_var(2, "person", "P1") qda_source_set_var(3, "person", "P2") qda_cases_from_variable("person") qda_cases() qda_close()
Writes a final project_close event and disconnects from the SQLite file.
qda_close()qda_close()
Invisibly NULL.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_close()
Address a passage either by segment number (as shown in
qda_view()) or by explicit 1-based character offsets start/end into
the frozen text. Offsets are validated against the frozen text, so a
coding can never point outside the source.
qda_code(source, code, segment = NULL, start = NULL, end = NULL, memo = "")qda_code(source, code, segment = NULL, start = NULL, end = NULL, memo = "")
source |
Source id or unique name. |
code |
Code id or unique label. |
segment |
Segment number (see |
start, end
|
1-based inclusive character offsets into the frozen text. |
memo |
Optional memo attached to this coding. |
Invisibly, a one-row tibble describing the new coding.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(source = 1, segment = 2, code = "Career path") qda_code(source = "interview_01.txt", start = 120, end = 200, code = "SME", memo = "5 years in an SME") qda_codings() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(source = 1, segment = 2, code = "Career path") qda_code(source = "interview_01.txt", start = 120, end = 200, code = "SME", memo = "5 years in an SME") qda_codings() qda_close()
Codes form a tree: pass parent (id or label) to create a sub-code.
Inductive codes can simply be added without a parent while coding.
qda_code_add(label, parent = NULL, color = NULL, description = "")qda_code_add(label, parent = NULL, color = NULL, description = "")
label |
Code label. Unique per parent. |
parent |
Optional parent code (id or unique label). |
color |
Highlight color; a palette color is assigned automatically if omitted. |
description |
Optional description of the code. |
Invisibly, a one-row tibble describing the new code.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") # top level qda_code_add("SME", parent = "Career path") # subcode (inherits the colour) qda_code_add("Motivation", color = "#56B4E9", description = "Reasons and drives") qda_codes() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") # top level qda_code_add("SME", parent = "Career path") # subcode (inherits the colour) qda_code_add("Motivation", color = "#56B4E9", description = "Reasons and drives") qda_codes() qda_close()
Delete a code (and its sub-codes and their codings)
qda_code_delete(code)qda_code_delete(code)
code |
Code id or unique label. |
Invisibly, a one-row tibble with the number of deleted codes and codings.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_code_delete("Career path") # with its subcodes and codings nrow(qda_codes()) qda_undo() # everything is back nrow(qda_codes()) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_code_delete("Career path") # with its subcodes and codings nrow(qda_codes()) qda_undo() # everything is back nrow(qda_codes()) qda_close()
The three columns of a coding guideline ("Kodierleitfaden") as used in
qualitative content analysis (Mayring, Kuckartz): a definition of the
category, one or more anchor examples (typical passages) and a
coding rule (how to decide borderline cases). Arguments left NULL
are not changed. The definition is stored in the column description.
qda_code_guide( code, definition = NULL, anchor = NULL, rule = NULL, append_anchor = FALSE )qda_code_guide( code, definition = NULL, anchor = NULL, rule = NULL, append_anchor = FALSE )
code |
Code id or unique label. |
definition, anchor, rule
|
New text, or |
append_anchor |
Logical; add |
Invisibly, a one-row tibble with the updated guideline.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code_guide("SME", definition = "Statements about working in a small or medium-sized enterprise", rule = "Only explicit statements; comparisons with corporations -> other code") qda_code_guide("SME", anchor = "'I have worked in a small company for 5 years'", append_anchor = TRUE) qda_codes()[, c("label", "description", "anchor", "coding_rule")] qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code_guide("SME", definition = "Statements about working in a small or medium-sized enterprise", rule = "Only explicit statements; comparisons with corporations -> other code") qda_code_guide("SME", anchor = "'I have worked in a small company for 5 years'", append_anchor = TRUE) qda_codes()[, c("label", "description", "anchor", "coding_rule")] qda_close()
All codings, code memos and summaries of from move to into; subcodes
of from become subcodes of into (a subcode with the same label as an
existing subcode of into is merged into it as well). The guideline texts
are kept (appended where both codes have one). Finally from is deleted.
Typical step of inductive category building: two categories turn out to
mean the same. Undo restores everything in one step.
qda_code_merge(from, into)qda_code_merge(from, into)
from |
Code that disappears (id or unique label). |
into |
Code that remains (id or unique label). |
Invisibly, a one-row tibble: into, number of codings_moved.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Interest") qda_code_add("Intrinsic") qda_code(1, "Interest", segment = 2) qda_code_merge("Interest", into = "Intrinsic") qda_codings()$code qda_undo() # both codes are back qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Interest") qda_code_add("Intrinsic") qda_code(1, "Interest", segment = 2) qda_code_merge("Interest", into = "Intrinsic") qda_codings()$code qda_undo() # both codes are back qda_close()
Move a code to a new parent (re-parent), e.g. after drag & drop in the app
qda_code_move(code, parent = NULL)qda_code_move(code, parent = NULL)
code |
Code id or label to move. |
parent |
New parent code id/label, or |
Invisibly, a one-row tibble with the updated code.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code_add("Motivation") qda_code_move("SME", parent = "Motivation") qda_code_move("SME", parent = NULL) # back to the top level qda_codes()$path qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code_add("Motivation") qda_code_move("SME", parent = "Motivation") qda_code_move("SME", parent = NULL) # back to the top level qda_codes()$path qda_close()
Rename a code
qda_code_rename(code, new_label)qda_code_rename(code, new_label)
code |
Code id or unique label. |
new_label |
New label (must be unique under the same parent). |
Invisibly, a one-row tibble with the updated code.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code_rename("SME", "Small company") qda_codes()$path qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code_rename("SME", "Small company") qda_codes()$path qda_close()
In the app, subcodes are always shown in the colour of their top-level
code; changing the colour of a top-level code therefore re-colours the
whole code family. With family = TRUE (default) the stored colour of all
subcodes is updated as well, so exports show the same colour.
qda_code_set_color(code, color, family = TRUE)qda_code_set_color(code, color, family = TRUE)
code |
Code id or unique label. |
color |
New colour as |
family |
Logical; also set the colour of all subcodes. |
Invisibly, a one-row tibble with the updated code.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code_set_color("Career path", "#0072B2") # whole code family qda_codes()$color qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code_set_color("Career path", "#0072B2") # whole code family qda_codes()$color qda_close()
List the codebook
qda_codes()qda_codes()
A tibble with one row per code: id, label, parent_id, color,
description (definition), anchor (anchor examples), coding_rule,
path (hierarchical parent / child label path) and
n_codings (how many codings use this code).
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_codes() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_codes() qda_close()
Delete a coding
qda_coding_delete(coding)qda_coding_delete(coding)
coding |
Coding id. |
Invisibly NULL.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_coding_delete(1) nrow(qda_codings()) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_coding_delete(1) nrow(qda_codings()) qda_close()
Keeps the passage, its offsets and its comment; only the code changes. Typical use: a passage coded with a top-level code is refined to one of its subcodes (or the other way round). Undoable like every action.
qda_coding_recode(coding, code)qda_coding_recode(coding, code)
coding |
Coding id. |
code |
New code (id or unique label). |
Invisibly, a one-row tibble with the updated coding.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "Career path", segment = 2) qda_coding_recode(1, "SME") qda_codings()$code qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "Career path", segment = 2) qda_coding_recode(1, "SME") qda_codings()$code qda_close()
Set / change the memo of an existing coding
qda_coding_set_memo(coding, memo)qda_coding_set_memo(coding, memo)
coding |
Coding id. |
memo |
New memo text. |
Invisibly, a one-row tibble with the updated coding.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_coding_set_memo(1, "Turning point in the career") qda_codings()$memo qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_coding_set_memo(1, "Turning point in the career") qda_codings()$memo qda_close()
The steps of Mayring's summarising content analysis per coded passage:
paraphrase (the content in short, own words) and generalisation
(raised to the abstraction level of the analysis). The reduction step is
the code itself. Arguments left NULL are not changed.
qda_coding_set_summary(coding, paraphrase = NULL, generalization = NULL)qda_coding_set_summary(coding, paraphrase = NULL, generalization = NULL)
coding |
Coding id. |
paraphrase, generalization
|
New text or |
Invisibly, a one-row tibble with the updated texts.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_coding_set_summary(1, paraphrase = "Works in a small company", generalization = "Career in an SME") qda_codings()[, c("code", "paraphrase", "generalization")] qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_coding_set_summary(1, paraphrase = "Works in a small company", generalization = "Career in an SME") qda_codings()[, c("code", "paraphrase", "generalization")] qda_close()
List all codings (optionally filtered)
qda_codings(source = NULL, code = NULL)qda_codings(source = NULL, code = NULL)
source |
Optional source id or name to filter by. |
code |
Optional code id or label to filter by. |
A tibble: id, source_id, source, code_id, code, start,
end, memo, text (the coded passage extracted from the frozen
text), paraphrase, generalization (Mayring summary, see
qda_coding_set_summary()).
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2, memo = "first job") qda_codings() qda_codings(code = "SME") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2, memo = "first job") qda_codings() qda_codings(code = "SME") qda_close()
Counts for every pair of codes how often they appear together: in the
same segment (default, e.g. the same speaker turn), in the same document,
or as overlapping codings. Typical questions: which themes are talked
about together? Which categories are hard to tell apart (they are always
coded together)? The result is the basis of the heatmap
(qda_plot_cooccurrence()) and the code network (qda_plot_network()).
qda_cooccurrence( unit = c("segment", "document", "overlap"), level = c("code", "top"), source = NULL, min_overlap = 1L )qda_cooccurrence( unit = c("segment", "document", "overlap"), level = c("code", "top"), source = NULL, min_overlap = 1L )
unit |
|
level |
|
source |
Optional documents (ids or names); default all. |
min_overlap |
Minimum number of characters a coding must overlap a
unit (or, with |
A tibble with one row per pair of codes that occur together,
most frequent first: code_a, code_b (paths), n (units – or, with
unit = "overlap", pairs of codings – with both), n_a, n_b (units
with each code, or its number of codings), jaccard (n / (n_a + n_b - n): 1 = always together; NA for unit = "overlap"). Attribute
"codes": one row per code (code, label, depth, color, n);
attribute "info": unit, level, number of units and documents.
qda_cooccurrence_passages(), qda_plot_cooccurrence(),
qda_plot_network()
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Career path", segment = 5) qda_code(1, "Motivation", start = 300, end = 420) qda_code(1, "Motivation", segment = 7) qda_code(1, "Team", segment = 7) qda_cooccurrence() qda_cooccurrence(unit = "overlap") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Career path", segment = 5) qda_code(1, "Motivation", start = 300, end = 420) qda_code(1, "Motivation", segment = 7) qda_code(1, "Team", segment = 7) qda_cooccurrence() qda_cooccurrence(unit = "overlap") qda_close()
The units (segments or documents) that contain both codes – or, with
unit = "overlap", the stretches of text where codings of the two codes
overlap. This is what you read after spotting a pair in
qda_cooccurrence(), the heatmap or the network.
qda_cooccurrence_passages( code_a, code_b, unit = c("segment", "document", "overlap"), level = c("code", "top"), source = NULL, min_overlap = 1L )qda_cooccurrence_passages( code_a, code_b, unit = c("segment", "document", "overlap"), level = c("code", "top"), source = NULL, min_overlap = 1L )
code_a, code_b
|
Code paths (e.g. |
unit |
|
level |
|
source |
Optional documents (ids or names); default all. |
min_overlap |
Minimum number of characters a coding must overlap a
unit (or, with |
A tibble: source_id, source, segment, start, end,
text.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Motivation", segment = 7) qda_code(1, "Team", segment = 7) qda_cooccurrence_passages("Motivation", "Team") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Motivation", segment = 7) qda_code(1, "Team", segment = 7) qda_cooccurrence_passages("Motivation", "Team") qda_close()
Every action in a jellyqda project (import, code_add, coding_add, export,
backup, ...) is logged here with a UTC timestamp – the evidence for the
methods section. Export it as CSV with qda_export("audit").
qda_events()qda_events()
A tibble: id, action, details (JSON), created_at.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_events() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_events() qda_close()
Writes files into path (default: exports/ next to the project file).
qda_export(what = "all", path = NULL, report_documents = TRUE)qda_export(what = "all", path = NULL, report_documents = TRUE)
what |
One or more of |
path |
Output directory (created if missing). |
report_documents |
Logical; include every document with its marks in
the report ( |
"segments": all codings with extracted text – CSV, plus .xlsx if the
writexl package is installed
"codings": raw codings table – CSV
"codebook": the code tree – CSV and .docx (via officer)
"audit": the full events audit trail – CSV
"cases": the cases with their variables and members (documents or
passages) – CSV, one row per member (see qda_cases())
"report": a standalone HTML report – all documents with colored coding
marks, the codebook, all memos and project statistics
"qdpx": the whole project in the REFI-QDA exchange format for MAXQDA,
ATLAS.ti, NVivo, QualCoder ... (see qda_export_qdpx())
"all": all of the above except "qdpx" ("cases" only if the
project has cases)
Invisibly, a tibble of written files: file, what, rows.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) out <- qda_export("all") basename(out$file) qda_export("audit") # for the methods section qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) out <- qda_export("all") basename(out$file) qda_export("audit") # for the methods section qda_close()
Writes the whole project – documents, code system with colours and
coding guideline, codings with comments, memos, document variables and cases –
into one .qdpx file in the REFI-QDA exchange format. MAXQDA, ATLAS.ti,
NVivo, QualCoder and other programs can import it, so a jellyqda project
can be continued elsewhere, shared with colleagues who use other software,
or archived in an open format. Tested so far with QualCoder (automatic
round trip in jellyqda-converter); not yet with real imports into MAXQDA,
ATLAS.ti or NVivo.
qda_export_qdpx(path = NULL, user = NULL)qda_export_qdpx(path = NULL, user = NULL)
path |
File to write. Default: |
user |
Name of the user shown in the other program. |
Document, code and project memos are written twice: as notes linked to the document, code or project (the standard way of REFI-QDA) and as text at the end of its description, because QualCoder only reads memos there. In QualCoder they appear in the memo of the file, code or project; jellyqda-converter recognises the copies and does not import them twice.
Not part of the format and therefore not exported: segments, the summary grid and the audit trail. Mayring paraphrases and generalisations are added to the comment of their coding. Positions follow the standard (characters counted from 0, end exclusive).
Invisibly, the path of the written file.
REFI-QDA Standard, project exchange (QDA-XML project 1.0, 2019): https://www.qdasoftware.org/
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code(1, "Career path", segment = 3, memo = "first job") f <- qda_export_qdpx(file.path(tempdir(), "example.qdpx")) zip::zip_list(f)$filename qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code(1, "Career path", segment = 3, memo = "first job") f <- qda_export_qdpx(file.path(tempdir(), "example.qdpx")) zip::zip_list(f)$filename qda_close()
What would undo / redo do next?
qda_history()qda_history()
A list with undo and redo: each either NULL (nothing to
undo/redo) or a description string such as
"Coding hinzugefuegt: 'Thema A' in interview_01.txt (Zeichen 120-340)".
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_history()$undo # what the next qda_undo() would revert qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_history()$undo # what the next qda_undo() would revert qda_close()
Reads .txt, .md, .docx and .pdf files, normalizes them to UTF-8 and
stores the text permanently in the sources table (frozen_text). The
original file is copied unchanged into originals/ next to the project
file. Files whose content hash was already imported are skipped, so text is
extracted exactly once per file.
qda_import( files, copy_originals = TRUE, names = NULL, segments = c("blankline", "speaker", "line"), pseudonyms = NULL )qda_import( files, copy_originals = TRUE, names = NULL, segments = c("blankline", "speaker", "line"), pseudonyms = NULL )
files |
Character vector of file paths. |
copy_originals |
Logical; copy the original files into |
names |
Optional character vector of display names (one per file) –
e.g. the original file names when importing uploads whose temp paths are
meaningless ( |
segments |
How the new documents are divided into segments:
|
pseudonyms |
Optional key list for pseudonymisation (see
|
A different file with a name that is already taken (e.g.
a/interview.txt and b/interview.txt) is imported under a unique name
such as interview (2).txt, so no original is ever overwritten and every
source can still be addressed by its name.
PDFs without a usable text layer are imported with a warning (the original remains the source of truth; consider manual OCR, e.g. tesseract).
A tibble with one row per input file: id, name, format,
chars, status.
qda_open(file.path(tempfile(), "example.jellyqda")) files <- system.file("extdata", c("interview_01.txt", "interview_02.md", "interview_03.docx"), package = "jellyqda") qda_import(files) qda_import(system.file("extdata", "fieldnotes.pdf", package = "jellyqda"), segments = "line") # one segment per line qda_sources() f <- file.path(tempdir(), "interview_anna.txt") writeLines(c("I: Anna, how did you start?", "Anna: In Hamburg, with Ben."), f) qda_import(f, pseudonyms = c("Anna" = "[Person A]", "Hamburg" = "[City 1]", "Ben" = "[Person B]")) qda_sources()$name[5] # the name is pseudonymised too qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) files <- system.file("extdata", c("interview_01.txt", "interview_02.md", "interview_03.docx"), package = "jellyqda") qda_import(files) qda_import(system.file("extdata", "fieldnotes.pdf", package = "jellyqda"), segments = "line") # one segment per line qda_sources() f <- file.path(tempdir(), "interview_anna.txt") writeLines(c("I: Anna, how did you start?", "Anna: In Hamburg, with Ben."), f) qda_import(f, pseudonyms = c("Anna" = "[Person A]", "Hamburg" = "[City 1]", "Ben" = "[Person B]")) qda_sources()$name[5] # the name is pseudonymised too qda_close()
Turns a survey export (SoSci Survey, LimeSurvey, Qualtrics, Google Forms
... saved as CSV or Excel) into documents: one document per
respondent, in it every open answer as its own segment (the
question as the first line, the answer below), and chosen columns as
document variables – ready for coding, case comparison and queries
by group. With code_questions = TRUE every answer is already coded with
a code for its question (all below one code "Fragen" / "Questions"), so
you can filter and compare by question right away.
qda_import_survey( file, text = NULL, vars = NULL, id = NULL, sheet = 1, code_questions = FALSE, prefix = NULL, name = NULL, pseudonyms = NULL )qda_import_survey( file, text = NULL, vars = NULL, id = NULL, sheet = 1, code_questions = FALSE, prefix = NULL, name = NULL, pseudonyms = NULL )
file |
Path to a |
text |
Columns with open answers. Default: as suggested by
|
vars |
Columns to store as document variables. Default: as suggested. |
id |
Column with the respondent id; default as suggested, otherwise the row number. |
sheet |
Excel sheet. |
code_questions |
Logical; code every answer with a code for its question. |
prefix |
Start of the document names (default: the file name), e.g.
|
name |
File name to use for |
pseudonyms |
Optional key list (see |
Empty answers are left out; respondents without any open answer are
skipped. Importing the same file again skips respondents already
imported. The survey file is copied to originals/.
Invisibly, a tibble of the new documents (id, name, format,
chars, status), like qda_import(). Attribute "skipped": number
of respondents without answers or already imported.
qda_open(file.path(tempfile(), "survey.jellyqda")) f <- system.file("extdata", "survey_demo.csv", package = "jellyqda") qda_survey_columns(f) qda_import_survey(f, code_questions = TRUE) qda_sources()[, c("name", "segments")] qda_source_vars(1) qda_close()qda_open(file.path(tempfile(), "survey.jellyqda")) f <- system.file("extdata", "survey_demo.csv", package = "jellyqda") qda_survey_columns(f) qda_import_survey(f, code_questions = TRUE) qda_sources()[, c("name", "segments")] qda_source_vars(1) qda_close()
Compares the codings of the active project (coder A) with those of
a second project file (coder B, usually made with
qda_intercoder_copy()) and computes, per code and overall:
qda_intercoder( other, unit = c("segment", "document"), level = c("code", "top"), source = NULL, min_overlap = 1L, coders = NULL, log = TRUE )qda_intercoder( other, unit = c("segment", "document"), level = c("code", "top"), source = NULL, min_overlap = 1L, coders = NULL, log = TRUE )
other |
Path to the second coder's |
unit |
|
level |
|
source |
Optional documents (ids or names of the active project) to compare; default all documents both projects contain. |
min_overlap |
Minimum number of characters a coding must overlap a unit to count. |
coders |
Two names for the coders; default the two file names. |
log |
Logical; record the result in the audit trail. |
percent agreement – share of units both coders treated alike,
Cohen's kappa – agreement corrected for chance (Cohen 1960), with the verbal rating after Landis & Koch (1977),
Brennan & Prediger's kappa – chance agreement fixed at 1/2; stable for rare codes, where Cohen's kappa is low despite high agreement,
Krippendorff's alpha (nominal) – common in content analysis; values from .800 are usually considered reliable, .667 to .800 allow tentative conclusions (Krippendorff 2004).
Units of analysis are the segments of the active project (e.g.
speaker turns) or whole documents. A unit counts as coded with a code when
a coding of that code overlaps it by at least min_overlap characters, so
the two coders do not have to mark exactly the same characters.
Documents are matched by their text (names may differ), codes by their
path. Codes nobody used in the compared documents are left out.
The other file is only read, never changed. Each comparison is recorded in the audit trail (for the methods section) and shown in the report.
A tibble with one row per code plus a first row scope = "overall" (all codes pooled): scope, code (path), units,
both, only_a, only_b, neither, agreement, kappa,
kappa_bp, alpha, rating, in_a, in_b (the code exists in the
project of A / B). The overall row also has mean_kappa (mean over the
codes). Attribute "info": coders, files, compared and missing
documents, unit and level.
Cohen, J. (1960). A coefficient of agreement for nominal scales. Educational and Psychological Measurement, 20(1), 37–46.
Brennan, R. L., & Prediger, D. J. (1981). Coefficient kappa: Some uses, misuses, and alternatives. Educational and Psychological Measurement, 41(3), 687–699.
Landis, J. R., & Koch, G. G. (1977). The measurement of observer agreement for categorical data. Biometrics, 33(1), 159–174.
Krippendorff, K. (2004). Content Analysis: An Introduction to Its Methodology (2nd ed.). Sage.
qda_intercoder_copy(), qda_intercoder_diff(),
qda_intercoder_adopt()
dir <- tempfile() qda_open(file.path(dir, "coder_a.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Team") b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda")) qda_code(1, "Career path", segment = 2); qda_code(1, "Team", segment = 3) qda_close() qda_open(b) # coder B codes independently qda_code(1, "Career path", segment = 2); qda_code(1, "Team", segment = 4) qda_close() qda_open(file.path(dir, "coder_a.jellyqda")) qda_intercoder(b) qda_intercoder(b, level = "top", unit = "document") qda_close()dir <- tempfile() qda_open(file.path(dir, "coder_a.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Team") b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda")) qda_code(1, "Career path", segment = 2); qda_code(1, "Team", segment = 3) qda_close() qda_open(b) # coder B codes independently qda_code(1, "Career path", segment = 2); qda_code(1, "Team", segment = 4) qda_close() qda_open(file.path(dir, "coder_a.jellyqda")) qda_intercoder(b) qda_intercoder(b, level = "top", unit = "document") qda_close()
After discussing a disagreement, the coding of coder B can be copied into
the active project: all of B's codings of code that overlap the unit
start–end of document source are added with B's exact character
range (the documents are identical). Codings A already has (same code,
same range) are skipped. The codes must exist in the active project
(same path). All new codings form one action: Ctrl+Z / qda_undo()
removes them again. The other file is not changed.
qda_intercoder_adopt( other, source, start, end, code, level = c("code", "top"), min_overlap = 1L )qda_intercoder_adopt( other, source, start, end, code, level = c("code", "top"), min_overlap = 1L )
other |
Path to the second coder's |
source |
Document of the active project (id or name). |
start, end
|
The unit, as in |
code |
Code path (with |
level |
|
min_overlap |
Minimum number of characters a coding must overlap a unit to count. |
Invisibly, a tibble of the new codings.
dir <- tempfile() qda_open(file.path(dir, "coder_a.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Team") b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda")) qda_close() qda_open(b); qda_code(1, "Team", segment = 4); qda_close() qda_open(file.path(dir, "coder_a.jellyqda")) d <- qda_intercoder_diff(b) qda_intercoder_adopt(b, d$source_id[1], d$start[1], d$end[1], d$code[1]) qda_codings()[, c("code", "start", "end")] qda_close()dir <- tempfile() qda_open(file.path(dir, "coder_a.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Team") b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda")) qda_close() qda_open(b); qda_code(1, "Team", segment = 4); qda_close() qda_open(file.path(dir, "coder_a.jellyqda")) d <- qda_intercoder_diff(b) qda_intercoder_adopt(b, d$source_id[1], d$start[1], d$end[1], d$code[1]) qda_codings()[, c("code", "start", "end")] qda_close()
The first step of an intercoder check: the copy contains the same
documents (frozen texts), segments, document variables and code system
including the coding guideline – but no codings, no Mayring
summaries, no summary grid and no audit trail, so the second person codes
"blind". Code memos (definitions, coding rules) are kept by default; other
memos only if requested in keep_memos. The active project is not changed.
qda_intercoder_copy(path, keep_memos = "code", overwrite = FALSE)qda_intercoder_copy(path, keep_memos = "code", overwrite = FALSE)
path |
File for the copy (the |
keep_memos |
Kinds of memos to keep in the copy: any of |
overwrite |
Logical; replace an existing file. |
Invisibly, the path of the copy.
qda_intercoder() to compare both projects afterwards.
dir <- tempfile() qda_open(file.path(dir, "coder_a.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code(1, "Career path", segment = 2) copy <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda")) qda_close() qda_open(copy) nrow(qda_codings()) # 0: coder B starts blind qda_codes()$label # same code system qda_close()dir <- tempfile() qda_open(file.path(dir, "coder_a.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code(1, "Career path", segment = 2) copy <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda")) qda_close() qda_open(copy) nrow(qda_codings()) # 0: coder B starts blind qda_codes()$label # same code system qda_close()
Lists every unit (segment or document) and code where exactly one of the
two coders coded – the material for the consensus discussion after an
intercoder check. Takes the same arguments as qda_intercoder().
qda_intercoder_diff( other, unit = c("segment", "document"), level = c("code", "top"), source = NULL, min_overlap = 1L, coders = NULL, code = NULL )qda_intercoder_diff( other, unit = c("segment", "document"), level = c("code", "top"), source = NULL, min_overlap = 1L, coders = NULL, code = NULL )
other |
Path to the second coder's |
unit |
|
level |
|
source |
Optional documents (ids or names of the active project) to compare; default all documents both projects contain. |
min_overlap |
Minimum number of characters a coding must overlap a unit to count. |
coders |
Two names for the coders; default the two file names. |
code |
Optional code path (or label of a top-level code) to show only its disagreements. |
A tibble: source_id, source, segment, start, end (the
unit in the active project), code (path), coded_by ("A" or
"B"), coder (name), text (text of the unit), b_codings (number
of B's codings that can be taken over with qda_intercoder_adopt()).
dir <- tempfile() qda_open(file.path(dir, "coder_a.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Team") b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda")) qda_code(1, "Team", segment = 3) qda_close() qda_open(b); qda_code(1, "Team", segment = 4); qda_close() qda_open(file.path(dir, "coder_a.jellyqda")) qda_intercoder_diff(b)[, c("segment", "code", "coded_by")] qda_close()dir <- tempfile() qda_open(file.path(dir, "coder_a.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Team") b <- qda_intercoder_copy(file.path(dir, "coder_b.jellyqda")) qda_code(1, "Team", segment = 3) qda_close() qda_open(b); qda_code(1, "Team", segment = 4); qda_close() qda_open(file.path(dir, "coder_a.jellyqda")) qda_intercoder_diff(b)[, c("segment", "code", "coded_by")] qda_close()
Every occurrence of a word or phrase with the text to its left and right – to see how a term is used across all interviews.
qda_kwic( pattern, source = NULL, width = 50, ignore_case = TRUE, whole_word = TRUE )qda_kwic( pattern, source = NULL, width = 50, ignore_case = TRUE, whole_word = TRUE )
pattern |
Word or phrase (plain text). |
source |
Optional source id or name. |
width |
Characters of context on each side. |
ignore_case |
Logical. |
whole_word |
Logical; only whole words. |
A tibble: source_id, source, segment, start, end,
left, match, right.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_kwic("colleague", width = 30) qda_kwic("inform", whole_word = FALSE) # also inside words ("informatics") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_kwic("colleague", width = 30) qda_kwic("inform", whole_word = FALSE) # also inside words ("informatics") qda_close()
jellyqda's user interface and the HTML report are available in English and
German. By default the language follows the option jellyqda.lang or,
if unset, the system locale (German locale: German, otherwise English).
In the app the language can also be switched with the EN/DE button in the
toolbar.
qda_language(lang = NULL)qda_language(lang = NULL)
lang |
|
The current language code, invisibly when setting it.
qda_language() # current language old <- qda_language("de") qda_language("en")qda_language() # current language old <- qda_language("de") qda_language("en")
Counts of codings per code (rows) and source (columns), like the MAXQDA Code Matrix Browser – in R simply a crossing table.
qda_matrix()qda_matrix()
A tibble: code plus one column per source with the counts.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_code_add("Motivation") qda_code(1, "Motivation", segment = 2) qda_code(2, "Motivation", segment = 1) qda_matrix() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_code_add("Motivation") qda_code(1, "Motivation", segment = 2) qda_code(2, "Motivation", segment = 1) qda_matrix() qda_close()
Creates a memo of one of four kinds. The kind follows from the arguments
unless given explicitly: start/end (with source) -> passage memo,
only source -> document memo, code -> code memo, nothing -> project
memo (as in earlier versions: qda_memo_add("text")).
qda_memo_add( text_, source = NULL, start = NULL, end = NULL, code = NULL, title = "", kind = NULL )qda_memo_add( text_, source = NULL, start = NULL, end = NULL, code = NULL, title = "", kind = NULL )
text_ |
Memo text. |
source |
Source id or name (passage and document memos). |
start, end
|
1-based character offsets of the passage (passage memos). |
code |
Code id or label (code memos). |
title |
Optional short title. |
kind |
Optional, one of |
Invisibly, a one-row tibble with the new memo.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_memo_add("Sharpen question 3 of the guide") # project qda_memo_add("Calm atmosphere, interviewee nervous", source = 1) # document qda_memo_add("Only code explicit statements", code = "SME", title = "Coding rule") # code qda_memo_add("Turning point?", source = 1, start = 120, end = 200) # passage qda_memos() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_memo_add("Sharpen question 3 of the guide") # project qda_memo_add("Calm atmosphere, interviewee nervous", source = 1) # document qda_memo_add("Only code explicit statements", code = "SME", title = "Coding rule") # code qda_memo_add("Turning point?", source = 1, start = 120, end = 200) # passage qda_memos() qda_close()
Delete a memo
qda_memo_delete(memo)qda_memo_delete(memo)
memo |
Memo id. |
Invisibly NULL.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) m <- qda_memo_add("A thought") qda_memo_delete(m$id) nrow(qda_memos()) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) m <- qda_memo_add("A thought") qda_memo_delete(m$id) nrow(qda_memos()) qda_close()
Edit an existing memo
qda_memo_update(memo, text_ = NULL, title = NULL)qda_memo_update(memo, text_ = NULL, title = NULL)
memo |
Memo id. |
text_ |
New memo text ( |
title |
New title ( |
Invisibly, a one-row tibble with the updated memo.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) m <- qda_memo_add("A first thought") qda_memo_update(m$id, text_ = "A better thought", title = "Idea") qda_memos()[, c("title", "text_")] qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) m <- qda_memo_add("A first thought") qda_memo_update(m$id, text_ = "A better thought", title = "Idea") qda_memos()[, c("title", "text_")] qda_close()
List memos
qda_memos(kind = NULL, source = NULL, code = NULL)qda_memos(kind = NULL, source = NULL, code = NULL)
kind |
Optional filter: one or more of |
source |
Optional source id/name: only memos referring to it (passage and document memos). |
code |
Optional code id/label: only memos of this code. |
A tibble: id, kind, title, text_, source_id, source,
code_id, code, start, end, passage (the memo'd text for
passage memos), created_at, updated_at.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_memo_add("Research diary entry") qda_memo_add("Definition of SME", code = "SME") qda_memos() qda_memos(kind = "code") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_memo_add("Research diary entry") qda_memo_add("Definition of SME", code = "SME") qda_memos() qda_memos(kind = "code") qda_close()
Takes documents, codes, codings, memos, variables, summary grid cells and cases from another jellyqda project – typically the copy a team member coded – into the open project. Documents are recognised by their text, codes by their path; nothing that is already there is added twice, and where both projects have a different value (a variable, a summary) the open project keeps its own and the difference is counted as a conflict.
qda_merge(other, add_documents = TRUE, dry_run = FALSE, backup = TRUE)qda_merge(other, add_documents = TRUE, dry_run = FALSE, backup = TRUE)
other |
Path to the other |
add_documents |
Logical; also add documents that exist only in the
other project (default |
dry_run |
Logical; only report what would be merged. |
backup |
Logical; write a backup before merging (default |
Run it with dry_run = TRUE first to see what would be added. A real
merge writes a backup of the open project first (qda_backup()); it is
not undone with qda_undo() but by restoring that backup. The other file
is only read.
A tibble with one row per kind of data: what, added,
already (already there, skipped) and conflicts. Attributes "file"
and "dry_run".
qda_intercoder_copy() to hand out copies,
qda_intercoder_adopt() to take over single codings
dir <- tempfile() qda_open(file.path(dir, "team.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Team") copy <- qda_intercoder_copy(file.path(dir, "anna.jellyqda")) # a copy for Anna qda_code(1, "Team", segment = 3) # you code document 1 qda_close() qda_open(copy) # Anna codes document 2 qda_code(2, "Career path", segment = 2); qda_code_add("Motivation") qda_code(2, "Motivation", segment = 4) qda_close() qda_open(file.path(dir, "team.jellyqda")) qda_merge(copy, dry_run = TRUE) # what would happen? qda_merge(copy) qda_codings()[, c("source", "code")] qda_close()dir <- tempfile() qda_open(file.path(dir, "team.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Team") copy <- qda_intercoder_copy(file.path(dir, "anna.jellyqda")) # a copy for Anna qda_code(1, "Team", segment = 3) # you code document 1 qda_close() qda_open(copy) # Anna codes document 2 qda_code(2, "Career path", segment = 2); qda_code_add("Motivation") qda_code(2, "Motivation", segment = 4) qda_close() qda_open(file.path(dir, "team.jellyqda")) qda_merge(copy, dry_run = TRUE) # what would happen? qda_merge(copy) qda_codings()[, c("source", "code")] qda_close()
Opens the SQLite project file at path (created together with its schema
if it does not exist yet) and makes it the active project for all other
qda_*() functions. The .jellyqda extension is appended if missing.
qda_open(path, auto_snapshot = 25)qda_open(path, auto_snapshot = 25)
path |
Path to the project file, e.g. |
auto_snapshot |
Integer. After this many logged actions an automatic
backup snapshot is written (see |
Invisibly, a one-row tibble with project information
(see qda_project()).
project <- file.path(tempfile(), "example.jellyqda") qda_open(project) qda_project() qda_close()project <- file.path(tempfile(), "example.jellyqda") qda_open(project) qda_project() qda_close()
Shows qda_cooccurrence() as a triangle of code x code cells: the darker
a cell, the more often the two codes occur together; the number is in the
cell. Codes are in code-tree order, each with the colour of its code
family. Hovering a cell shows the details; in the app a click lists the
passages (qda_cooccurrence_passages()).
qda_plot_cooccurrence( x = NULL, measure = c("n", "jaccard"), max_codes = 30, file = NULL, ... )qda_plot_cooccurrence( x = NULL, measure = c("n", "jaccard"), max_codes = 30, file = NULL, ... )
x |
Result of |
measure |
|
max_codes |
Show at most this many codes (the most frequent ones). |
file |
Optional path: write the SVG there instead of returning it. |
... |
Arguments for |
The SVG as an HTML object (printing shows it in the RStudio
Viewer), or invisibly file.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5) qda_code(1, "Motivation", segment = 7); qda_code(1, "Team", segment = 7) svg <- qda_plot_cooccurrence() qda_plot_cooccurrence(file = tempfile(fileext = ".svg")) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5) qda_code(1, "Motivation", segment = 7); qda_code(1, "Team", segment = 7) svg <- qda_plot_cooccurrence() qda_plot_cooccurrence(file = tempfile(fileext = ".svg")) qda_close()
Draws qda_cooccurrence() as a network: every code is a circle (colour
of its code family, size = how often it was used), a line connects two
codes that occur together (thicker = more often). With layout = "circle" the codes sit in code-tree order around a circle, so code
families stay next to each other; layout = "force" pulls related codes
together. Hovering shows the numbers; in the app a click on a line lists
the passages.
qda_plot_network( x = NULL, min_n = 1L, layout = c("circle", "force"), size = 560, file = NULL, ... )qda_plot_network( x = NULL, min_n = 1L, layout = c("circle", "force"), size = 560, file = NULL, ... )
x |
Result of |
min_n |
Draw only lines for pairs that occur together at least this often. |
layout |
|
size |
Width and height of the drawing area in pixels. |
file |
Optional path: write the SVG there instead of returning it. |
... |
Arguments for |
The SVG as an HTML object (printing shows it in the RStudio
Viewer), or invisibly file.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5) qda_code(1, "Motivation", segment = 7); qda_code(1, "Team", segment = 7) svg <- qda_plot_network() svg <- qda_plot_network(layout = "force", level = "top") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5) qda_code(1, "Motivation", segment = 7); qda_code(1, "Team", segment = 7) svg <- qda_plot_network() svg <- qda_plot_network(layout = "force", level = "top") qda_close()
Draws qda_portrait(): every document is a strip from its start (left)
to its end (right), every segment a block as wide as its share of the
text, coloured by the codes it contains. Strips of several documents
underneath each other show where in the interviews the themes come up.
Hovering a block names the segment and its codes; in the app a click
jumps to the segment.
qda_plot_portrait(x = NULL, width = 760, interactive = TRUE, file = NULL, ...)qda_plot_portrait(x = NULL, width = 760, interactive = TRUE, file = NULL, ...)
x |
Result of |
width |
Width of the strips in pixels. |
interactive |
Logical; |
file |
Optional path: write the SVG there instead of returning it. |
... |
Arguments for |
The SVG as an HTML object (printing shows it in the RStudio
Viewer), or invisibly file.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Team") qda_code(1, "Career path", segment = 3) qda_code(2, "Team", segment = 5) svg <- qda_plot_portrait() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Team") qda_code(1, "Career path", segment = 3) qda_code(2, "Team", segment = 5) svg <- qda_plot_portrait() qda_close()
Walks through every document segment by segment (in text order) and
lists the codes each segment contains. Drawn as a strip per document
(qda_plot_portrait()), this shows at a glance where in an interview a
theme comes up – at the start, throughout, only at the end – and makes
interviews comparable.
qda_portrait(source = NULL, level = c("top", "code"), min_overlap = 1L)qda_portrait(source = NULL, level = c("top", "code"), min_overlap = 1L)
source |
Optional documents (ids or names); default all. |
level |
|
min_overlap |
Minimum number of characters a coding must overlap a segment to count. |
A tibble with one row per segment and code (segments without
codes have code = NA): source_id, source, segment, start,
end, pos (share of the document before the segment, 0–1),
width (share of the document the segment takes), code, color.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation") qda_code(1, "Career path", segment = 3) qda_code(1, "Motivation", segment = 7) qda_portrait() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation") qda_code(1, "Career path", segment = 3) qda_code(1, "Motivation", segment = 7) qda_portrait() qda_close()
Show information about the active project
qda_project()qda_project()
A one-row tibble: project file, size, row counts of all tables and the default backup directory.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_project() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_project() qda_close()
Reads the files like qda_import() would and counts how often each name
of the key list would be replaced – nothing is imported. Use it to check
the key list: a name with 0 hits is perhaps spelled differently in the
transcript.
qda_pseudonymise_preview(files, pseudonyms)qda_pseudonymise_preview(files, pseudonyms)
files |
Paths of |
pseudonyms |
Key list, see |
A tibble: file, original, replacement, n (replacements).
f <- file.path(tempdir(), "interview_anna.txt") writeLines(c("I: Anna, how did you start?", "Anna: In Hamburg, with Ben."), f) qda_pseudonymise_preview(f, c("Anna" = "[Person A]", "Hamburg" = "[City 1]", "Ben" = "[Person B]"))f <- file.path(tempdir(), "interview_anna.txt") writeLines(c("I: Anna, how did you start?", "Anna: In Hamburg, with Ben."), f) qda_pseudonymise_preview(f, c("Anna" = "[Person A]", "Hamburg" = "[City 1]", "Ben" = "[Person B]"))
A key list says which real names (people, places, organisations ...) are replaced by which placeholder. It can be
a CSV, TSV or Excel file with two columns: original, replacement (a header line is fine),
text lines like "Anna Schmidt = [Person A]",
a named character vector c("Anna Schmidt" = "[Person A]").
qda_pseudonyms(x, whole_word = TRUE, ignore_case = FALSE)qda_pseudonyms(x, whole_word = TRUE, ignore_case = FALSE)
x |
The key list (see above). |
whole_word |
Logical; only replace whole words (default |
ignore_case |
Logical; also replace "ANNA" and "anna" (default
|
Longer names are replaced first, so "Anna Schmidt" wins over "Anna".
A named character vector (names = originals) with the matching
options as attributes; pass it to qda_import(pseudonyms = ...).
qda_import(), qda_pseudonymise_preview()
key <- qda_pseudonyms(c("Anna Schmidt = [Person A]", "Hamburg = [City 1]", "Anna = [Person A]")) key f <- file.path(tempdir(), "key.csv") writeLines(c("original,replacement", "Anna Schmidt,[Person A]"), f) qda_pseudonyms(f)key <- qda_pseudonyms(c("Anna Schmidt = [Person A]", "Hamburg = [City 1]", "Anna = [Person A]")) key f <- file.path(tempdir(), "key.csv") writeLines(c("original,replacement", "Anna Schmidt,[Person A]"), f) qda_pseudonyms(f)
Lists every passage (segment or document) that contains all codes in
all, at least one code in any and none of the codes in
none – for example "Workload and Leadership in the same speaker turn,
but not Family", only among documents with role = "nurse". This answers
questions such as "how do participants talk about A when B comes up too?"
and compares subgroups.
qda_query( all = NULL, any = NULL, none = NULL, vars = NULL, unit = c("segment", "document"), subcodes = TRUE, source = NULL, min_overlap = 1L, case = NULL )qda_query( all = NULL, any = NULL, none = NULL, vars = NULL, unit = c("segment", "document"), subcodes = TRUE, source = NULL, min_overlap = 1L, case = NULL )
all, any, none
|
Codes (paths such as |
vars |
Optional filter on document variables: a named list, e.g.
|
unit |
|
subcodes |
Logical; a code also counts when one of its subcodes is
coded (default |
source |
Optional documents (ids or names) to search. |
min_overlap |
Minimum number of characters a coding must overlap a passage. |
case |
Optional cases (ids or names, see |
A tibble, one row per hit: source_id, source, segment,
start, end, codes (the queried codes present), text. Attribute
"info": the query and how many passages / documents were searched.
qda_query_to_code(), qda_cooccurrence()
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5) qda_code(1, "Motivation", segment = 7); qda_code(2, "Team", segment = 5) qda_source_set_var(1, "role", "project lead") qda_query(all = c("Career path", "Motivation")) # both in the same segment qda_query(any = c("Motivation", "Team"), none = "Career path") qda_query(any = "Motivation", vars = list(role = "project lead")) qda_case_add("Person A"); qda_case_assign("Person A", 1, segment = 5:7) qda_query(any = "Motivation", case = "Person A") # only this person's passages qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", c("interview_01.txt", "interview_02.md"), package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation"); qda_code_add("Team") qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5) qda_code(1, "Motivation", segment = 7); qda_code(2, "Team", segment = 5) qda_source_set_var(1, "role", "project lead") qda_query(all = c("Career path", "Motivation")) # both in the same segment qda_query(any = c("Motivation", "Team"), none = "Career path") qda_query(any = "Motivation", vars = list(role = "project lead")) qda_case_add("Person A"); qda_case_assign("Person A", 1, segment = 5:7) qda_query(any = "Motivation", case = "Person A") # only this person's passages qda_close()
Turns the result of qda_query() into codings: every hit (segment or
document) is coded with code. A code that does not exist yet is created
first (as a top-level code, or below parent). The codings form one action:
Ctrl+Z / qda_undo() removes them again (and a second undo the new code).
Hits that already carry this code over the same range are skipped.
qda_query_to_code(hits, code, parent = NULL)qda_query_to_code(hits, code, parent = NULL)
hits |
Result of |
code |
Code (path or unique label) or the label of a new code. |
parent |
For a new code: its parent code (optional). |
Invisibly, a tibble of the new codings.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation") qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5) hits <- qda_query(all = c("Career path", "Motivation")) qda_query_to_code(hits, "Career and motivation") qda_codings()[, c("code", "start", "end")] qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path"); qda_code_add("Motivation") qda_code(1, "Career path", segment = 5); qda_code(1, "Motivation", segment = 5) hits <- qda_query(all = c("Career path", "Motivation")) qda_query_to_code(hits, "Career and motivation") qda_codings()[, c("code", "start", "end")] qda_close()
Re-applies the action that the last qda_undo() reverted. Like in every
editor, the redo list is cleared as soon as a new action is done.
qda_redo()qda_redo()
Invisibly, a one-row tibble redone (action) and detail.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_undo() # oops qda_redo() # back again qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_undo() # oops qda_redo() # back again qda_close()
Makes start..end one segment (e.g. a passage marked in the app).
Segments it overlaps are shortened; a segment that contains it entirely
is split into up to three parts. Whitespace at the edges is trimmed.
qda_segment_define(source, start, end)qda_segment_define(source, start, end)
source |
Source id or unique name. |
start, end
|
1-based inclusive character offsets. |
Invisibly, the new segments.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segment_define(1, start = 120, end = 200) qda_source_segments(1) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segment_define(1, start = 120, end = 200) qda_source_segments(1) qda_close()
Merge a segment with the following one
qda_segment_merge(source, segment)qda_segment_merge(source, segment)
source |
Source id or unique name. |
segment |
Segment number; it is merged with segment |
Invisibly, the new segments.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segment_merge(1, 1) # segments 1 + 2 -> 1 qda_source_segments(1) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segment_merge(1, 1) # segments 1 + 2 -> 1 qda_source_segments(1) qda_close()
The segment containing at is split so that a new segment starts at
at (whitespace at the cut is trimmed away). Undoable.
qda_segment_split(source, at)qda_segment_split(source, at)
source |
Source id or unique name. |
at |
1-based character position where the new segment starts. |
Invisibly, the new segments.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segment_split(1, at = 100) qda_source_segments(1) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segment_split(1, at = 100) qda_source_segments(1) qda_close()
The "Retrieved Segments" view: every passage that received this code, with source, offsets, extracted text and memo.
qda_segments(code)qda_segments(code)
code |
Code id or unique label. |
A tibble: id, source_id, source, code_id, code, start,
end, text, memo.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_code(1, "SME", segment = 3) qda_segments("SME") qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_code(1, "SME", segment = 3) qda_segments("SME") qda_close()
Deletes the stored segments of a document; afterwards the automatic
paragraph segmentation of earlier jellyqda versions applies again.
Undoable with qda_undo().
qda_segments_reset(source)qda_segments_reset(source)
source |
Source id or unique name. |
Invisibly, the segments now in effect.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segments_set(1, "line") qda_segments_reset(1) # back to blank-line segments qda_source_segments(1) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segments_set(1, "line") qda_segments_reset(1) # back to blank-line segments qda_source_segments(1) qda_close()
Replaces the segments of a document. Codings are not affected (they are
stored by character offsets), only the segment numbers change.
Undoable with qda_undo().
qda_segments_set( source, rule = c("blankline", "speaker", "line"), pattern = NULL )qda_segments_set( source, rule = c("blankline", "speaker", "line"), pattern = NULL )
source |
Source id or unique name. |
rule |
|
pattern |
For |
Invisibly, the new segments (tibble segment, start, end).
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segments_set(1, "line") # one segment per line qda_segments_set(1, "speaker") # speaker turns like "[00:01:12] P: ..." qda_source_segments(1) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_segments_set(1, "line") # one segment per line qda_segments_set(1, "speaker") # speaker turns like "[00:01:12] P: ..." qda_source_segments(1) qda_close()
Delete a variable from a source
qda_source_del_var(source, key)qda_source_del_var(source, key)
source |
Source id or name. |
key |
Variable name to remove. |
Invisibly, the remaining named character vector.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_source_set_var(1, "age", "34") qda_source_del_var(1, "age") qda_source_vars(1) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_source_set_var(1, "age", "34") qda_source_del_var(1, "age") qda_source_vars(1) qda_close()
Segments of a source and where they come from
qda_source_segments(source)qda_source_segments(source)
source |
Source id or unique name. |
A tibble: segment (number as shown in the app, "Seg N"),
start, end (1-based character offsets), text. Attribute
"origin": "automatisch" (blank lines, nothing stored) or
"gespeichert".
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_source_segments(1) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_source_segments(1) qda_close()
Set a variable (case attribute) on a source
qda_source_set_var(source, key, value)qda_source_set_var(source, key, value)
source |
Source id or name. |
key |
Variable name (e.g. |
value |
Value (character). |
Invisibly, the named character vector of all variables.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_source_set_var(1, "age", "34") qda_source_set_var(1, "role", "project lead") qda_source_vars(1) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_source_set_var(1, "age", "34") qda_source_set_var(1, "role", "project lead") qda_source_vars(1) qda_close()
Get the variables (case attributes) of a source
qda_source_vars(source)qda_source_vars(source)
source |
Source id or name. |
Named character vector, e.g. c(age = "32", gender = "f").
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_source_set_var(1, "age", "34") qda_source_vars(1) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_source_set_var(1, "age", "34") qda_source_vars(1) qda_close()
List all imported sources
qda_sources()qda_sources()
A tibble with one row per source: id, name, format, chars,
segments (numbered paragraphs, see qda_view()), coded_chars and
imported_at.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_sources() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_sources() qda_close()
Progress statistics of the active project
qda_stats()qda_stats()
A named list of tibbles:
overall: one row – number of sources, codes, codings, memos, events,
total characters, coded characters (union of coding intervals) and
pct_coded
per_code: one row per code – n_codings, coded chars
per_source: one row per source – chars, coded_chars, pct_coded
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_stats() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_stats() qda_close()
Get one summary cell (or all summaries)
qda_summaries(code = NULL, source = NULL)qda_summaries(code = NULL, source = NULL)
code |
Optional code id/label; with |
source |
Optional source id/name. |
A tibble: code_id, code, source_id, source, text_,
updated_at.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_summary_set("SME", 1, "Strongly shaped by the first employer.") qda_summaries() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_summary_set("SME", 1, "Strongly shaped by the first employer.") qda_summaries() qda_close()
Creates or overwrites the summary of one cell. Empty text clears the cell.
qda_summary_set(code, source, text_)qda_summary_set(code, source, text_)
code |
Code id or unique label. |
source |
Source id or unique name. |
text_ |
Summary text. |
Invisibly, a one-row tibble with the stored summary.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_summary_set("SME", 1, "Strongly shaped by the first employer.") qda_summaries() qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_summary_set("SME", 1, "Strongly shaped by the first employer.") qda_summaries() qda_close()
Reads a survey export (CSV or Excel) and suggests a role for every
column: the respondent id, columns with open answers ("text"),
columns to keep as document variables (few distinct values, e.g. age
group or field of study) and columns to ignore (time stamps, IP
addresses, ...). Pass the suggestions – or your own choice – to
qda_import_survey().
qda_survey_columns(file, sheet = 1, name = NULL)qda_survey_columns(file, sheet = 1, name = NULL)
file |
Path to a |
sheet |
Excel sheet (number or name). |
name |
File name to show (e.g. the original name of an upload). |
A tibble, one row per column: column, role, answers
(non-empty cells), distinct, mean_chars, example. Attribute
"rows": number of respondents.
f <- system.file("extdata", "survey_demo.csv", package = "jellyqda") qda_survey_columns(f)f <- system.file("extdata", "survey_demo.csv", package = "jellyqda") qda_survey_columns(f)
Reverts the most recent action. Every content change can be undone:
codings (add, delete, memo), memos, codes (add, rename, move and
delete – including all sub-codes, codings and summaries that were
removed with it), document variables, summaries and segment changes.
System actions (import, export, backup, auto_snapshot, project
open/close) are not undoable. Repeated calls walk backwards through the
history; qda_redo() re-applies undone actions. In the app: button
"Undo" or Ctrl+Z, redo with Ctrl+Y.
qda_undo()qda_undo()
Actions recorded by older jellyqda versions (without snapshot) are reverted with the previous per-action logic where possible.
Invisibly, a one-row tibble: undone (action that was reverted) and
detail (human-readable description).
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Theme A") qda_code(1, "Theme A", segment = 1) qda_undo() # removes the coding again qda_undo() # removes the code again qda_redo() # the code is back qda_codes()$label qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Theme A") qda_code(1, "Theme A", segment = 1) qda_undo() # removes the coding again qda_undo() # removes the code again qda_redo() # the code is back qda_codes()$label qda_close()
Renders the frozen text of a source as HTML: every paragraph is a numbered
segment (the unit you address in qda_code()), and all codings are
highlighted in the color of their code. In RStudio the HTML opens in the
Viewer pane; elsewhere it is written to a temp file (opened in a browser
when interactive).
qda_view(source, open = TRUE)qda_view(source, open = TRUE)
source |
Source id or unique name. |
open |
Logical; open the HTML in the RStudio Viewer / browser. |
Invisibly, the HTML string.
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) html <- qda_view(1, open = FALSE) # open = TRUE shows it in the Viewer substr(html, 1, 80) qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) html <- qda_view(1, open = FALSE) # open = TRUE shows it in the Viewer substr(html, 1, 80) qda_close()
Counts the words of all documents, one document, or only of the passages coded with a code (incl. its subcodes) – an entry point for inductive work. Words are lower-cased; numbers, time stamps and stop words are left out.
qda_words(source = NULL, code = NULL, n = 50, min_chars = 3, stopwords = TRUE)qda_words(source = NULL, code = NULL, n = 50, min_chars = 3, stopwords = TRUE)
source |
Optional source id or name. |
code |
Optional code id or label: only words inside its codings (and those of its subcodes). |
n |
Number of words to return (most frequent first); |
min_chars |
Minimum word length. |
stopwords |
|
A tibble: word, n (occurrences), sources (in how many
documents).
qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_words(n = 10) qda_words(code = "Career path") # only within these codings qda_close()qda_open(file.path(tempfile(), "example.jellyqda")) qda_import(system.file("extdata", "interview_01.txt", package = "jellyqda")) qda_code_add("Career path") qda_code_add("SME", parent = "Career path") qda_code(1, "SME", segment = 2) qda_words(n = 10) qda_words(code = "Career path") # only within these codings qda_close()