{"id":46941035,"url":"https://github.com/datacarpentry/rr-literate-programming","last_synced_at":"2026-03-11T07:03:59.175Z","repository":{"id":142396285,"uuid":"42603146","full_name":"datacarpentry/rr-literate-programming","owner":"datacarpentry","description":"Repository for lesson materials on Literate Programming","archived":false,"fork":false,"pushed_at":"2020-06-18T06:05:13.000Z","size":49278,"stargazers_count":8,"open_issues_count":2,"forks_count":11,"subscribers_count":14,"default_branch":"gh-pages","last_synced_at":"2025-09-11T10:17:39.427Z","etag":null,"topics":["carpentries","data-carpentry","english","knitr","lesson","literate-programming","on-hold","r","reproducibility","rmarkdown"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datacarpentry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["carpentries"],"custom":["https://www.zeffy.com/en-US/donation-form/donate-to-make-a-difference-7497"]}},"created_at":"2015-09-16T17:38:11.000Z","updated_at":"2021-07-09T11:04:38.000Z","dependencies_parsed_at":"2023-04-25T03:38:46.450Z","dependency_job_id":null,"html_url":"https://github.com/datacarpentry/rr-literate-programming","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/datacarpentry/rr-literate-programming","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacarpentry%2Frr-literate-programming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacarpentry%2Frr-literate-programming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacarpentry%2Frr-literate-programming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacarpentry%2Frr-literate-programming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datacarpentry","download_url":"https://codeload.github.com/datacarpentry/rr-literate-programming/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacarpentry%2Frr-literate-programming/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30373525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carpentries","data-carpentry","english","knitr","lesson","literate-programming","on-hold","r","reproducibility","rmarkdown"],"created_at":"2026-03-11T07:03:54.426Z","updated_at":"2026-03-11T07:03:59.160Z","avatar_url":"https://github.com/datacarpentry.png","language":"HTML","funding_links":["https://github.com/sponsors/carpentries","https://www.zeffy.com/en-US/donation-form/donate-to-make-a-difference-7497"],"categories":[],"sub_categories":[],"readme":"# Literate Programming\n\n## Overview and learning objectives\n\nStudents 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.\n\nAt the beginning of the session, students should\n- be familiar with `Rstudio`: `Rstudio` layout, running `R` commands, and running `knitr`.\n\nAt the end of the session students will be able to\n\n- Distinguish between a spreadsheet formatted properly for later analysis and one formatted improperly.\n- Recognize and correct common data entry errors.\n- Describe the concept of 'raw data', and its implications for reproducible and sound data management.\n- Apply the concept of literate programming to produce executable documentation of data management and analysis.\n\n## Overview and recap\n\n- Recap about markdown, `RMarkdown`, `knitr`, and virtues of literate programming from the demonstrations in the Intro lesson:\n  [slides](slides/lit-prog-slides)\n\n### Activity - Using R and Rmarkdown to clean and plot data\n\nObjective: through hands-on interaction and modification, develop familiarity with `RMarkdown` and *knitting* the output.\n\nStudents `knit` and modify. Using\n[countryPick4.Rmd](files/lit-prog/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`:\n- Preview/Knit HTML, note what sorts of outputs are left behind.\n- Discuss input and output files.\n- Which files can we delete and reproduce? Which files are inputs, outputs, converters of inputs to outputs?\n\nThis section is meant for students to explore the power of writing reports in `R`.\n\n## Documenting data modifications\n\nLesson: [01-programatic-modification](01-documenting-data-modification.md)\n\n### Activity - Cleaning up data in Excel\n\nStudents 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.\n\n### Applying literate programming to produce executable documentation\n\n- Lesson: [02-literate-programming](02-literate-programming.md)\n\n## Resources and useful links\n\n### Relevant scientific papers\n\n- EP White, E Baldridge, ZT Brym, KJ Locey, DJ McGlinn, SR\n  Supp (2013) \"Nine simple ways to make it easier to (re)use your data.\" Ideas in Ecology and Evolution 6(2):\n  1–10, 2013. doi:[10.4033/iee.2013.6b.6.f] *(in particular the   section \"Use standard table formats\")*\n\n### Best practices for spreadsheets\n\n- [Good practice guidance on releasing statistics in spreadsheets](UK Government)\n\n## People and credits\n\nThis 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.\n\nPlease 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.\n\n## License and Attribution\n\n- [Gapminder data](http://www.gapminder.org/data/)\n- Processed and subset (population size, life expectancy, GDP per capita; only every 5 years only starting 1952, only complete records)\n  [Gapminder data as `R`  package](https://github.com/jennybc/gapminder). The [data-raw](https://github.com/jennybc/gapminder/tree/master/data-raw) sub-directory reveals the journey from Gapminder.org's Excel workbooks to increasingly clean and tidy data.\n- clean dataset can be located in R in the following way (after installing the package):\n~~~\npathToTsv \u003c- system.file(\"gapminder.tsv\", package = \"gapminder\")\n~~~\n{: .r}\n\n[@hlapp]: http://github.com/hlapp\n[1. Reproducible Science Curriculum Hackathon]: https://github.com/Reproducible-Science-Curriculum/Reproducible-Science-Hackathon-Dec-08-2014\n[Organization1 lesson]: https://github.com/Reproducible-Science-Curriculum/rr-organization1\n[10.4033/iee.2013.6b.6.f]: https://doi.org/10.4033/iee.2013.6b.6.f\n[CC Zero]: https://creativecommons.org/publicdomain/zero/1.0/\n[literate programming]: https://en.wikipedia.org/wiki/Literate_programming\n[1. Reproducible Science Curriculum Hackathon]: https://github.com/Reproducible-Science-Curriculum/Reproducible-Science-Hackathon-Dec-08-2014\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatacarpentry%2Frr-literate-programming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatacarpentry%2Frr-literate-programming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatacarpentry%2Frr-literate-programming/lists"}