Documentation ¶
Index ¶
- Constants
- type Choice
- type QType
- type Question
- func (q *Question) CSVCols(useCompatNames bool) []string
- func (q *Question) OrderedChoices() bool
- func (q *Question) RColType() string
- func (q *Question) ResponseChoices() []Choice
- func (q *Question) ResponseCols(r *Response) []string
- func (q *Question) SubQuestions() []Choice
- func (q *Question) Type() QType
- type Response
- type Survey
Constants ¶
const Version = "0.4"
Version of libsp
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Choice ¶
type Choice struct { ID string Label string VarName string // short variable name for use in analysis scripts HasText bool }
Choice represents one possible response to a survey question
type QType ¶
type QType int
QType represents the type of a survey question
type Question ¶
Question represents a survey question
func (*Question) CSVCols ¶
CSVCols returns a slice of string holding the ordered CSV column names for this question
func (*Question) OrderedChoices ¶
OrderedChoices returns true if this question has RecodeValues set, indicating that order matters
func (*Question) ResponseChoices ¶
ResponseChoices returns a slice of Choice holding the ordered response choices available to survey respondents
func (*Question) ResponseCols ¶
ResponseCols returns a slice of string holding the ordered responses in r for this question
func (*Question) SubQuestions ¶
SubQuestions returns a slice of Choice holding the subquestions asked as part of this question (e.g., rows of a matrix question)
type Response ¶
type Response struct { ID string Progress int Duration int Finished bool RecordedOn time.Time // contains filtered or unexported fields }
Response models a Qualtrics participant response
type Survey ¶
type Survey struct { Title string Description string Status string CreatedOn time.Time LaunchedOn time.Time ModifiedOn time.Time QuestionOrder []string Questions map[string]*Question Responses []*Response UseCompatNames bool // contains filtered or unexported fields }
Survey represents a survey, including its questions, potential responses, and meta-data
func (*Survey) UnmarshalJSON ¶
UnmarshalJSON fills the fields of s with the data found in b