Opens a Shiny dashboard to explore collected response data alongside the
instrument definition. Use this interface after response collection for
analysis and quality control. Use launch_builder() to design new
questionnaires. The dashboard includes five panels:
Usage
launch_dashboard(
instrument = NULL,
responses = NULL,
port = NULL,
host = "127.0.0.1",
launch.browser = interactive()
)Arguments
- instrument
An
sframeobject. Required. Callinglaunch_dashboard()with no instrument errors with guidance; uselaunch_dashboard_demo()for the bundled demo orlaunch_studio()to upload interactively.- responses
A
data.frameortibbleof survey responses, as produced byread_responses()orread_sheet_responses(). When NULL the dashboard opens with instrument metadata and no response summaries.- port
Integer or NULL. TCP port for the Shiny server. When NULL, Shiny selects an available port automatically.
- host
Character. Host address passed to
shiny::runApp(). Defaults to"127.0.0.1".- launch.browser
Logical. Whether to open the dashboard in the default browser automatically. Defaults to
TRUEin interactive sessions.
Details
- Overview
Response count, date range, and instrument metadata.
- Items
Per-item frequency bar charts, histograms, and tabulated frequency counts for choice-type questions.
- Scales
Scale score distributions with mean overlay, and a summary table of scale definitions.
- Quality
Attention check pass rates for each check defined in the instrument.
- Raw data
Scrollable response table with a CSV download button.
The dashboard is read-only and takes its data from R. It has no upload
screen, so pass instrument and responses directly. To open and upload
data interactively, use launch_studio(), which includes this same
dashboard as its Dashboard tab. For a quick look at bundled demo data, use
launch_dashboard_demo().
Examples
if (FALSE) { # \dontrun{
# For the bundled demo, use launch_dashboard_demo().
# To upload data interactively, use launch_studio().
# Open the dashboard with your own instrument and responses
instr <- read_sframe(
system.file("extdata", "tourism_services_demo.sframe",
package = "surveyframe")
)
responses <- read_responses(
system.file("extdata", "tourism_services_responses.csv",
package = "surveyframe"),
instr,
respondent_id = "respondent_id",
submitted_at = "submitted_at",
meta_cols = "started_at"
)
launch_dashboard(instr, responses)
} # }