datacarpentry/rr-literate-programming

Name: rr-literate-programming

Owner: Data Carpentry

Description: Repository for lesson materials on Literate Programming

Created: 2015-09-16 17:38:11.0

Updated: 2017-03-31 14:44:17.0

Pushed: 2017-06-30 18:47:31.0

Homepage:

Size: 47817

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Literate Programming

Overview and learning objectives

Students will work through activities highlighting the motivation for and value of literate programming as a concept, and as its implementation in RMarkdown. Through this, students will get introduced to the concepts of executable documentation and automation. Students will also learn about best practices for structuring spreadsheet-type data files, and the importance of documenting all changes one makes to data. Finally, students will be introduced to combining all these ideas to create automated, executable, and self-documenting data quality insurance and control reports.

At the beginning of the session, students should

At the end of the session students will be able to

Overview and recap
Activity - Using R and Rmarkdown to clean and plot data

Objective: through hands-on interaction and modification, develop familiarity with RMarkdown and knitting the output.

Students knit and modify. Using countryPick4.Rmd as a template, students learn how to import data, filter to one country, make a plot, write it to file, and comment data choices. Then the activity will illustrate what happens when you knit:

This section is meant for students to explore the power of writing reports in R.

Documenting data modifications

Lesson: 01-programatic-modification

Activity - Cleaning up data in Excel

Students identify poor and good data formatting practices, and will learn the importance of documenting modifications. This will lead to making modifications in a self-documenting and executable way.

Applying literate programming to produce executable documentation
Resources and useful links
Relevant scientific papers
Best practices for spreadsheets
People and credits

This lesson was first created as a part of the Organization1 lesson at the 1. Reproducible Science Curriculum Hackathon, and was later split out into its own lesson. The corresponding author is Hilmar Lapp (@hlapp). See the commit log for other contributors.

Please post feedback and issues with the lesson on the repository's issue tracker. For instructor questions about teaching this lesson, you can also contact the corresponding author directly.

License and Attribution

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.