plot_richness {novelqualcodes}R Documentation

Plot richness of interview codes over time

Description

The full definition of novel and duplicate codes is in score_codes(). Briefly, 'novel' codes are topics/ideas/concepts that were not mentioned in previous interviews, whereas 'duplicate' codes are topics that other interviews have discussed previously.

Usage

plot_richness(
  score_df,
  refinements = integer(0),
  col = list(stroke_novel = "black", stroke_duplicate = "gray80", fill_novel = "black",
    fill_duplicate = "gray90")
)

Arguments

score_df

(Dataframe) A dataframe of scored codes, as generated by score_codes().

refinements

Either a list object generated by import_field_notes(), or an Integer vector that lists when (in terms of interview sequence) refinements were made to the interview questions. For example, c(10, 15) means that interview questions were revised twice: First before the 10th interview, and then again before the 15th interview.

col

(List) A List containing named Character vectors. Accepted names are:

  • stroke_novel and stroke_duplicate control line colours for novel and duplicate codes.

  • fill_novel and fill_duplicate control fill colours for novel and duplicate codes.

Details

Some interviews will touch on many different topics and generate many different codes, whereas other interviews will be brief or limited. We call this 'richness'. This plot complements plot_novelty() by visualising the richness of each interview in terms of novel and duplicate codes, in context with any refinements to interview questions that were made (marked by stars underneath each bar). By examining this plot together with their field notes, researchers can get insight into the effects of their refinements and the richness of the data.

Value

A ggplot object.

See Also

score_codes(), import_field_notes(), plot_novelty(), save_last_plot()

Examples

# Field notes and coding matrices included with the package
path_to_notes    <- system.file("insect_study/records/refinements.xlsx", package = "novelqualcodes")
path_to_matrices <- system.file("insect_study/matrices/", package = "novelqualcodes")

# Import the data
my_refinements <- import_field_notes(path_to_notes)
my_matrices    <- import_coding_matrices(path_to_matrices)

# Score novel and duplicate codes
my_scores <- score_codes(my_matrices)

# Generate a plot with no refinements
plot_richness(score_df = my_scores)

# Generate a plot using scored codes and imported refinements
plot_richness(score_df = my_scores, refinements = my_refinements)

# Generate a plot using scored codes and a vector of refinement times
plot_richness(score_df = my_scores, refinements = c(4, 8, 10))


[Package novelqualcodes version 0.13.1 Index]