% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dashboard.R
\name{launch_dashboard}
\alias{launch_dashboard}
\title{Launch the interactive response dashboard}
\usage{
launch_dashboard(
  instrument = NULL,
  responses = NULL,
  port = NULL,
  host = "127.0.0.1",
  launch.browser = interactive()
)
}
\arguments{
\item{instrument}{An \code{sframe} object. When \code{NULL}, the bundled tourism
services demo instrument is loaded.}

\item{responses}{A \code{data.frame} or \code{tibble} of survey responses, as
produced by \code{\link[=read_responses]{read_responses()}} or \code{\link[=read_sheet_responses]{read_sheet_responses()}}. When NULL
and \code{instrument} is also NULL, the bundled simulated demo responses are
loaded. When NULL with a user-supplied instrument, the dashboard opens
with instrument metadata and no response summaries.}

\item{port}{Integer or NULL. TCP port for the Shiny server. When NULL,
Shiny selects an available port automatically.}

\item{host}{Character. Host address passed to \code{\link[shiny:runApp]{shiny::runApp()}}. Defaults
to \code{"127.0.0.1"}.}

\item{launch.browser}{Logical. Whether to open the dashboard in the
default browser automatically. Defaults to \code{TRUE} in interactive
sessions.}
}
\value{
Called for its side effect. Returns nothing.
}
\description{
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 \code{\link[=launch_builder]{launch_builder()}} to design new
questionnaires. The dashboard includes five panels:
}
\details{
\describe{
\item{Overview}{Response count, date range, and instrument metadata.}
\item{Items}{Per-item frequency bar charts, histograms, and tabulated
frequency counts for choice-type questions.}
\item{Scales}{Scale score distributions with mean overlay, and a
summary table of scale definitions.}
\item{Quality}{Attention check pass rates for each check defined in the
instrument.}
\item{Raw data}{Scrollable response table with a CSV download button.}
}

The dashboard is read-only. Use it for descriptive exploration after
collecting responses and before running formal analysis with
\code{\link[=run_analysis_plan]{run_analysis_plan()}}.
}
\examples{
\donttest{
# Open the bundled tourism-services response dashboard.
# To build a questionnaire instead, use launch_builder().
launch_dashboard()

# 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)
}
}
\seealso{
\code{\link[=run_analysis_plan]{run_analysis_plan()}}, \code{\link[=quality_report]{quality_report()}}, \code{\link[=score_scales]{score_scales()}}
}
