Web application: Dutch modality exclusivity norms
Authors: Pablo Bernabeu
Abstract: This table uses the 'reactable' package to allow filtering the columns based on partial text matching. The titles of some columns also include tooltips that explain the content,
inflected_prop = colDef(
filterable=TRUE, minWidth = 140,
header = with_tooltip('Inflected adjective',
Adjectives inflected for masculine and feminine nouns.')),
as well as including coloured bars to visualise some columns,
Auditory = colDef(
header = with_tooltip('Auditory Rating',
'Mean rating of each word on the auditory modality across participants.'),
cell = function(value) {
width <- paste0(value / max(table_data$Auditory) * 100, "%")
value = sprintf("%.2f", round(value,2)) # Round to two digits, keeping trailing zeros
bar_chart(value, width = width, fill = '#ff3030')
},
align = 'left'),
and finally including a numeric column in which the values in each cell are coloured according to three ranges.
Perceptualstrength = colDef(
header = with_tooltip('Perceptual Strength',
'Highest rating across modalities (as defined in Lynott & Connell, 2009, 2013). Values colour-coded from lower, in grey, to higher, in violet.'),
cell = function(value) {value = sprintf("%.2f", round(value,2))}, # Round to two digits, keeping trailing zeros
style = function(value) {
if (value < 1.7) {
color = '#9D9D9D'
} else if (value < 3.3) {
color = '#7A5151'
} else {
color = '#541E1E'
}
list(color = color)
}),
One of the hardest nuts to crack was allowing the full functionality of tables—i.e, scaling to screen, frozen header, and vertical and horizontal scrolling—whilst having tweaked the vertical/horizontal orientation of the dashboard sections. Initial clashes were sorted by adjusting the section's CSS styles
Table {#table style="background-color:#FCFCFC;"}
=======================================================================
Inputs {.sidebar style='position:fixed; padding-top: 65px; padding-bottom:30px;'}
-----------------------------------------------------------------------
and by also adjusting the reactable settings.
renderReactable({
reactable(selected_words(),
defaultSorted = list(cat = 'desc', word = 'asc'),
defaultColDef = colDef(footerStyle = list(fontWeight = "bold")),
height = 840, striped = TRUE, pagination = FALSE, highlight = TRUE,
Last, the 'kableExtra' package was used to format the tables contained in the modal (or pop-up) dialogs that are available in the 'Properties' and 'Concepts' tabs, by clicking on the link 'Principal component loadings'.
Full Description:
Table Type: interactive-Shiny
Submission Type: Single Table Example
Table: https://pablobernabeu.shinyapps.io/Dutch-modality-exclusivity-norms
Repo: Dutch-modality-exclusivity-norms-Bernabeu-2018/index.Rmd at master · pablobernabeu/Dutch-modality-exclusivity-norms-Bernabeu-2018 · GitHub
RStudio Cloud:
DT
package used: false
gt
package used: false
reactable
package used: true
flextable
package used: false
huxtable
package used: false
kableExtra
package used: true
Other packages: