% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/import.R
\name{read_glint_survey}
\alias{read_glint_survey}
\title{Read Viva Glint Survey Data}
\usage{
read_glint_survey(
  file_path,
  emp_id_col = NULL,
  first_name_col = "First Name",
  last_name_col = "Last Name",
  email_col = "Email",
  status_col = "Status",
  completion_date_col = "Survey Cycle Completion Date",
  sent_date_col = "Survey Cycle Sent Date",
  encoding = "UTF-8"
)
}
\arguments{
\item{file_path}{Character string specifying the path to the CSV file}

\item{emp_id_col}{Character string specifying the name of the employee ID
column in the survey export (e.g., \code{"Employee ID"},
\code{"EmployeeID"}, \code{"emp_id"}). The column name varies by
organization. The value is stored in \code{survey$metadata$emp_id_col}
and used automatically by downstream functions so you do not need to
repeat it on every call.}

\item{first_name_col}{Column name for first name (default: "First Name")}

\item{last_name_col}{Column name for last name (default: "Last Name")}

\item{email_col}{Column name for email (default: "Email")}

\item{status_col}{Column name for status (default: "Status")}

\item{completion_date_col}{Column name for survey completion date
(default: "Survey Cycle Completion Date")}

\item{sent_date_col}{Column name for survey sent date
(default: "Survey Cycle Sent Date")}

\item{encoding}{Character string specifying file encoding (default: "UTF-8")}
}
\value{
A \code{glint_survey} object (an S3 class extending \code{list}) with
two elements:
\describe{
\item{data}{A tibble containing all survey responses. Date columns are
parsed automatically from DD-MM-YYYY HH:MM format to POSIXct.}
\item{metadata}{A list with five elements: \code{standard_columns} (the
eight standard Glint column names), \code{questions} (a tibble from
\code{extract_questions()} with one row per question), \code{n_respondents}
(total row count), \code{n_questions} (number of questions), and
\code{file_path} (the path originally supplied).}
}
}
\description{
Reads a Viva Glint survey export CSV file with automatic validation and parsing.
This function validates the file structure, parses dates, and organizes the data
into a structured format ready for analysis.
To import directly from the Viva Glint API, use
\code{read_glint_survey_api()}.
}
\examples{
survey_path <- system.file("extdata", "survey_export.csv", package = "vivaglint")
survey <- read_glint_survey(survey_path, emp_id_col = "EMP ID")
head(survey$data)
survey$metadata$questions
}
