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 |
refinements |
Either a list object generated by |
col |
(List) A List containing named Character vectors. Accepted names are:
|
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))