Skip to content

EPFL-LASUR/Cointrin_Questionnaire

Repository files navigation

R Project Status GitHub License

Cointrin_Questionnaire

This repository contains the code to preprocess and generate plots for the Cointrin questionnaire made by LASUR lab from EPFL.

Project structure

The project is structured like so :
notebook/ : contains the notebooks
R/ : contains the notebooks and R code in general
data/raw : contains the raw data from the questionnaire and shapefiles for map plots. Data from questionnaire is expected to be stored in an sav file.
data/processed : contains processed data. It could be cleaned data or any output of scripts written in R folder. This folder is generated automatically by notebooks.
data/plots: contains the plots generated by the notebooks. This folder is generated automatically by notebooks.

Install

To set up the environment, you need RStudio with the renv package installed.

First, clone the repository. Then, open the Cointrin_Questionnaire.Rproj file with RStudio and restore the dependencies from the lockfile using

renv::restore()

Data sources

The initial raw data is downloaded from Unipark. Unipark lets the user download the survey data in sav.

  1. go to unipark
  2. log in
  3. go to the Cointrin Questionnaire page
  4. download the survey data in sav format

Usage

To use this project, you first have to create the data folder. At the root of this project create a folder named data and then two subfolders named raw and processed. When this is done, drop your raw data data in data/raw folder. When this is done, you are ready to start using the notebooks.
For an optimal usage, the notebooks should be run in that order :

  1. data_cleaning.Rmd. This notebook cleans unwanted users from the dataset.
  2. regrouping.Rmd. This notebook recodes variables in a more usable way.
  3. plots.Rmd. This notebook creates plots from given data.

You might have to change input file names in the notebooks. This file name is always in the first code block of every notebook. The file name should the exact name of the file that you want to use.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages