.js-plotly-plot .plotly svg a {
fill: inherit !important
}
document.addEventListener("DOMContentLoaded", function() {
const plotElements = document.querySelectorAll('.plotly.html-widget'); // Gets all Plotly widgets
const firstPlot = plotElements[0]; // Gets the first Plotly plot
.update(firstPlot).then(gd => {
Plotly.on('plotly_treemapclick', () => false); // Example: removing treemap click event
gd;
}); })
records_wide <- readRDS("../sober_rubric/raw_data/preprocessed_records.rds")
psyctests_info <- readRDS("../sober_rubric/raw_data/psyctests_info.rds")
psyctests_info <- psyctests_info %>%
left_join(records_wide %>% select(DOI, Acronym = first_acronym), by = "DOI") %>%
mutate(shortName = coalesce(Acronym, Name)) %>%
mutate(shortName = case_when(
Name == "trail making test" ~ "TMT",
Name == "alcohol use disorders identification test" ~ "AUDIT",
Name == "perceived stress scale" ~ "PSS",
Name == "perceived stress scale" ~ "PSS",
Name == "beck anxiety inventory" ~ "BAI",
Name == "positive and negative affect scale" ~ "PANAS-B",
Name == "center for epidemiological studies depression scale" ~ "CESD",
Name == "stroop color and word test" ~ "SCWT",
Name == "clinician-administered ptsd scale" ~ "CAPS",
shortName == "WHO WMH-CIDI" ~ "WMH-CIDI",
Name == "barthel index" ~ "ADL",
Name == "stroop color and word test" ~ "SCWT",
TRUE ~ shortName
))
The following plot is called a treemap. In such plots, the area per test is proportional to its usage frequency.
By comparing across the subdisciplines, we can see what higher and lower entropy fields look like visually. High entropy is seen as great fragmentation, i.e. there are many small tiles and many tiles of similar size. Lower fragmentation is apparent when some large tiles reflecting individual measures, such as the Beck Depression Inventory, dominate a field.
p <- treemap_graph(tests, colors = pal)
save_image(p, "figures/treemap_overall.png", width = 1400, height = 700,
scale = 5)
p