Skip to content

willking98/dce-cams

Repository files navigation

Climbing Cam Preferences Survey

This repository contains the code and resources to create a Discrete Choice Experiment (DCE) for understanding preferences regarding climbing camming devices. The experiment is implemented using the surveydown package, and it presents data on attributes: Price, Brand, Condition, and Delivery Time.

Table of Contents

Overview

The survey is designed to explore climbers' preferences for camming devices, exploring on trade-offs between:

  • Price: Cost of the device.
  • Brand: Manufacturer of the device.
  • Condition: New or used.
  • Delivery Time: Time required for delivery.

Participants complete a series of choice tasks where they select their preferred option from three alternatives.

Features

  • Dynamic survey generation using Quarto and R.
  • Customizable DCE design to adjust the attributes and levels.
  • Hosted survey using ShinyApps.io for easy deployment.
  • As this is a demo, no data is collected.

Project Structure

├── app.R                         # Shiny app script to run the survey 
├── data.csv                      # Placeholder for collected survey data 
├── survey.qmd                    # Quarto markdown file for generating the survey 
├── survey.html                   # Generated HTML survey 
├── code/
│   └── make_choice_questions.R   # Script to generate experimental design and choice questions 
├── data/
│   └── choice_questions.csv      # Generated choice tasks for the survey 
├── images/                       # Images used in the survey 
│   ├── bd-cam.jpg 
│   ├── dragon.jpg 
│   ├── totem.jpg 
│   └── wc-friend.jpg 
├── rsconnect/                    # ShinyApps.io deployment configuration 
│   └── shinyapps.io/choices/ 
│       └── dce-cams.dcf          # Deployment settings 
└── survey_files/                 # Supporting files for the survey 
    └── libs/                     # Library files for Quarto and survey styling

Usage

1. Set Up the Survey

  1. Clone this repository:
    git clone https://github.com/your-repo/climbing-cam-survey.git
    cd climbing-cam-survey

Install necessary dependencies (see Dependencies).

2. Generate Choice Questions

Run the script to generate choice tasks:

source("code/make_choice_questions.R")

3. Deploy the Survey

To preview locally, run:

shiny::runApp("app.R")

To deploy online, use the settings in rsconnect/shinyapps.io.

4. Collect and Save Data

Collected responses are stored in data.csv in the root directory.

Dependencies:

  • R 4.3+
  • R Packages:
    • surveydown
    • shiny
    • quarto
    • dplyr
    • tidyr

Install these packages in R:

install.packages(c("surveydown", "shiny", "dplyr", "tidyr"))

Acknowledgments

This project is built using:

  • The surveydown package for survey creation.
  • Quarto for generating dynamic documents.
  • Shiny for deploying interactive web apps.
  • For questions or contributions, feel free to open an issue or submit a pull request.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published