Git Product home page Git Product logo

sop's Introduction

Standard Operating Procedures

Build Status

This project is created by members of the Yale Political Science Department for best practices in running surveys on Qualtrics and with Amazon Mechanical Turk workers.

Organization

The SOP sources are organized by chapters. Each chapter has its own folder containing all files it needs.

To create a new chapter, copy one of the example folders:

  • example-latex if you're writing in LaTeX,
  • example-md if you're writing in Markdown,
  • example-rmd if you're writing in Rmarkdown,

and change the folder's name to something good. Now you can start writing the chapter. When the chapter is ready to be included in the SOP, add the chapter's name to the sop.yml file.

How to compile the SOP

The SOP can be compiled into PDFs or HTMLs. Everything is done by an automated build system using Make, Pandoc and R. You might need to install some software to make it run (see the dependencies section).

To build everything (i.e., the complete PDF and HTMLs for all chapters), simply run the following command in the top folder:

make

The result will end up in bin/sop.pdf and bin/html/.

You can also build parts of the SOP (e.g., when you're writing on a chapter and want to see how it turned out):

# Compile only the PDF (i.e., `bin/sop.pdf`)
make pdf

# Compile PDF chapters seperately (they end up in the `bin/pdf-chapters/` folder)
make pdfchapters

# Compile only HTMLs
make html

# Compile PDF and HTML for chapter "NAME" only
make all-NAME

# Compile PDF for chapter "NAME" only
make pdf-NAME

# Compile HTML for chapter "NAME" only
make html-NAME

Finally, you can remove all the compiled files with:

make clean

Dependencies

To compile the complete SOP, you'll need:

However, it's possible to edit and build single chapters without most of these dependencies.

Dependencies on Mac OS

To check if all software is installed, run the following command in the top folder:

./check_macos.sh

Dependencies on Ubuntu

All dependencies can be installed by Ubuntu's package manager:

sudo apt-get install build-essential pandoc pandoc-citeproc r-base texlive

Install the required R packages with:

Rscript -e "install.packages(c('rmarkdown', 'yaml'), repos='http://cran.r-project.org')"

Dependencies on Windows (untested)

It's slightly tricky to build the complete SOP on Windows. It might be smarter to focus on single chapters and let someone else do the final build. It should, however, be possible with some effort.

First, you need to install a UNIX-like enviroment. There's several alternatives: Cygwin, MinGW, Mingw-w64 and WSL.

In most cases, the UNIX enviroment you installed includes make. If not, you need to install it. See, e.g., the GNUwin32 project.

See Pandoc's website on how to install pandoc and pandoc-citeproc.

R can be downloaded from their website.

Finally, the two main TeX distributions for windows are MiKTeX and TeX Live.

sop's People

Contributors

jonathonbaron avatar fsavje avatar mollyow avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.