├── #LICENSE.md# ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── AUTHORS ├── CITATION ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── Makefile ├── README.md ├── _config.yml ├── _episodes ├── .gitkeep ├── 01-introduction.md └── 02-toolkit.md ├── _episodes_rmd ├── .gitkeep ├── 01-introduction.Rmd ├── 01-introduction.html ├── 02-toolkit.Rmd ├── 02-toolkit.html └── data │ └── .gitkeep ├── _extras ├── .gitkeep ├── about.md ├── discuss.md ├── figures.md └── guide.md ├── _includes ├── all_figures.html ├── all_keypoints.html ├── carpentries.html ├── dc │ ├── intro.html │ ├── schedule.html │ ├── syllabus.html │ └── who.html ├── episode_break.html ├── episode_keypoints.html ├── episode_navbar.html ├── episode_overview.html ├── episode_title.html ├── favicons.html ├── javascript.html ├── lc │ ├── intro.html │ ├── schedule.html │ ├── syllabus.html │ └── who.html ├── lesson_footer.html ├── links.md ├── main_title.html ├── navbar.html ├── sc │ ├── intro.html │ ├── schedule.html │ ├── syllabus.html │ └── who.html ├── syllabus.html ├── workshop_ad.html └── workshop_footer.html ├── _layouts ├── base.html ├── break.html ├── episode.html ├── lesson.html ├── page.html ├── reference.html └── workshop.html ├── aio.md ├── assets ├── css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── lesson.scss │ └── syntax.css ├── favicons │ ├── cp │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-144x144.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-57x57.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── favicon-128.png │ │ ├── favicon-16x16.png │ │ ├── favicon-196x196.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ └── mstile-70x70.png │ ├── dc │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-144x144.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-57x57.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── favicon-128.png │ │ ├── favicon-16x16.png │ │ ├── favicon-196x196.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ └── mstile-70x70.png │ ├── lc │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-144x144.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-57x57.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── favicon-128.png │ │ ├── favicon-16x16.png │ │ ├── favicon-196x196.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ └── mstile-70x70.png │ └── swc │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-144x144.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-57x57.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── favicon-128.png │ │ ├── favicon-16x16.png │ │ ├── favicon-196x196.png │ │ ├── favicon-32x32.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ └── mstile-70x70.png ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── img │ ├── cp-logo-blue.svg │ ├── dc-icon-black.svg │ ├── dc-logo-black.svg │ ├── lc-icon-black.png │ ├── lc-icon-black.svg │ ├── lc-logo-black.png │ ├── lc-logo-black.svg │ ├── swc-icon-blue.svg │ ├── swc-logo-blue.png │ ├── swc-logo-blue.svg │ ├── swc-logo-white.png │ └── swc-logo-white.svg └── js │ ├── bootstrap.min.js │ ├── jquery.min.js │ ├── jquery.min.map │ └── lesson.js ├── bin ├── boilerplate │ ├── .travis.yml │ ├── AUTHORS │ ├── CITATION │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── README.md │ ├── _config.yml │ ├── _episodes │ │ └── 01-introduction.md │ ├── _extras │ │ ├── about.md │ │ ├── discuss.md │ │ ├── figures.md │ │ └── guide.md │ ├── aio.md │ ├── index.md │ ├── reference.md │ └── setup.md ├── chunk-options.R ├── generate_md_episodes.R ├── knit_lessons.sh ├── lesson_check.py ├── lesson_initialize.py ├── markdown_ast.rb ├── repo_check.py ├── test_lesson_check.py ├── util.py └── workshop_check.py ├── checklist.md ├── code └── .gitkeep ├── data ├── .gitkeep ├── README.md ├── gapminder-5060.csv ├── gapminder-5060_original.csv ├── gapminder-7080.csv ├── gapminder-90plus.csv ├── gapminder.csv └── gapminder.rdata ├── fig ├── .gitkeep └── rmd-plot-example-1.png ├── figure ├── more_task_3-1.png ├── task_2_visualize-1.png ├── task_3-1.png └── unnamed-chunk-1-1.png ├── files └── .gitkeep ├── img ├── RSplashScreen.png ├── RStudio-Logo-Blue-Gradient.png ├── RStudioSplash.png ├── Rlogo-1.png ├── coffee_000000_264.png └── wrench_000000_264.png ├── index.md ├── intro-01-instr-notes.md ├── intro-02-instr-notes.md ├── intro-template.html ├── intro ├── data │ ├── gapminder-5060.csv │ ├── gapminder-7080.csv │ └── gapminder-90plus.csv └── intro-template.Rmd ├── pre-workshop-survey.md ├── preworkshop-email.md ├── reference.md ├── setup.md ├── slides ├── intro-01-slides.Rmd ├── intro-01-slides.html ├── intro-02-slides.Rmd └── intro-02-slides.html └── styling.css /#LICENSE.md#: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please delete the text below before submitting your contribution. 2 | 3 | --- 4 | 5 | Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution. 6 | 7 | Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact Kate Hertweck (k8hertweck@gmail.com). 8 | 9 | --- 10 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please delete the text below before submitting your contribution. 2 | 3 | --- 4 | 5 | Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution. 6 | 7 | Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact Kate Hertweck (k8hertweck@gmail.com). 8 | 9 | --- 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rhistory 2 | .Rproj.user 3 | rr-intro.Rproj 4 | .DS_Store 5 | data/.DS_Store 6 | *.pyc 7 | *~ 8 | .DS_Store 9 | .ipynb_checkpoints 10 | .sass-cache 11 | __pycache__ 12 | _site 13 | .Rproj.user 14 | .Rhistory 15 | .RData -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | The `rr-intro` repository was written by: 2 | Greg Wilson 3 | Mine Cetinkaya-Rundel 4 | Francois Michonneau 5 | Tracy Teal 6 | Abigail Cabunoc Mayes 7 | Pat Schloss 8 | Paul Magwene 9 | Karen Cranston 10 | Rémi Emonet 11 | Hilmar Lapp 12 | Piotr Banaszkiewicz 13 | Kristina Riemer 14 | James Allen 15 | John Pipitone 16 | Evan Will 17 | Raiere Silva 18 | Karl Broman 19 | Ciera Martinez 20 | Timothée Poisot 21 | Bill Mills 22 | Gabriel A. Devenyi 23 | Chris Hamm 24 | -------------------------------------------------------------------------------- /CITATION: -------------------------------------------------------------------------------- 1 | Please cite this lesson as: 2 | 3 | Data Carpentry Committee on Reproducible Research with `R`. 2016. Introduction to Reprducible Research with `R.` 4 | 5 | https://github.com/data-carpentry/rr-intro; zenodo DOI to follow. 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "Contributor Code of Conduct" 4 | --- 5 | As contributors and maintainers of this project, 6 | we pledge to follow the [Carpentry Code of Conduct][coc]. 7 | 8 | Instances of abusive, harassing, or otherwise unacceptable behavior 9 | may be reported by following our [reporting guidelines][coc-reporting]. 10 | 11 | {% include links.md %} 12 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | [Software Carpentry][swc-site] and [Data Carpentry][dc-site] are open source projects, 4 | and we welcome contributions of all kinds: 5 | new lessons, 6 | fixes to existing material, 7 | bug reports, 8 | and reviews of proposed changes are all welcome. 9 | 10 | ## Contributor Agreement 11 | 12 | By contributing, 13 | you agree that we may redistribute your work under [our license](LICENSE.md). 14 | In exchange, 15 | we will address your issues and/or assess your change proposal as promptly as we can, 16 | and help you become a member of our community. 17 | Everyone involved in [Software Carpentry][swc-site] and [Data Carpentry][dc-site] 18 | agrees to abide by our [code of conduct](CONDUCT.md). 19 | 20 | ## How to Contribute 21 | 22 | The easiest way to get started is to file an issue 23 | to tell us about a spelling mistake, 24 | some awkward wording, 25 | or a factual error. 26 | This is a good way to introduce yourself 27 | and to meet some of our community members. 28 | 29 | 1. If you do not have a [GitHub][github] account, 30 | you can [send us comments by email][contact]. 31 | However, 32 | we will be able to respond more quickly if you use one of the other methods described below. 33 | 34 | 2. If you have a [GitHub][github] account, 35 | or are willing to [create one][github-join], 36 | but do not know how to use Git, 37 | you can report problems or suggest improvements by [creating an issue][issues]. 38 | This allows us to assign the item to someone 39 | and to respond to it in a threaded discussion. 40 | 41 | 3. If you are comfortable with Git, 42 | and would like to add or change material, 43 | you can submit a pull request (PR). 44 | Instructions for doing this are [included below](#using-github). 45 | 46 | ## Where to Contribute 47 | 48 | 1. If you wish to change this lesson, 49 | please work in , 50 | which can be viewed at . 51 | 52 | 2. If you wish to change the example lesson, 53 | please work in , 54 | which documents the format of our lessons 55 | and can be viewed at . 56 | 57 | 3. If you wish to change the template used for workshop websites, 58 | please work in . 59 | The home page of that repository explains how to set up workshop websites, 60 | while the extra pages in 61 | provide more background on our design choices. 62 | 63 | 4. If you wish to change CSS style files, tools, 64 | or HTML boilerplate for lessons or workshops stored in `_includes` or `_layouts`, 65 | please work in . 66 | 67 | ## What to Contribute 68 | 69 | There are many ways to contribute, 70 | from writing new exercises and improving existing ones 71 | to updating or filling in the documentation 72 | and and submitting [bug reports][issues] 73 | about things that don't work, aren't clear, or are missing. 74 | If you are looking for ideas, 75 | please see [the list of issues for this repository][issues], 76 | or the issues for [Data Carpentry][dc-issues] 77 | and [Software Carpentry][swc-issues] projects. 78 | 79 | Comments on issues and reviews of pull requests are just as welcome: 80 | we are smarter together than we are on our own. 81 | Reviews from novices and newcomers are particularly valuable: 82 | it's easy for people who have been using these lessons for a while 83 | to forget how impenetrable some of this material can be, 84 | so fresh eyes are always welcome. 85 | 86 | ## What *Not* to Contribute 87 | 88 | Our lessons already contain more material than we can cover in a typical workshop, 89 | so we are usually *not* looking for more concepts or tools to add to them. 90 | As a rule, 91 | if you want to introduce a new idea, 92 | you must (a) estimate how long it will take to teach 93 | and (b) explain what you would take out to make room for it. 94 | The first encourages contributors to be honest about requirements; 95 | the second, to think hard about priorities. 96 | 97 | We are also not looking for exercises or other material that only run on one platform. 98 | Our workshops typically contain a mixture of Windows, Mac OS X, and Linux users; 99 | in order to be usable, 100 | our lessons must run equally well on all three. 101 | 102 | ## Using GitHub 103 | 104 | If you choose to contribute via GitHub, 105 | you may want to look at 106 | [How to Contribute to an Open Source Project on GitHub][how-contribute]. 107 | In brief: 108 | 109 | 1. The published copy of the lesson is in the `gh-pages` branch of the repository 110 | (so that GitHub will regenerate it automatically). 111 | Please create all branches from that, 112 | and merge the [master repository][repo]'s `gh-pages` branch into your `gh-pages` branch 113 | before starting work. 114 | Please do *not* work directly in your `gh-pages` branch, 115 | since that will make it difficult for you to work on other contributions. 116 | 117 | 2. We use [GitHub flow][github-flow] to manage changes: 118 | 1. Create a new branch in your desktop copy of this repository for each significant change. 119 | 2. Commit the change in that branch. 120 | 3. Push that branch to your fork of this repository on GitHub. 121 | 4. Submit a pull request from that branch to the [master repository][repo]. 122 | 5. If you receive feedback, 123 | make changes on your desktop and push to your branch on GitHub: 124 | the pull request will update automatically. 125 | 126 | Each lesson has two maintainers who review issues and pull requests 127 | or encourage others to do so. 128 | The maintainers are community volunteers, 129 | and have final say over what gets merged into the lesson. 130 | 131 | ## Other Resources 132 | 133 | General discussion of [Software Carpentry][swc-site] and [Data Carpentry][dc-site] 134 | happens on the [discussion mailing list][discuss-list], 135 | which everyone is welcome to join. 136 | You can also [reach us by email][contact]. 137 | 138 | [contact]: mailto:admin@software-carpentry.org 139 | [dc-issues]: https://github.com/issues?q=user%3Adatacarpentry 140 | [dc-lessons]: http://datacarpentry.org/lessons/ 141 | [dc-site]: http://datacarpentry.org/ 142 | [discuss-list]: http://lists.software-carpentry.org/listinfo/discuss 143 | [example-site]: https://carpentries.github.io/lesson-example/ 144 | [github]: http://github.com 145 | [github-flow]: https://guides.github.com/introduction/flow/ 146 | [github-join]: https://github.com/join 147 | [how-contribute]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github 148 | [issues]: https://github.com/datacarpentry/rr-intro/issues 149 | [repo]: https://github.com/datacarpentry/rr-intro 150 | [swc-issues]: https://github.com/issues?q=user%3Aswcarpentry 151 | [swc-lessons]: http://software-carpentry.org/lessons/ 152 | [swc-site]: http://software-carpentry.org/ 153 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "Licenses" 4 | root: . 5 | --- 6 | ## Instructional Material 7 | 8 | All Software Carpentry and Data Carpentry instructional material is 9 | made available under the [Creative Commons Attribution 10 | license][cc-by-human]. The following is a human-readable summary of 11 | (and not a substitute for) the [full legal text of the CC BY 4.0 12 | license][cc-by-legal]. 13 | 14 | You are free: 15 | 16 | * to **Share**---copy and redistribute the material in any medium or format 17 | * to **Adapt**---remix, transform, and build upon the material 18 | 19 | for any purpose, even commercially. 20 | 21 | The licensor cannot revoke these freedoms as long as you follow the 22 | license terms. 23 | 24 | Under the following terms: 25 | 26 | * **Attribution**---You must give appropriate credit (mentioning that 27 | your work is derived from work that is Copyright © Software 28 | Carpentry and, where practical, linking to 29 | http://software-carpentry.org/), provide a [link to the 30 | license][cc-by-human], and indicate if changes were made. You may do 31 | so in any reasonable manner, but not in any way that suggests the 32 | licensor endorses you or your use. 33 | 34 | **No additional restrictions**---You may not apply legal terms or 35 | technological measures that legally restrict others from doing 36 | anything the license permits. With the understanding that: 37 | 38 | Notices: 39 | 40 | * You do not have to comply with the license for elements of the 41 | material in the public domain or where your use is permitted by an 42 | applicable exception or limitation. 43 | * No warranties are given. The license may not give you all of the 44 | permissions necessary for your intended use. For example, other 45 | rights such as publicity, privacy, or moral rights may limit how you 46 | use the material. 47 | 48 | ## Software 49 | 50 | Except where otherwise noted, the example programs and other software 51 | provided by Software Carpentry and Data Carpentry are made available under the 52 | [OSI][osi]-approved 53 | [MIT license][mit-license]. 54 | 55 | Permission is hereby granted, free of charge, to any person obtaining 56 | a copy of this software and associated documentation files (the 57 | "Software"), to deal in the Software without restriction, including 58 | without limitation the rights to use, copy, modify, merge, publish, 59 | distribute, sublicense, and/or sell copies of the Software, and to 60 | permit persons to whom the Software is furnished to do so, subject to 61 | the following conditions: 62 | 63 | The above copyright notice and this permission notice shall be 64 | included in all copies or substantial portions of the Software. 65 | 66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 67 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 68 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 69 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 70 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 71 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 72 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 73 | 74 | ## Trademark 75 | 76 | "Software Carpentry" and "Data Carpentry" and their respective logos 77 | are registered trademarks of [Community Initiatives][CI]. 78 | 79 | [cc-by-human]: https://creativecommons.org/licenses/by/4.0/ 80 | [cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode 81 | [mit-license]: https://opensource.org/licenses/mit-license.html 82 | [ci]: http://communityin.org/ 83 | [osi]: https://opensource.org 84 | 85 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ## ======================================== 2 | ## Commands for both workshop and lesson websites. 3 | 4 | # Settings 5 | MAKEFILES=Makefile $(wildcard *.mk) 6 | JEKYLL=jekyll 7 | JEKYLL_VERSION=3.7.3 8 | PARSER=bin/markdown_ast.rb 9 | DST=_site 10 | 11 | # Controls 12 | .PHONY : commands clean files 13 | .NOTPARALLEL: 14 | all : commands 15 | 16 | ## commands : show all commands. 17 | commands : 18 | @grep -h -E '^##' ${MAKEFILES} | sed -e 's/## //g' 19 | 20 | ## docker-serve : use docker to build the site 21 | docker-serve : 22 | docker run --rm -it -v ${PWD}:/srv/jekyll -p 127.0.0.1:4000:4000 jekyll/jekyll:${JEKYLL_VERSION} make serve 23 | 24 | ## serve : run a local server. 25 | serve : lesson-md 26 | ${JEKYLL} serve 27 | 28 | ## site : build files but do not run a server. 29 | site : lesson-md 30 | ${JEKYLL} build 31 | 32 | # repo-check : check repository settings. 33 | repo-check : 34 | @bin/repo_check.py -s . 35 | 36 | ## clean : clean up junk files. 37 | clean : 38 | @rm -rf ${DST} 39 | @rm -rf .sass-cache 40 | @rm -rf bin/__pycache__ 41 | @find . -name .DS_Store -exec rm {} \; 42 | @find . -name '*~' -exec rm {} \; 43 | @find . -name '*.pyc' -exec rm {} \; 44 | 45 | ## clean-rmd : clean intermediate R files (that need to be committed to the repo). 46 | clear-rmd : 47 | @rm -rf ${RMD_DST} 48 | @rm -rf fig/rmd-* 49 | 50 | ## ---------------------------------------- 51 | ## Commands specific to workshop websites. 52 | 53 | .PHONY : workshop-check 54 | 55 | ## workshop-check : check workshop homepage. 56 | workshop-check : 57 | @bin/workshop_check.py . 58 | 59 | ## ---------------------------------------- 60 | ## Commands specific to lesson websites. 61 | 62 | .PHONY : lesson-check lesson-md lesson-files lesson-fixme 63 | 64 | # RMarkdown files 65 | RMD_SRC = $(wildcard _episodes_rmd/??-*.Rmd) 66 | RMD_DST = $(patsubst _episodes_rmd/%.Rmd,_episodes/%.md,$(RMD_SRC)) 67 | 68 | # Lesson source files in the order they appear in the navigation menu. 69 | MARKDOWN_SRC = \ 70 | index.md \ 71 | CODE_OF_CONDUCT.md \ 72 | setup.md \ 73 | $(sort $(wildcard _episodes/*.md)) \ 74 | reference.md \ 75 | $(sort $(wildcard _extras/*.md)) \ 76 | LICENSE.md 77 | 78 | # Generated lesson files in the order they appear in the navigation menu. 79 | HTML_DST = \ 80 | ${DST}/index.html \ 81 | ${DST}/conduct/index.html \ 82 | ${DST}/setup/index.html \ 83 | $(patsubst _episodes/%.md,${DST}/%/index.html,$(sort $(wildcard _episodes/*.md))) \ 84 | ${DST}/reference/index.html \ 85 | $(patsubst _extras/%.md,${DST}/%/index.html,$(sort $(wildcard _extras/*.md))) \ 86 | ${DST}/license/index.html 87 | 88 | ## lesson-md : convert Rmarkdown files to markdown 89 | lesson-md : ${RMD_DST} 90 | 91 | # Use of .NOTPARALLEL makes rule execute only once 92 | ${RMD_DST} : ${RMD_SRC} 93 | @bin/knit_lessons.sh ${RMD_SRC} 94 | 95 | ## lesson-check : validate lesson Markdown. 96 | lesson-check : lesson-fixme 97 | @bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md 98 | 99 | ## lesson-check-all : validate lesson Markdown, checking line lengths and trailing whitespace. 100 | lesson-check-all : 101 | @bin/lesson_check.py -s . -p ${PARSER} -r _includes/links.md -l -w --permissive 102 | 103 | ## unittest : run unit tests on checking tools. 104 | unittest : 105 | @bin/test_lesson_check.py 106 | 107 | ## lesson-files : show expected names of generated files for debugging. 108 | lesson-files : 109 | @echo 'RMD_SRC:' ${RMD_SRC} 110 | @echo 'RMD_DST:' ${RMD_DST} 111 | @echo 'MARKDOWN_SRC:' ${MARKDOWN_SRC} 112 | @echo 'HTML_DST:' ${HTML_DST} 113 | 114 | ## lesson-fixme : show FIXME markers embedded in source files. 115 | lesson-fixme : 116 | @fgrep -i -n FIXME ${MARKDOWN_SRC} || true 117 | 118 | #------------------------------------------------------------------------------- 119 | # Include extra commands if available. 120 | #------------------------------------------------------------------------------- 121 | 122 | -include commands.mk 123 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | rr-intro 2 | ======== 3 | 4 | ## Lesson synopsis: 5 | 6 | In this session we will start by reviewing case studies of (lack of) reproducibility gone wrong. Then participants will work on two reproducibility exercises: first a simple data manipulation and analysis exercise using any software they generally work with and then the same exercise (and extensions to it) using `RMarkdown` in `RStudio` as a better alternative, highlighting how this approach makes documentation, organization, automation, and dissemination easier. 7 | 8 | ## Syllabus: 9 | 10 | - Recognize the problems that reproducible research helps address 11 | - Identify pain points in getting your analysis to be reproducible. 12 | - The role of documentation, sharing, automation, and organization in making your research more reproducible. 13 | - Introducing some tools to solve these problems, specifically `R`/`RStudio`/`RMarkdown`. 14 | 15 | ## Goals: 16 | 17 | At the beginning of this session, participants should be able to 18 | 19 | - use a spreadsheet program to generate a plot 20 | - use a text editor (Word, Google Docs, etc.) to communicate 21 | 22 | At the end of the session students will be able to 23 | 24 | - recognize the problems that reproducible research helps address 25 | - identify pain points in getting their analysis to be reproducible 26 | 27 | The specific problems to be addressed in each session are as follows: 28 | 29 | - First half (01): motivating reproducibility 30 | - Second half (02): introduce R Markdown as a reproducible data analysis tool 31 | 32 | The first half of the intro session is language agnostic. If a workshop uses programming language other than R, only intro-02 will need to be modified. 33 | 34 | ## Pre-workshop: 35 | 36 | Participants install `R` + `RStudio`. 37 | 38 | See [email template](https://github.com/Reproducible-Science-Curriculum/rr-intro/blob/master/preworkshop-email.md). 39 | 40 | ## First half (01): 41 | 42 | See instructor notes (`intro-01-instr-notes.Rmd`) for details. 43 | 44 | - Welcome + go over schedule 45 | - Motivating reproducibility slides 46 | - Group discussion about current tools people are using for documentation / reproducibility 47 | - Ex 1: Motivating reproducibility 48 | 49 | ## Second half (02): 50 | 51 | See instructor notes (`intro-02-instr-notes.Rmd`) for details. 52 | 53 | - Provide `RMarkdown` approach to what's done in Session 1 (`intro-template.Rmd`) 54 | 55 | - Wrap up with pointing participants to the [reproducibility checklist](https://github.com/Reproducible-Science-Curriculum/rr-intro/blob/master/checklist.md). 56 | 57 | ## Data attribution 58 | 59 | - [Gapminder data](http://www.gapminder.org/data/). [Gapminder data is licensed CC-BY 3.0](https://docs.google.com/document/pub?id=1POd-pBMc5vDXAmxrpGjPLaCSDSWuxX6FLQgq5DhlUhM#h.ul2gu2-uwathz). 60 | 61 | - Processed and subset (population size, life expectancy, GDP per capita; only every 5 years only starting 1952, only complete records) [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. 62 | - clean dataset can be located in R in the following way (after installing the package): 63 | 64 | ~~~ 65 | pathToTsv <- system.file("gapminder.tsv", package = "gapminder") 66 | ~~~ 67 | {: .r} 68 | 69 | ## People and credits 70 | 71 | This lesson was first created at the [1. Reproducible Science Curriculum Hackathon]. The corresponding author is **Mine Çetinkaya-Rundel** ([@mine-cetinkaya-rundel]). See the commit log for other contributors. 72 | 73 | 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. 74 | 75 | [@mine-cetinkaya-rundel]: https://github.com/mine-cetinkaya-rundel 76 | [1. Reproducible Science Curriculum Hackathon]: https://github.com/Reproducible-Science-Curriculum/Reproducible-Science-Hackathon-Dec-08-2014 77 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------ 2 | # Values for this lesson. 3 | #------------------------------------------------------------ 4 | 5 | # Which carpentry is this ("swc", "dc", "lc", or "cp")? 6 | # swc: Software Carpentry 7 | # dc: Data Carpentry 8 | # lc: Library Carpentry 9 | # cp: Carpentries (to use for instructor traning for instance) 10 | carpentry: "dc" 11 | 12 | # Overall title for pages. 13 | title: "Reproducible Research Introduction" 14 | 15 | 16 | #------------------------------------------------------------ 17 | # Generic settings (should not need to change). 18 | #------------------------------------------------------------ 19 | 20 | # What kind of thing is this ("workshop" or "lesson")? 21 | kind: "lesson" 22 | 23 | # Magic to make URLs resolve both locally and on GitHub. 24 | # See https://help.github.com/articles/repository-metadata-on-github-pages/. 25 | # Please don't change it: / is correct. 26 | repository: / 27 | 28 | # Email address, no mailto: 29 | email: "team@carpentries.org" 30 | 31 | # Sites. 32 | amy_site: "https://amy.software-carpentry.org/workshops" 33 | carpentries_github: "https://github.com/carpentries" 34 | carpentries_pages: "https://carpentries.github.io" 35 | carpentries_site: "https://carpentries.org/" 36 | dc_site: "http://datacarpentry.org" 37 | example_repo: "https://github.com/carpentries/lesson-example" 38 | example_site: "https://carpentries.github.io/lesson-example" 39 | lc_site: "https://librarycarpentry.github.io/" 40 | swc_github: "https://github.com/swcarpentry" 41 | swc_pages: "https://swcarpentry.github.io" 42 | swc_site: "https://software-carpentry.org" 43 | template_repo: "https://github.com/carpentries/styles" 44 | training_site: "https://carpentries.github.io/instructor-training" 45 | workshop_repo: "https://github.com/carpentries/workshop-template" 46 | workshop_site: "https://carpentries.github.io/workshop-template" 47 | 48 | # Surveys. 49 | pre_survey: "https://www.surveymonkey.com/r/swc_pre_workshop_v1?workshop_id=" 50 | post_survey: "https://www.surveymonkey.com/r/swc_post_workshop_v1?workshop_id=" 51 | training_post_survey: "https://www.surveymonkey.com/r/post-instructor-training" 52 | 53 | # Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am). 54 | start_time: 0 55 | 56 | # Specify that things in the episodes collection should be output. 57 | collections: 58 | episodes: 59 | output: true 60 | permalink: /:path/index.html 61 | extras: 62 | output: true 63 | permalink: /:path/index.html 64 | 65 | # Set the default layout for things in the episodes collection. 66 | defaults: 67 | - values: 68 | root: . 69 | layout: page 70 | - scope: 71 | path: "" 72 | type: episodes 73 | values: 74 | root: .. 75 | layout: episode 76 | - scope: 77 | path: "" 78 | type: extras 79 | values: 80 | root: .. 81 | layout: page 82 | 83 | # Files and directories that are not to be copied. 84 | exclude: 85 | - Makefile 86 | - bin/ 87 | - .Rproj.user/ 88 | 89 | # Turn on built-in syntax highlighting. 90 | highlighter: rouge 91 | -------------------------------------------------------------------------------- /_episodes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/_episodes/.gitkeep -------------------------------------------------------------------------------- /_episodes/02-toolkit.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Reproducibility Toolkit" 3 | teaching: 30 4 | exercises: 10 5 | questions: 6 | - "What tools will we be using?" 7 | - "How can we use these tools to improve reproducibility?" 8 | objectives: 9 | - "Learn to use `R`, `RStudio` and `RMarkdown`." 10 | keypoints: 11 | - "`R`, `RStudio` and `RMarkdown` allow for powerful reproducible research." 12 | output: 13 | html_document 14 | --- 15 | 16 | ## Our reproducibility toolkit 17 | 18 | ### `R` + `RStudio` 19 | 20 | #### Why `R`? 21 | - Programming language for data analysis: 22 | - Free! 23 | - Open source 24 | - Widely used and supported across all disciplines 25 | - Can be used on Windows, Mac OS X, or Linux! 26 | 27 | #### Why not language X? 28 | - There are a number of other great programming tools out there that can also be used to improve the reproducibility of your analysis 29 | 30 | - The key is to use some type of language that will allow you to automate and document your analysis 31 | 32 | - Once you master one language you'll probably find it easier to learn another 33 | 34 | #### Once in `R` 35 | 36 | You could just type into the command prompt... 37 | - ... but that doesn't help much with documentation. 38 | - ... but that doesn't help much with automation. 39 | 40 | #### A better solution 41 | - With RStudio you can combine your programming and your documentation. 42 | - RStudio gives you a single environment to combine your documentation and your analysis - It runs on top of `R` - Gives you a bunch of really cool features that we'll explore throughout the workshop. 43 | 44 | ## R Packages 45 | 46 | Packages are the fundamental units of reproducible R code. They include reusable `R` functions, the documentation that describes how to use them, and (often) sample data. (From: http://r-pkgs.had.co.nz) 47 | 48 | - We will use the `ggplot2` package for plots and `dplyr` for data wrangling in this session. Both packages come as part of the `tidyverse` suite of packages. 49 | 50 | - If you have not yet done so, install this package by running the following in the Console: 51 | 52 | 53 | ```r 54 | install.packages("tidyverse") 55 | ``` 56 | 57 | ## Demo 58 | 59 | Goals of the demo: 60 | 61 | - Demonstrate "good practice" for organizing data files and analysis documents (`RMarkdown`) 62 | - How to read data from a file 63 | - How to manipulate the data, and document it in a reproducible way 64 | - How easy it would be to revert any changes if need be 65 | - How to subset data 66 | - How to make simple plots in ggplot 67 | - **NOT** about understanding all the `R` commands, but **rather** getting the big picture of how using `R` in this way facilitates reproducible analyses 68 | 69 | ### R Markdown demo 70 | 71 | Open `intro-template.Rmd` 72 | 73 | Click on `Knit HTML` to compile the document 74 | 75 | Important features: 76 | 77 | - YAML on top 78 | - Code in chunks 79 | - `RMarkdown` syntax 80 | - Human readable! 81 | - Limited, so not too time consuming to master 82 | - Self contained workspace 83 | 84 | ### Extending the analysis 85 | 86 | Great news!? We just received some more data, in bits and pieces of course: 87 | `gapminder-7080.csv` 88 | 89 | `gapminder-90plus.csv` 90 | 91 | Let's walk through generation of new plots for the 1970s and 1980s and 1990s plus (these new analyses are already in the `intro-tutorial.Rmd` document). 92 | 93 | Note that all code required to accomplish these tasks is also in the template. You do not need to come up with the R code, **knit** the document to combine the datasets and you'll see that the code required for recreating the plots is the same as above. That's the beauty of `RMarkdown`! 94 | 95 | ### Take aways 96 | - The analysis is self-documenting 97 | - It's easy to extend or refine analyses by copying and modifying code blocks 98 | - The results of the analysis can be disseminated by sending `RMarkdown` and providing data sources, or just simply providing the generated HTML of just a summary of the analysis is needed 99 | 100 | > ## Reproducibility checklist 101 | > 102 | > - Serves as a tool to help you think about the reproducibility of your data analysis. 103 | > - Many of the questions can be thought of as having a yes/no answer. 104 | > - A better approach would be to see the questions as being open ended with the real question being, "What can I do to improve the status of my project on this bullet point?" 105 | > - With that in mind, you'll never get 100% of the bullets right for your project, but you'll always be improving. 106 | {: .checklist} 107 | -------------------------------------------------------------------------------- /_episodes_rmd/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/_episodes_rmd/.gitkeep -------------------------------------------------------------------------------- /_episodes_rmd/02-toolkit.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Reproducibility Toolkit" 3 | teaching: 30 4 | exercises: 10 5 | questions: 6 | - "What tools will we be using?" 7 | - "How can we use these tools to improve reproducibility?" 8 | objectives: 9 | - "Learn to use `R`, `RStudio` and `RMarkdown`." 10 | keypoints: 11 | - "`R`, `RStudio` and `RMarkdown` allow for powerful reproducible research." 12 | output: 13 | html_document 14 | --- 15 | 16 | ## Our reproducibility toolkit 17 | 18 | ### `R` + `RStudio` 19 | 20 | #### Why `R`? 21 | - Programming language for data analysis: 22 | - Free! 23 | - Open source 24 | - Widely used and supported across all disciplines 25 | - Can be used on Windows, Mac OS X, or Linux! 26 | 27 | #### Why not language X? 28 | - There are a number of other great programming tools out there that can also be used to improve the reproducibility of your analysis 29 | 30 | - The key is to use some type of language that will allow you to automate and document your analysis 31 | 32 | - Once you master one language you'll probably find it easier to learn another 33 | 34 | #### Once in `R` 35 | 36 | You could just type into the command prompt... 37 | - ... but that doesn't help much with documentation. 38 | - ... but that doesn't help much with automation. 39 | 40 | #### A better solution 41 | - With RStudio you can combine your programming and your documentation. 42 | - RStudio gives you a single environment to combine your documentation and your analysis - It runs on top of `R` - Gives you a bunch of really cool features that we'll explore throughout the workshop. 43 | 44 | ## R Packages 45 | 46 | Packages are the fundamental units of reproducible R code. They include reusable `R` functions, the documentation that describes how to use them, and (often) sample data. (From: http://r-pkgs.had.co.nz) 47 | 48 | - We will use the `ggplot2` package for plots and `dplyr` for data wrangling in this session. Both packages come as part of the `tidyverse` suite of packages. 49 | 50 | - If you have not yet done so, install this package by running the following in the Console: 51 | 52 | ```{r installation, eval = FALSE} 53 | install.packages("tidyverse") 54 | ```` 55 | 56 | ## Demo 57 | 58 | Goals of the demo: 59 | 60 | - Demonstrate "good practice" for organizing data files and analysis documents (`RMarkdown`) 61 | - How to read data from a file 62 | - How to manipulate the data, and document it in a reproducible way 63 | - How easy it would be to revert any changes if need be 64 | - How to subset data 65 | - How to make simple plots in ggplot 66 | - **NOT** about understanding all the `R` commands, but **rather** getting the big picture of how using `R` in this way facilitates reproducible analyses 67 | 68 | ### R Markdown demo 69 | 70 | Open `intro-template.Rmd` 71 | 72 | Click on `Knit HTML` to compile the document 73 | 74 | Important features: 75 | 76 | - YAML on top 77 | - Code in chunks 78 | - `RMarkdown` syntax 79 | - Human readable! 80 | - Limited, so not too time consuming to master 81 | - Self contained workspace 82 | 83 | ### Extending the analysis 84 | 85 | Great news!? We just received some more data, in bits and pieces of course: 86 | `gapminder-7080.csv` 87 | 88 | `gapminder-90plus.csv` 89 | 90 | Let's walk through generation of new plots for the 1970s and 1980s and 1990s plus (these new analyses are already in the `intro-tutorial.Rmd` document). 91 | 92 | Note that all code required to accomplish these tasks is also in the template. You do not need to come up with the R code, **knit** the document to combine the datasets and you'll see that the code required for recreating the plots is the same as above. That's the beauty of `RMarkdown`! 93 | 94 | ### Take aways 95 | - The analysis is self-documenting 96 | - It's easy to extend or refine analyses by copying and modifying code blocks 97 | - The results of the analysis can be disseminated by sending `RMarkdown` and providing data sources, or just simply providing the generated HTML of just a summary of the analysis is needed 98 | 99 | > ## Reproducibility checklist 100 | > 101 | > - Serves as a tool to help you think about the reproducibility of your data analysis. 102 | > - Many of the questions can be thought of as having a yes/no answer. 103 | > - A better approach would be to see the questions as being open ended with the real question being, "What can I do to improve the status of my project on this bullet point?" 104 | > - With that in mind, you'll never get 100% of the bullets right for your project, but you'll always be improving. 105 | {: .checklist} 106 | -------------------------------------------------------------------------------- /_episodes_rmd/data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/_episodes_rmd/data/.gitkeep -------------------------------------------------------------------------------- /_extras/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/_extras/.gitkeep -------------------------------------------------------------------------------- /_extras/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: About 4 | permalink: /about/ 5 | --- 6 | {% include carpentries.html %} 7 | -------------------------------------------------------------------------------- /_extras/discuss.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Discussion 4 | permalink: /discuss/ 5 | --- 6 | Discussion for this workshop should take place on the Etherpad set up specifically for your workshop. Check the workshop's website for a link to the etherpad. 7 | -------------------------------------------------------------------------------- /_extras/figures.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Figures 4 | permalink: /figures/ 5 | --- 6 | {% include all_figures.html %} 7 | -------------------------------------------------------------------------------- /_extras/guide.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "Instructor Notes" 4 | permalink: /guide/ 5 | --- 6 | Instructor notes: 7 | - [Notes 01](../intro-01-instr-notes.md) 8 | - [Notes 02](../intro-02-instr-notes.md) 9 | -------------------------------------------------------------------------------- /_includes/all_figures.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_includes/all_keypoints.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Display key points of all episodes for reference. 3 | {% endcomment %} 4 |

Key Points

5 | 6 | {% for episode in site.episodes %} 7 | {% unless episode.break %} 8 | 9 | 12 | 19 | 20 | {% endunless %} 21 | {% endfor %} 22 |
10 | {{ episode.title }} 11 | 13 |
    14 | {% for keypoint in episode.keypoints %} 15 |
  • {{ keypoint|markdownify }}
  • 16 | {% endfor %} 17 |
18 |
23 | -------------------------------------------------------------------------------- /_includes/carpentries.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | General description of Software and Data Carpentry. 3 | {% endcomment %} 4 |
5 |
6 | Software Carpentry logo 7 |
8 |
9 | Since 1998, 10 | Software Carpentry 11 | has been teaching researchers in science, engineering, medicine, and related disciplines 12 | the computing skills they need to get more done in less time and with less pain. 13 | Its volunteer instructors have run hundreds of events 14 | for thousands of learners in the past two and a half years. 15 |
16 |
17 |
18 |
19 |
20 | Data Carpentry logo 21 |
22 |
23 | Data Carpentry develops and teaches workshops on the fundamental data skills needed to conduct research. 24 | Its target audience is researchers who have little to no prior computational experience, 25 | and its lessons are domain specific, 26 | building on learners' existing knowledge to enable them to quickly apply skills learned to their own research. 27 |
28 |
29 |
30 |
31 |
32 | Library Carpentry logo 33 |
34 |
35 | Library Carpentry is made by librarians to help librarians 36 | automate repetitive, boring, error-prone tasks; 37 | create, maintain and analyse sustainable and reusable data; 38 | work effectively with IT and systems colleagues; 39 | better understand the use of software in research; 40 | and much more. 41 | Library Carpentry was the winner of the 2016 42 | British Library Labs Teaching and Learning Award. 43 |
44 |
45 | -------------------------------------------------------------------------------- /_includes/dc/intro.html: -------------------------------------------------------------------------------- 1 |

2 | Data Carpentry 3 | aims to help researchers get their work done 4 | in less time and with less pain 5 | by teaching them basic research computing skills. 6 | This hands-on workshop will cover basic concepts and tools, 7 | including program design, version control, data management, 8 | and task automation. 9 | Participants will be encouraged to help one another 10 | and to apply what they have learned to their own research problems. 11 |

12 |

13 | 14 | For more information on what we teach and why, 15 | please see our paper 16 | "Best Practices for Scientific Computing". 17 | 18 |

19 | -------------------------------------------------------------------------------- /_includes/dc/schedule.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Day 1

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
09:00 Automating tasks with the Unix shell
10:30 Coffee
12:00 Lunch break
13:00 Building programs with Python
14:30 Coffee
16:00 Wrap-up
12 |
13 |
14 |

Day 2

15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
09:00 Version control with Git
10:30 Coffee
12:00 Lunch break
13:00 Managing data with SQL
14:30 Coffee
16:00 Wrap-up
23 |
24 |
25 | -------------------------------------------------------------------------------- /_includes/dc/syllabus.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

The Unix Shell

4 |
    5 |
  • Files and directories
  • 6 |
  • History and tab completion
  • 7 |
  • Pipes and redirection
  • 8 |
  • Looping over files
  • 9 |
  • Creating and running shell scripts
  • 10 |
  • Finding things
  • 11 |
  • Reference...
  • 12 |
13 |
14 |
15 |

Programming in Python

16 |
    17 |
  • Using libraries
  • 18 |
  • Working with arrays
  • 19 |
  • Reading and plotting data
  • 20 |
  • Creating and using functions
  • 21 |
  • Loops and conditionals
  • 22 |
  • Defensive programming
  • 23 |
  • Using Python from the command line
  • 24 |
  • Reference...
  • 25 |
26 |
27 | 40 | 53 |
54 | 55 |
56 |
57 |

Version Control with Git

58 |
    59 |
  • Creating a repository
  • 60 |
  • Recording changes to files: add, commit, ...
  • 61 |
  • Viewing changes: status, diff, ...
  • 62 |
  • Ignoring files
  • 63 |
  • Working on the web: clone, pull, push, ...
  • 64 |
  • Resolving conflicts
  • 65 |
  • Open licenses
  • 66 |
  • Where to host work, and why
  • 67 |
  • Reference...
  • 68 |
69 |
70 | 86 |
87 |

Open Refine

88 |
    89 |
  • Introduction to OpenRefine
  • 90 |
  • Importing data
  • 91 |
  • Basic functions
  • 92 |
  • Advanced Functions
  • 93 |
  • Reference...
  • 94 |
95 |
96 |
97 | -------------------------------------------------------------------------------- /_includes/dc/who.html: -------------------------------------------------------------------------------- 1 |

2 | Who: 3 | The course is aimed at graduate students and other researchers. 4 | 5 | You don't need to have any previous knowledge of the tools 6 | that will be presented at the workshop. 7 | 8 |

9 | -------------------------------------------------------------------------------- /_includes/episode_break.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Display a break's timings in a box similar to a learning episode's. 3 | {% endcomment %} 4 |
5 |

Overview

6 | 7 |
8 |
9 | Break: {{ page.break }} min 10 |
11 |
12 |
13 |
14 | 15 |
16 | -------------------------------------------------------------------------------- /_includes/episode_keypoints.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Display key points for an episode. 3 | {% endcomment %} 4 |
5 |

Key Points

6 |
    7 | {% for keypoint in page.keypoints %} 8 |
  • {{ keypoint|markdownify }}
  • 9 | {% endfor %} 10 |
11 |
12 | -------------------------------------------------------------------------------- /_includes/episode_navbar.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Navigation bar for an episode. 3 | {% endcomment %} 4 |
5 |
6 |

7 | {% if page.previous.url %} 8 | previous episode 9 | {% else %} 10 | lesson home 11 | {% endif %} 12 |

13 |
14 |
15 | {% if include.episode_navbar_title %} 16 |

{{ site.title }}

17 | {% endif %} 18 |
19 |
20 |

21 | {% if page.next.url %} 22 | next episode 23 | {% else %} 24 | lesson home 25 | {% endif %} 26 |

27 |
28 |
29 | -------------------------------------------------------------------------------- /_includes/episode_overview.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Display an episode's timings and learning objectives. 3 | {% endcomment %} 4 |
5 |

Overview

6 | 7 |
8 |
9 | Teaching: {{ page.teaching }} min 10 |
11 | Exercises: {{ page.exercises }} min 12 |
13 |
14 | Questions 15 |
    16 | {% for question in page.questions %} 17 |
  • {{ question|markdownify }}
  • 18 | {% endfor %} 19 |
20 |
21 |
22 | 23 |
24 |
25 |
26 |
27 | Objectives 28 |
    29 | {% for objective in page.objectives %} 30 |
  • {{ objective|markdownify }}
  • 31 | {% endfor %} 32 |
33 |
34 |
35 | 36 |
37 | -------------------------------------------------------------------------------- /_includes/episode_title.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 |

{{ page.title }}

6 |
7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /_includes/favicons.html: -------------------------------------------------------------------------------- 1 | {% assign favicon_url = site.baseurl | append: '/assets/favicons/' | append: site.carpentry | prepend: site.url %} 2 | 3 | {% if site.carpentry == 'swc' %} 4 | {% assign carpentry = 'Software Carpentry' %} 5 | {% elsif site.carpentry == 'dc' %} 6 | {% assign carpentry = 'Data Carpentry' %} 7 | {% elsif site.carpentry == 'lc' %} 8 | {% assign carpentry = 'Library Carpentry' %} 9 | {% elsif site.carpentry == 'cp' %} 10 | {% assign carpentry = 'The Carpentries' %} 11 | {% endif %} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /_includes/javascript.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Javascript used in lesson and workshop pages. 3 | {% endcomment %} 4 | 5 | 6 | 7 | 15 | -------------------------------------------------------------------------------- /_includes/lc/intro.html: -------------------------------------------------------------------------------- 1 |

2 | Library Carpentry 3 | is made by librarians, for librarians to help you: 4 |

5 |
    6 |
  • automate repetitive, boring, error-prone tasks
  • 7 |
  • create, maintain and analyse sustainable and reusable data
  • 8 |
  • work effectively with IT and systems colleagues
  • 9 |
  • better understand the use of software in research
  • 10 |
  • and much more...
  • 11 |
12 |

13 | 14 | Library Carpentry introduces you to the fundamentals of computing 15 | and provides you with a platform for further self-directed learning. 16 | For more information on what we teach and why, please see our paper 17 | "Library Carpentry: software skills training for library professionals". 18 | 19 |

20 | -------------------------------------------------------------------------------- /_includes/lc/schedule.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Day 1

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
09:00 Data Intro for Librarians
10:30 Coffee
12:00 Lunch break
13:00 Shell Lessons for Libraries
14:30 Coffee
16:00 Wrap-up
12 |
13 |
14 |

Day 2

15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
09:00 Git Intro for Librarians
10:30 Coffee
12:00 Lunch break
13:00 OpenRefine for Librarians
14:30 Coffee
16:00 Wrap-up
23 |
24 |
25 | -------------------------------------------------------------------------------- /_includes/lc/syllabus.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Data Intro

4 |
    5 |
  • Intro to data
  • 6 |
  • Jargon busting
  • 7 |
  • Keyboard shortcuts
  • 8 |
  • Plain text formats
  • 9 |
  • Naming files
  • 10 |
  • Regular expressions
  • 11 |
  • Reference...
  • 12 |
13 |
14 |
15 |

The Unix Shell

16 |
    17 |
  • Files and directories
  • 18 |
  • History and tab completion
  • 19 |
  • Counting and sorting contents in files
  • 20 |
  • Pipes and redirection
  • 21 |
  • Mining or searching in files
  • 22 |
  • Reference...
  • 23 |
24 |
25 | 26 |
27 | 28 |
29 |
30 |

Version Control with Git

31 |
    32 |
  • Creating a repository
  • 33 |
  • Configuring git
  • 34 |
  • Recording changes to files: add, commit, ...
  • 35 |
  • Viewing state changes with status
  • 36 |
  • Working on the web: clone, pull, push, ...
  • 37 |
  • Where to host work, and why
  • 38 |
  • Reference...
  • 39 |
40 |
41 |
42 |
43 |

Open Refine

44 |
    45 |
  • Introduction to OpenRefine
  • 46 |
  • Importing data
  • 47 |
  • Basic functions
  • 48 |
  • Advanced Functions
  • 49 |
  • Reference...
  • 50 |
51 |
52 |
53 |
54 | 70 | -------------------------------------------------------------------------------- /_includes/lc/who.html: -------------------------------------------------------------------------------- 1 |

2 | Who: 3 | The course is for librarians, archivists, and other information workers. 4 | 5 | You don't need to have any previous knowledge of the tools that 6 | will be presented at the workshop. 7 | 8 |

9 | -------------------------------------------------------------------------------- /_includes/lesson_footer.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Footer for lesson pages. 3 | {% endcomment %} 4 | 52 | -------------------------------------------------------------------------------- /_includes/links.md: -------------------------------------------------------------------------------- 1 | [cc-by-human]: https://creativecommons.org/licenses/by/4.0/ 2 | [cc-by-legal]: https://creativecommons.org/licenses/by/4.0/legalcode 3 | [ci]: http://communityin.org/ 4 | [coc-reporting]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html#reporting-guidelines 5 | [coc]: https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html 6 | [concept-maps]: https://carpentries.github.io/instructor-training/05-memory/ 7 | [contrib-covenant]: https://contributor-covenant.org/ 8 | [contributing]: {{ site.github.repository_url }}/blob/gh-pages/CONTRIBUTING.md 9 | [cran-checkpoint]: https://cran.r-project.org/package=checkpoint 10 | [cran-knitr]: https://cran.r-project.org/package=knitr 11 | [cran-stringr]: https://cran.r-project.org/package=stringr 12 | [dc-lessons]: http://www.datacarpentry.org/lessons/ 13 | [email]: mailto:team@carpentries.org 14 | [github-importer]: https://import.github.com/ 15 | [importer]: https://github.com/new/import 16 | [jekyll-collection]: https://jekyllrb.com/docs/collections/ 17 | [jekyll-install]: https://jekyllrb.com/docs/installation/ 18 | [jekyll-windows]: http://jekyll-windows.juthilo.com/ 19 | [jekyll]: https://jekyllrb.com/ 20 | [jupyter]: https://jupyter.org/ 21 | [lc-lessons]: https://librarycarpentry.org/#portfolio 22 | [lesson-example]: https://carpentries.github.io/lesson-example/ 23 | [mit-license]: https://opensource.org/licenses/mit-license.html 24 | [morea]: https://morea-framework.github.io/ 25 | [numfocus]: https://numfocus.org/ 26 | [osi]: https://opensource.org 27 | [pandoc]: https://pandoc.org/ 28 | [paper-now]: https://github.com/PeerJ/paper-now 29 | [python-gapminder]: https://swcarpentry.github.io/python-novice-gapminder/ 30 | [pyyaml]: https://pypi.python.org/pypi/PyYAML 31 | [r-markdown]: https://rmarkdown.rstudio.com/ 32 | [rstudio]: https://www.rstudio.com/ 33 | [ruby-install-guide]: https://www.ruby-lang.org/en/downloads/ 34 | [ruby-installer]: https://rubyinstaller.org/ 35 | [rubygems]: https://rubygems.org/pages/download/ 36 | [styles]: https://github.com/carpentries/styles/ 37 | [swc-lessons]: https://software-carpentry.org/lessons/ 38 | [swc-releases]: https://github.com/swcarpentry/swc-releases 39 | [workshop-repo]: {{ site.workshop_repo }} 40 | [yaml]: http://yaml.org/ 41 | -------------------------------------------------------------------------------- /_includes/main_title.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Main title for lesson pages. 3 | {% endcomment %} 4 |

{{ site.title }}{% if page.title %}: {{ page.title }}{% endif %}

5 | -------------------------------------------------------------------------------- /_includes/navbar.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Lesson navigation bar. 3 | {% endcomment %} 4 | 91 | -------------------------------------------------------------------------------- /_includes/sc/intro.html: -------------------------------------------------------------------------------- 1 |

2 | Software Carpentry 3 | aims to help researchers get their work done 4 | in less time and with less pain 5 | by teaching them basic research computing skills. 6 | This hands-on workshop will cover basic concepts and tools, 7 | including program design, version control, data management, 8 | and task automation. 9 | Participants will be encouraged to help one another 10 | and to apply what they have learned to their own research problems. 11 |

12 |

13 | 14 | For more information on what we teach and why, 15 | please see our paper 16 | "Best Practices for Scientific Computing". 17 | 18 |

19 | -------------------------------------------------------------------------------- /_includes/sc/schedule.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

Day 1

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
09:00 Automating tasks with the Unix shell
10:30 Coffee
12:00 Lunch break
13:00 Building programs with Python
14:30 Coffee
16:00 Wrap-up
12 |
13 |
14 |

Day 2

15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
09:00 Version control with Git
10:30 Coffee
12:00 Lunch break
13:00 Managing data with SQL
14:30 Coffee
16:00 Wrap-up
23 |
24 |
25 | -------------------------------------------------------------------------------- /_includes/sc/syllabus.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

The Unix Shell

4 |
    5 |
  • Files and directories
  • 6 |
  • History and tab completion
  • 7 |
  • Pipes and redirection
  • 8 |
  • Looping over files
  • 9 |
  • Creating and running shell scripts
  • 10 |
  • Finding things
  • 11 |
  • Reference...
  • 12 |
13 |
14 |
15 |

Programming in Python

16 |
    17 |
  • Using libraries
  • 18 |
  • Working with arrays
  • 19 |
  • Reading and plotting data
  • 20 |
  • Creating and using functions
  • 21 |
  • Loops and conditionals
  • 22 |
  • Defensive programming
  • 23 |
  • Using Python from the command line
  • 24 |
  • Reference...
  • 25 |
26 |
27 | 40 | 53 |
54 | 55 |
56 |
57 |

Version Control with Git

58 |
    59 |
  • Creating a repository
  • 60 |
  • Recording changes to files: add, commit, ...
  • 61 |
  • Viewing changes: status, diff, ...
  • 62 |
  • Ignoring files
  • 63 |
  • Working on the web: clone, pull, push, ...
  • 64 |
  • Resolving conflicts
  • 65 |
  • Open licenses
  • 66 |
  • Where to host work, and why
  • 67 |
  • Reference...
  • 68 |
69 |
70 | 86 |
87 |

Open Refine

88 |
    89 |
  • Introduction to OpenRefine
  • 90 |
  • Importing data
  • 91 |
  • Basic functions
  • 92 |
  • Advanced Functions
  • 93 |
  • Reference...
  • 94 |
95 |
96 |
97 | -------------------------------------------------------------------------------- /_includes/sc/who.html: -------------------------------------------------------------------------------- 1 |

2 | Who: 3 | The course is aimed at graduate students and other researchers. 4 | 5 | You don't need to have any previous knowledge of the tools 6 | that will be presented at the workshop. 7 | 8 |

9 | -------------------------------------------------------------------------------- /_includes/syllabus.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Display syllabus in tabular form. 3 | Days are displayed if at least one episode has 'start = true'. 4 | {% endcomment %} 5 |
6 |

Schedule

7 | 8 | {% assign lesson_number = 0 %} 9 | {% assign day = 0 %} 10 | {% assign multiday = false %} 11 | {% for episode in site.episodes %} 12 | {% if episode.start %}{% assign multiday = true %}{% break %}{% endif %} 13 | {% endfor %} 14 | {% assign current = site.start_time %} 15 | 16 | 17 | 18 | {% if multiday %}{% endif %} 19 | 20 | 21 | 22 | 23 | {% for episode in site.episodes %} 24 | {% if episode.start %} {% comment %} Starting a new day? {% endcomment %} 25 | {% assign day = day | plus: 1 %} 26 | {% if day > 1 %} {% comment %} If about to start day 2 or later, show finishing time for previous day {% endcomment %} 27 | {% assign hours = current | divided_by: 60 %} 28 | {% assign minutes = current | modulo: 60 %} 29 | 30 | {% if multiday %}{% endif %} 31 | 32 | 33 | 34 | 35 | {% endif %} 36 | {% assign current = site.start_time %} {% comment %}Re-set start time of this episode to general daily start time {% endcomment %} 37 | {% endif %} 38 | {% assign hours = current | divided_by: 60 %} 39 | {% assign minutes = current | modulo: 60 %} 40 | 41 | {% if multiday %}{% endif %} 42 | 43 | 47 | 61 | 62 | {% assign current = current | plus: episode.teaching | plus: episode.exercises | plus: episode.break %} 63 | {% endfor %} 64 | {% assign hours = current | divided_by: 60 %} 65 | {% assign minutes = current | modulo: 60 %} 66 | 67 | {% if multiday %}{% endif %} 68 | 69 | 70 | 71 | 72 |
SetupDownload files required for the lesson
{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}Finish
{% if episode.start %}Day {{ day }}{% endif %}{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }} 44 | {% assign lesson_number = lesson_number | plus: 1 %} 45 | {{ lesson_number }}. {{ episode.title }} 46 | 48 | {% if episode.break %} 49 | Break 50 | {% else %} 51 | {% if episode.questions %} 52 | {% for question in episode.questions %} 53 | {{question|markdownify|strip_html}} 54 | {% unless forloop.last %} 55 |
56 | {% endunless %} 57 | {% endfor %} 58 | {% endif %} 59 | {% endif %} 60 |
{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}Finish
73 | 74 |

75 | The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor. 76 |

77 | 78 |
79 | -------------------------------------------------------------------------------- /_includes/workshop_ad.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Advertising box at the top of a workshop website home page. 3 | {% endcomment %} 4 |
5 |
6 |
7 |

{{page.venue}}

8 |
9 |
10 |

{{page.humandate}}

11 |

{% if page.humantime %}{{page.humantime}}{% endif %}

12 |
13 |
14 |

15 | Instructors: 16 | {% if page.instructor %} 17 | {{page.instructor | join: ', ' %}} 18 | {% else %} 19 | to be announced. 20 | {% endif %} 21 |

22 | {% if page.helper %} 23 |

24 | Helpers: 25 | {{page.helper | join: ', ' %}} 26 |

27 | {% endif %} 28 |
29 |
30 |
31 |
32 |
33 | -------------------------------------------------------------------------------- /_includes/workshop_footer.html: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Footer for a standard workshop. 3 | {% endcomment %} 4 |
5 |
6 |
7 |

8 | Copyright © 2016–{{ 'now' | date: "%Y" }} 9 | {% if site.carpentry == "swc" %} 10 | Software Carpentry 11 | {% elsif site.carpentry == "dc" %} 12 | Data Carpentry 13 | {% elsif site.carpentry == "lc" %} 14 | Library Carpentry 15 | {% elsif site.carpentry == "cp" %} 16 | The Carpentries 17 | {% endif %} 18 |

19 |
20 |
21 |

22 | Contact 23 |

24 |
25 |
26 |
27 | -------------------------------------------------------------------------------- /_layouts/base.html: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | {% include favicons.html %} 18 | 19 | 20 | 21 | 25 | {{ site.title }}{% if page.title %}: {{ page.title }}{% endif %} 26 | 27 | 28 |
29 | {% include navbar.html %} 30 | {{ content }} 31 | {% if site.kind == "workshop" %} 32 | {% include workshop_footer.html %} 33 | {% else %} 34 | {% include lesson_footer.html %} 35 | {% endif %} 36 |
37 | {% include javascript.html %} 38 | 39 | 40 | -------------------------------------------------------------------------------- /_layouts/break.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | --- 4 | {% include episode_navbar.html episode_navbar_title=true %} 5 |
6 | {% include episode_title.html %} 7 | {% include episode_break.html %} 8 | {{content}} 9 |
10 | {% include episode_navbar.html episode_navbar_title=false %} 11 | -------------------------------------------------------------------------------- /_layouts/episode.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | --- 4 | {% include episode_navbar.html episode_navbar_title=true %} 5 |
6 | {% include episode_title.html %} 7 | {% include episode_overview.html %} 8 | {{content}} 9 | {% include episode_keypoints.html %} 10 |
11 | {% include episode_navbar.html episode_navbar_title=false %} 12 | -------------------------------------------------------------------------------- /_layouts/lesson.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | --- 4 | {% include main_title.html %} 5 | {{ content }} 6 | {% include syllabus.html %} 7 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: base 3 | --- 4 | {% include main_title.html %} 5 | {{content}} 6 | -------------------------------------------------------------------------------- /_layouts/reference.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "Reference" 4 | --- 5 | {% include all_keypoints.html %} 6 | {{content}} 7 | -------------------------------------------------------------------------------- /_layouts/workshop.html: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% if page.redirect %} 21 | 22 | {% endif %} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | {% include favicons.html %} 33 | 34 | 35 | 36 | 40 | {{ page.venue }}: {{ page.humandate }} 41 | 42 | 43 |
44 | {% include navbar.html %} 45 | {% include workshop_ad.html %} 46 | {{ content }} 47 | {% include workshop_footer.html %} 48 |
49 | {% include javascript.html %} 50 | 51 | 52 | -------------------------------------------------------------------------------- /aio.md: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 29 | {% comment %} 30 | Create anchor for each one of the episodes. 31 | {% endcomment %} 32 | {% for episode in site.episodes %} 33 |
34 | {% endfor %} 35 | -------------------------------------------------------------------------------- /assets/css/lesson.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | //---------------------------------------- 5 | // Colors. 6 | //---------------------------------------- 7 | 8 | // branding 9 | $color-brand: #2b3990 !default; 10 | 11 | // code boxes 12 | $color-error: #bd2c00 !default; 13 | $color-output: #303030 !default; 14 | $color-source: #6e5494 !default; 15 | 16 | // blockquotes 17 | $color-callout: #f4fd9c !default; 18 | $color-challenge: #eec275 !default; 19 | $color-checklist: #dfd2a0 !default; 20 | $color-discussion: #eec275 !default; 21 | $color-keypoints: #7ae78e !default; 22 | $color-objectives: #daee84 !default; 23 | $color-prereq: #9cd6dc !default; 24 | $color-solution: #ded4b9 !default; 25 | $color-testimonial: #fc8dc1 !default; 26 | 27 | //---------------------------------------- 28 | // Specialized code blocks. 29 | //---------------------------------------- 30 | 31 | @mixin cdSetup($color) { 32 | color: $color; 33 | border-left: solid 5px $color; 34 | margin-bottom: 0px; 35 | border-radius: 4px 0 0 4px; 36 | } 37 | 38 | .error { @include cdSetup($color-error); } 39 | .output { @include cdSetup($color-output); } 40 | .source { @include cdSetup($color-source); } 41 | 42 | .bash, .language-bash { @include cdSetup($color-source); } 43 | .make, .language-make { @include cdSetup($color-source); } 44 | .matlab, .language-matlab { @include cdSetup($color-source); } 45 | .python, .language-python { @include cdSetup($color-source); } 46 | .r, .language-r { @include cdSetup($color-source); } 47 | .sql, .langauge-sql { @include cdSetup($color-source); } 48 | 49 | .error pre, 50 | .output pre, 51 | .source pre, 52 | .bash pre, 53 | .language-bash pre, 54 | .make pre, 55 | .language-make pre, 56 | .matlab pre, 57 | .language-matlab pre, 58 | .python pre, 59 | .language-python pre, 60 | .r pre, 61 | .language-r pre, 62 | .sql pre , 63 | .language-sql pre { 64 | border-radius: 0 4px 4px 0; 65 | } 66 | 67 | //---------------------------------------- 68 | // Specialized blockquote environments for learning objectives, callouts, etc. 69 | //---------------------------------------- 70 | 71 | $codeblock-padding: 5px !default; 72 | 73 | @mixin bkSetup($color, $glyph) { 74 | 75 | $gradientcolor1: $color; 76 | $gradientcolor2: scale-color($color, $lightness: 10%); 77 | 78 | padding-left: $codeblock-padding; 79 | padding-top: 0; 80 | padding-bottom: 0; 81 | padding-right: 0; 82 | border: 1px solid; 83 | border-color: $color; 84 | padding-bottom: $codeblock-padding; 85 | 86 | h2 { 87 | padding-top: $codeblock-padding; 88 | padding-bottom: $codeblock-padding; 89 | font-size: 20px; 90 | background: linear-gradient(to bottom, $gradientcolor1, $gradientcolor2); 91 | border-color: $color; 92 | margin-top: 0px; 93 | margin-left: -$codeblock-padding; // to move back to the left margin of the enclosing blockquote 94 | } 95 | h2:before { 96 | font-family: 'Glyphicons Halflings'; 97 | content: $glyph; 98 | float: left; 99 | padding-left: $codeblock-padding; 100 | padding-right: $codeblock-padding; 101 | display: inline-block; 102 | -webkit-font-smoothing: antialiased; 103 | } 104 | 105 | } 106 | 107 | .callout{ @include bkSetup($color-callout, "\e146"); } 108 | .challenge{ @include bkSetup($color-challenge, "\270f"); } 109 | .checklist{ @include bkSetup($color-checklist, "\e067"); } 110 | .discussion{ @include bkSetup($color-discussion, "\e123"); } 111 | .keypoints{ @include bkSetup($color-keypoints, "\e101"); } 112 | .objectives{ @include bkSetup($color-objectives, "\e085"); } 113 | .prereq{ @include bkSetup($color-prereq, "\e124"); } 114 | .solution{ @include bkSetup($color-solution, "\e105"); } 115 | .testimonial{ @include bkSetup($color-testimonial, "\e143"); } 116 | 117 | .callout h3, 118 | .challenge h3, 119 | .checklist h3, 120 | .discussion h3, 121 | .keypoints h3, 122 | .objectives h3, 123 | .prereq h3, 124 | .solution h3, 125 | .testimonial h3 { 126 | font-size: 18px; 127 | } 128 | 129 | //---------------------------------------- 130 | // Override Bootstrap settings. 131 | //---------------------------------------- 132 | 133 | code { 134 | white-space: nowrap; 135 | padding: 2px 5px; 136 | color: #3d90d9; 137 | background-color: #e7e7e7; 138 | } 139 | 140 | img { 141 | max-width: 100%; 142 | } 143 | 144 | //---------------------------------------- 145 | // Miscellaneous. 146 | //---------------------------------------- 147 | 148 | .maintitle { 149 | text-align: center; 150 | } 151 | 152 | .footertext { 153 | text-align: center; 154 | } 155 | 156 | footer .copyright, 157 | footer .help-links 158 | { 159 | font-size: 18px; 160 | margin-top: 10px; 161 | margin-bottom: 10px; 162 | font-weight: 500; 163 | line-height: 1.1; 164 | } 165 | 166 | img.navbar-logo { 167 | height: 40px; // synchronize with height of navbar 168 | padding-top: 5px; 169 | padding-right: 10px; 170 | } 171 | 172 | div.branding { 173 | color: $color-brand; 174 | } 175 | 176 | ul, 177 | ol { 178 | padding-left: 2em; 179 | } 180 | 181 | span.fold-unfold { 182 | margin-left: 1em; 183 | opacity: 0.5; 184 | } 185 | 186 | 187 | //---------------------------------------- 188 | // keyboard key style, from StackExchange. 189 | //---------------------------------------- 190 | 191 | kbd { 192 | display: inline-block; 193 | margin: 0 .1em; 194 | padding: .1em .6em; 195 | font-family: Arial,"Helvetica Neue",Helvetica,sans-serif; 196 | font-size: 11px; 197 | line-height: 1.4; 198 | color: #242729; 199 | text-shadow: 0 1px 0 #FFF; 200 | background-color: #e1e3e5; 201 | border: 1px solid #adb3b9; 202 | border-radius: 3px; 203 | box-shadow: 0 1px 0 rgba(12,13,14,0.2), 0 0 0 2px #FFF inset; 204 | white-space: nowrap; 205 | font-style: normal; 206 | } 207 | -------------------------------------------------------------------------------- /assets/css/syntax.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #f8f8f8; } 3 | .highlight .c { color: #408080; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ 8 | .highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ 9 | .highlight .cp { color: #BC7A00 } /* Comment.Preproc */ 10 | .highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ 11 | .highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ 12 | .highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ 13 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 14 | .highlight .ge { font-style: italic } /* Generic.Emph */ 15 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 16 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 17 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 18 | .highlight .go { color: #888888 } /* Generic.Output */ 19 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 20 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 21 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 22 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 23 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 24 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 25 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 26 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 27 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 28 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 29 | .highlight .m { color: #666666 } /* Literal.Number */ 30 | .highlight .s { color: #BA2121 } /* Literal.String */ 31 | .highlight .na { color: #7D9029 } /* Name.Attribute */ 32 | .highlight .nb { color: #008000 } /* Name.Builtin */ 33 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 34 | .highlight .no { color: #880000 } /* Name.Constant */ 35 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 36 | .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ 37 | .highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ 38 | .highlight .nf { color: #0000FF } /* Name.Function */ 39 | .highlight .nl { color: #A0A000 } /* Name.Label */ 40 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 41 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 42 | .highlight .nv { color: #19177C } /* Name.Variable */ 43 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 44 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 45 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */ 46 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 47 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 48 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 49 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 50 | .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ 51 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 52 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 53 | .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ 54 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 55 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 56 | .highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ 57 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 58 | .highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ 59 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 60 | .highlight .sr { color: #BB6688 } /* Literal.String.Regex */ 61 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 62 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 63 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 64 | .highlight .fm { color: #0000FF } /* Name.Function.Magic */ 65 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 66 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 67 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 68 | .highlight .vm { color: #19177C } /* Name.Variable.Magic */ 69 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ 70 | -------------------------------------------------------------------------------- /assets/favicons/cp/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /assets/favicons/cp/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /assets/favicons/cp/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /assets/favicons/cp/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /assets/favicons/cp/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /assets/favicons/cp/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /assets/favicons/cp/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /assets/favicons/cp/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /assets/favicons/cp/favicon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/favicon-128.png -------------------------------------------------------------------------------- /assets/favicons/cp/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/favicon-16x16.png -------------------------------------------------------------------------------- /assets/favicons/cp/favicon-196x196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/favicon-196x196.png -------------------------------------------------------------------------------- /assets/favicons/cp/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/favicon-32x32.png -------------------------------------------------------------------------------- /assets/favicons/cp/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/favicon-96x96.png -------------------------------------------------------------------------------- /assets/favicons/cp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/favicon.ico -------------------------------------------------------------------------------- /assets/favicons/cp/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/mstile-144x144.png -------------------------------------------------------------------------------- /assets/favicons/cp/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/mstile-150x150.png -------------------------------------------------------------------------------- /assets/favicons/cp/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/mstile-310x150.png -------------------------------------------------------------------------------- /assets/favicons/cp/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/mstile-310x310.png -------------------------------------------------------------------------------- /assets/favicons/cp/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/cp/mstile-70x70.png -------------------------------------------------------------------------------- /assets/favicons/dc/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /assets/favicons/dc/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /assets/favicons/dc/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /assets/favicons/dc/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /assets/favicons/dc/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /assets/favicons/dc/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /assets/favicons/dc/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /assets/favicons/dc/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /assets/favicons/dc/favicon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/favicon-128.png -------------------------------------------------------------------------------- /assets/favicons/dc/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/favicon-16x16.png -------------------------------------------------------------------------------- /assets/favicons/dc/favicon-196x196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/favicon-196x196.png -------------------------------------------------------------------------------- /assets/favicons/dc/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/favicon-32x32.png -------------------------------------------------------------------------------- /assets/favicons/dc/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/favicon-96x96.png -------------------------------------------------------------------------------- /assets/favicons/dc/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/favicon.ico -------------------------------------------------------------------------------- /assets/favicons/dc/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/mstile-144x144.png -------------------------------------------------------------------------------- /assets/favicons/dc/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/mstile-150x150.png -------------------------------------------------------------------------------- /assets/favicons/dc/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/mstile-310x150.png -------------------------------------------------------------------------------- /assets/favicons/dc/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/mstile-310x310.png -------------------------------------------------------------------------------- /assets/favicons/dc/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/dc/mstile-70x70.png -------------------------------------------------------------------------------- /assets/favicons/lc/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /assets/favicons/lc/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /assets/favicons/lc/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /assets/favicons/lc/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /assets/favicons/lc/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /assets/favicons/lc/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /assets/favicons/lc/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /assets/favicons/lc/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /assets/favicons/lc/favicon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/favicon-128.png -------------------------------------------------------------------------------- /assets/favicons/lc/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/favicon-16x16.png -------------------------------------------------------------------------------- /assets/favicons/lc/favicon-196x196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/favicon-196x196.png -------------------------------------------------------------------------------- /assets/favicons/lc/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/favicon-32x32.png -------------------------------------------------------------------------------- /assets/favicons/lc/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/favicon-96x96.png -------------------------------------------------------------------------------- /assets/favicons/lc/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/favicon.ico -------------------------------------------------------------------------------- /assets/favicons/lc/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/mstile-144x144.png -------------------------------------------------------------------------------- /assets/favicons/lc/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/mstile-150x150.png -------------------------------------------------------------------------------- /assets/favicons/lc/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/mstile-310x150.png -------------------------------------------------------------------------------- /assets/favicons/lc/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/mstile-310x310.png -------------------------------------------------------------------------------- /assets/favicons/lc/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/lc/mstile-70x70.png -------------------------------------------------------------------------------- /assets/favicons/swc/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /assets/favicons/swc/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /assets/favicons/swc/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /assets/favicons/swc/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /assets/favicons/swc/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /assets/favicons/swc/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /assets/favicons/swc/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /assets/favicons/swc/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /assets/favicons/swc/favicon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/favicon-128.png -------------------------------------------------------------------------------- /assets/favicons/swc/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/favicon-16x16.png -------------------------------------------------------------------------------- /assets/favicons/swc/favicon-196x196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/favicon-196x196.png -------------------------------------------------------------------------------- /assets/favicons/swc/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/favicon-32x32.png -------------------------------------------------------------------------------- /assets/favicons/swc/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/favicon-96x96.png -------------------------------------------------------------------------------- /assets/favicons/swc/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/favicon.ico -------------------------------------------------------------------------------- /assets/favicons/swc/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/mstile-144x144.png -------------------------------------------------------------------------------- /assets/favicons/swc/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/mstile-150x150.png -------------------------------------------------------------------------------- /assets/favicons/swc/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/mstile-310x150.png -------------------------------------------------------------------------------- /assets/favicons/swc/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/mstile-310x310.png -------------------------------------------------------------------------------- /assets/favicons/swc/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/favicons/swc/mstile-70x70.png -------------------------------------------------------------------------------- /assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /assets/img/cp-logo-blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/img/dc-icon-black.svg: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | 21 | image/svg+xml 22 | 24 | 25 | 26 | 27 | 28 | 30 | 54 | 59 | 64 | 69 | 74 | 75 | -------------------------------------------------------------------------------- /assets/img/dc-logo-black.svg: -------------------------------------------------------------------------------- 1 | 2 | 16 | 18 | 19 | 21 | image/svg+xml 22 | 24 | 25 | 26 | 27 | 28 | 30 | 54 | 59 | 64 | 69 | 74 | 75 | -------------------------------------------------------------------------------- /assets/img/lc-icon-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/img/lc-icon-black.png -------------------------------------------------------------------------------- /assets/img/lc-logo-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/img/lc-logo-black.png -------------------------------------------------------------------------------- /assets/img/swc-icon-blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /assets/img/swc-logo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/img/swc-logo-blue.png -------------------------------------------------------------------------------- /assets/img/swc-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/assets/img/swc-logo-white.png -------------------------------------------------------------------------------- /assets/js/lesson.js: -------------------------------------------------------------------------------- 1 | // Make all tables striped by default. 2 | $("table").addClass("table table-striped"); 3 | 4 | 5 | // Handle foldable challenges and solutions (on click and at start). 6 | $(".solution").click(function(event) { 7 | var trigger = $(event.target).has(".fold-unfold").size() > 0 8 | || $(event.target).filter(".fold-unfold").size() > 0; 9 | if (trigger) { 10 | $(">*:not(h2)", this).toggle(400); 11 | $(">h2>span.fold-unfold", this).toggleClass("glyphicon-collapse-down glyphicon-collapse-up"); 12 | event.stopPropagation(); 13 | } 14 | }); 15 | $(".solution").each(function() { 16 | $(">*:not(h2)", this).toggle(); 17 | var h2 = $("h2:first", this); 18 | h2.append(""); 19 | }); 20 | 21 | 22 | // Handle searches. 23 | // Relies on document having 'meta' element with name 'search-domain'. 24 | function google_search() { 25 | var query = document.getElementById("google-search").value; 26 | var domain = $("meta[name=search-domain]").attr("value"); 27 | window.open("https://www.google.com/search?q=" + query + "+site:" + domain); 28 | } 29 | -------------------------------------------------------------------------------- /bin/boilerplate/.travis.yml: -------------------------------------------------------------------------------- 1 | # dist: trusty # Ubuntu 14.04 2 | language: python 3 | python: 3.6 4 | branches: 5 | only: 6 | - gh-pages 7 | - /.*/ 8 | before_install: 9 | - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 10 | - echo "deb https://cran.rstudio.com/bin/linux/ubuntu trusty/" | sudo tee -a /etc/apt/sources.list 11 | - sudo apt-get update -y 12 | - sudo apt-get install -y r-base 13 | - sudo Rscript -e "install.packages('knitr', repos = 'https://', dependencies = TRUE)" 14 | - sudo Rscript -e "install.packages('stringr', repos = 'https://cran.rstudio.com', dependencies = TRUE)" 15 | - sudo Rscript -e "install.packages('checkpoint', repos = 'https://cran.rstudio.com', dependencies = TRUE)" 16 | - sudo Rscript -e "install.packages('ggplot2', repos = 'https://cran.rstudio.com', dependencies = TRUE)" 17 | - rvm default 18 | - gem install json kramdown jekyll 19 | install: 20 | - pip install pyyaml 21 | script: 22 | - make lesson-check-all 23 | - make --always-make site 24 | -------------------------------------------------------------------------------- /bin/boilerplate/AUTHORS: -------------------------------------------------------------------------------- 1 | FIXME: list authors' names and email addresses. -------------------------------------------------------------------------------- /bin/boilerplate/CITATION: -------------------------------------------------------------------------------- 1 | FIXME: describe how to cite this lesson. -------------------------------------------------------------------------------- /bin/boilerplate/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "Contributor Code of Conduct" 4 | --- 5 | As contributors and maintainers of this project, 6 | we pledge to follow the [Carpentry Code of Conduct][coc]. 7 | 8 | Instances of abusive, harassing, or otherwise unacceptable behavior 9 | may be reported by following our [reporting guidelines][coc-reporting]. 10 | 11 | {% include links.md %} 12 | -------------------------------------------------------------------------------- /bin/boilerplate/README.md: -------------------------------------------------------------------------------- 1 | # FIXME Lesson title 2 | 3 | [![Create a Slack Account with us](https://img.shields.io/badge/Create_Slack_Account-The_Carpentries-071159.svg)](https://swc-slack-invite.herokuapp.com/) 4 | 5 | FIXME 6 | 7 | ## Contributing 8 | 9 | We welcome all contributions to improve the lesson! Maintainers will do their best to help you if you have any 10 | questions, concerns, or experience any difficulties along the way. 11 | 12 | We'd like to ask you to familiarize yourself with our [Contribution Guide](CONTRIBUTING.md) and have a look at 13 | the [more detailed guidelines][lesson-example] on proper formatting, ways to render the lesson locally, and even 14 | how to write new episodes. 15 | 16 | ## Maintainer(s) 17 | 18 | * FIXME 19 | 20 | ## Authors 21 | 22 | A list of contributors to the lesson can be found in [AUTHORS](AUTHORS) 23 | 24 | ## Citation 25 | 26 | To cite this lesson, please consult with [CITATION](CITATION) 27 | 28 | [lesson-example]: https://carpentries.github.io/lesson-example 29 | -------------------------------------------------------------------------------- /bin/boilerplate/_config.yml: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------ 2 | # Values for this lesson. 3 | #------------------------------------------------------------ 4 | 5 | # Which carpentry is this ("swc", "dc", "lc", or "cp")? 6 | # swc: Software Carpentry 7 | # dc: Data Carpentry 8 | # lc: Library Carpentry 9 | # cp: Carpentries (to use for instructor traning for instance) 10 | carpentry: "swc" 11 | 12 | # Overall title for pages. 13 | title: "Lesson Title" 14 | 15 | #------------------------------------------------------------ 16 | # Generic settings (should not need to change). 17 | #------------------------------------------------------------ 18 | 19 | # What kind of thing is this ("workshop" or "lesson")? 20 | kind: "lesson" 21 | 22 | # Magic to make URLs resolve both locally and on GitHub. 23 | # See https://help.github.com/articles/repository-metadata-on-github-pages/. 24 | # Please don't change it: / is correct. 25 | repository: / 26 | 27 | # Email address, no mailto: 28 | email: "team@carpentries.org" 29 | 30 | # Sites. 31 | amy_site: "https://amy.software-carpentry.org/workshops" 32 | carpentries_github: "https://github.com/carpentries" 33 | carpentries_pages: "https://carpentries.github.io" 34 | carpentries_site: "https://carpentries.org/" 35 | dc_site: "http://datacarpentry.org" 36 | example_repo: "https://github.com/carpentries/lesson-example" 37 | example_site: "https://carpentries.github.io/lesson-example" 38 | lc_site: "https://librarycarpentry.github.io/" 39 | swc_github: "https://github.com/swcarpentry" 40 | swc_pages: "https://swcarpentry.github.io" 41 | swc_site: "https://software-carpentry.org" 42 | template_repo: "https://github.com/carpentries/styles" 43 | training_site: "https://carpentries.github.io/instructor-training" 44 | workshop_repo: "https://github.com/carpentries/workshop-template" 45 | workshop_site: "https://carpentries.github.io/workshop-template" 46 | 47 | # Surveys. 48 | pre_survey: "https://www.surveymonkey.com/r/swc_pre_workshop_v1?workshop_id=" 49 | post_survey: "https://www.surveymonkey.com/r/swc_post_workshop_v1?workshop_id=" 50 | training_post_survey: "https://www.surveymonkey.com/r/post-instructor-training" 51 | 52 | # Start time in minutes (0 to be clock-independent, 540 to show a start at 09:00 am). 53 | start_time: 0 54 | 55 | # Specify that things in the episodes collection should be output. 56 | collections: 57 | episodes: 58 | output: true 59 | permalink: /:path/index.html 60 | extras: 61 | output: true 62 | permalink: /:path/index.html 63 | 64 | # Set the default layout for things in the episodes collection. 65 | defaults: 66 | - values: 67 | root: . 68 | layout: page 69 | - scope: 70 | path: "" 71 | type: episodes 72 | values: 73 | root: .. 74 | layout: episode 75 | - scope: 76 | path: "" 77 | type: extras 78 | values: 79 | root: .. 80 | layout: page 81 | 82 | # Files and directories that are not to be copied. 83 | exclude: 84 | - Makefile 85 | - bin/ 86 | - .Rproj.user/ 87 | 88 | # Turn on built-in syntax highlighting. 89 | highlighter: rouge 90 | -------------------------------------------------------------------------------- /bin/boilerplate/_episodes/01-introduction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Introduction" 3 | teaching: 0 4 | exercises: 0 5 | questions: 6 | - "Key question (FIXME)" 7 | objectives: 8 | - "First objective. (FIXME)" 9 | keypoints: 10 | - "First key point. (FIXME)" 11 | --- 12 | FIXME 13 | 14 | {% include links.md %} 15 | -------------------------------------------------------------------------------- /bin/boilerplate/_extras/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | --- 4 | {% include carpentries.html %} 5 | {% include links.md %} 6 | -------------------------------------------------------------------------------- /bin/boilerplate/_extras/discuss.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Discussion 3 | --- 4 | FIXME 5 | 6 | {% include links.md %} 7 | -------------------------------------------------------------------------------- /bin/boilerplate/_extras/figures.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Figures 3 | --- 4 | 33 | {% comment %} 34 | Create anchor for each one of the episodes. 35 | {% endcomment %} 36 | {% for episode in site.episodes %} 37 |
38 | {% endfor %} 39 | 40 | {% include links.md %} 41 | -------------------------------------------------------------------------------- /bin/boilerplate/_extras/guide.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Instructor Notes" 3 | --- 4 | FIXME 5 | 6 | {% include links.md %} 7 | -------------------------------------------------------------------------------- /bin/boilerplate/aio.md: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 29 | {% comment %} 30 | Create anchor for each one of the episodes. 31 | {% endcomment %} 32 | {% for episode in site.episodes %} 33 |
34 | {% endfor %} 35 | -------------------------------------------------------------------------------- /bin/boilerplate/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: lesson 3 | root: . # Is the only page that don't follow the partner /:path/index.html 4 | permalink: index.html # Is the only page that don't follow the partner /:path/index.html 5 | --- 6 | FIXME: home page introduction 7 | 8 | > ## Prerequisites 9 | > 10 | > FIXME 11 | {: .prereq} 12 | 13 | {% include links.md %} 14 | -------------------------------------------------------------------------------- /bin/boilerplate/reference.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: reference 3 | --- 4 | 5 | ## Glossary 6 | 7 | FIXME 8 | 9 | {% include links.md %} 10 | -------------------------------------------------------------------------------- /bin/boilerplate/setup.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Setup 3 | --- 4 | FIXME 5 | 6 | 7 | {% include links.md %} 8 | -------------------------------------------------------------------------------- /bin/chunk-options.R: -------------------------------------------------------------------------------- 1 | # These settings control the behavior of all chunks in the novice R materials. 2 | # For example, to generate the lessons with all the output hidden, simply change 3 | # `results` from "markup" to "hide". 4 | # For more information on available chunk options, see 5 | # http://yihui.name/knitr/options#chunk_options 6 | 7 | library("knitr") 8 | 9 | fix_fig_path <- function(pth) file.path("..", pth) 10 | 11 | 12 | ## We set the path for the figures globally below, so if we want to 13 | ## customize it for individual episodes, we can append a prefix to the 14 | ## global path. For instance, if we call knitr_fig_path("01-") in the 15 | ## first episode of the lesson, it will generate the figures in 16 | ## `fig/rmd-01-` 17 | knitr_fig_path <- function(prefix) { 18 | new_path <- paste0(opts_chunk$get("fig.path"), 19 | prefix) 20 | opts_chunk$set(fig.path = new_path) 21 | } 22 | 23 | ## We use the rmd- prefix for the figures generated by the lssons so 24 | ## they can be easily identified and deleted by `make clean-rmd`. The 25 | ## working directory when the lessons are generated is the root so the 26 | ## figures need to be saved in fig/, but when the site is generated, 27 | ## the episodes will be one level down. We fix the path using the 28 | ## `fig.process` option. 29 | 30 | opts_chunk$set(tidy = FALSE, results = "markup", comment = NA, 31 | fig.align = "center", fig.path = "fig/rmd-", 32 | fig.process = fix_fig_path) 33 | 34 | # The hooks below add html tags to the code chunks and their output so that they 35 | # are properly formatted when the site is built. 36 | 37 | hook_in <- function(x, options) { 38 | stringr::str_c("\n\n~~~\n", 39 | paste0(x, collapse="\n"), 40 | "\n~~~\n{: .language-r}\n\n") 41 | } 42 | 43 | hook_out <- function(x, options) { 44 | x <- gsub("\n$", "", x) 45 | stringr::str_c("\n\n~~~\n", 46 | paste0(x, collapse="\n"), 47 | "\n~~~\n{: .output}\n\n") 48 | } 49 | 50 | hook_error <- function(x, options) { 51 | x <- gsub("\n$", "", x) 52 | stringr::str_c("\n\n~~~\n", 53 | paste0(x, collapse="\n"), 54 | "\n~~~\n{: .error}\n\n") 55 | } 56 | 57 | knit_hooks$set(source = hook_in, output = hook_out, warning = hook_error, 58 | error = hook_error, message = hook_out) 59 | -------------------------------------------------------------------------------- /bin/generate_md_episodes.R: -------------------------------------------------------------------------------- 1 | generate_md_episodes <- function() { 2 | 3 | library("methods") 4 | 5 | if (require("knitr") && packageVersion("knitr") < '1.9.19') 6 | stop("knitr must be version 1.9.20 or higher") 7 | 8 | if (!require("stringr")) 9 | stop("The package stringr is required for generating the lessons.") 10 | 11 | if (require("checkpoint") && packageVersion("checkpoint") >= '0.4.0') { 12 | required_pkgs <- 13 | checkpoint:::scanForPackages(project = "_episodes_rmd", 14 | verbose=FALSE, use.knitr = TRUE)$pkgs 15 | } else { 16 | stop("The checkpoint package (>= 0.4.0) is required to build the lessons.") 17 | } 18 | 19 | missing_pkgs <- required_pkgs[!(required_pkgs %in% rownames(installed.packages()))] 20 | 21 | if (length(missing_pkgs)) { 22 | message("Installing missing required packages: ", 23 | paste(missing_pkgs, collapse=", ")) 24 | install.packages(missing_pkgs) 25 | } 26 | 27 | ## find all the Rmd files, and generate the paths for their respective outputs 28 | src_rmd <- list.files(pattern = "??-*.Rmd$", path = "_episodes_rmd", full.names = TRUE) 29 | dest_md <- file.path("_episodes", gsub("Rmd$", "md", basename(src_rmd))) 30 | 31 | ## knit the Rmd into markdown 32 | mapply(function(x, y) { 33 | knitr::knit(x, output = y) 34 | }, src_rmd, dest_md) 35 | 36 | # Read the generated md files and add comments advising not to edit them 37 | vapply(dest_md, function(y) { 38 | con <- file(y) 39 | mdfile <- readLines(con) 40 | if (mdfile[1] != "---") 41 | stop("Input file does not have a valid header") 42 | mdfile <- append(mdfile, "# Please do not edit this file directly; it is auto generated.", after = 1) 43 | mdfile <- append(mdfile, paste("# Instead, please edit", 44 | basename(y), "in _episodes_rmd/"), after = 2) 45 | writeLines(mdfile, con) 46 | close(con) 47 | return(paste("Warning added to YAML header of", y)) 48 | }, 49 | character(1)) 50 | } 51 | 52 | generate_md_episodes() 53 | -------------------------------------------------------------------------------- /bin/knit_lessons.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Only try running R to translate files if there are some files present. 4 | # The Makefile passes in the names of files. 5 | 6 | if [ $# -ne 0 ] ; then 7 | Rscript -e "source('bin/generate_md_episodes.R')" 8 | fi 9 | -------------------------------------------------------------------------------- /bin/lesson_initialize.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | """Initialize a newly-created repository.""" 4 | 5 | 6 | import sys 7 | import os 8 | import shutil 9 | 10 | BOILERPLATE = ( 11 | '.travis.yml', 12 | 'AUTHORS', 13 | 'CITATION', 14 | 'CODE_OF_CONDUCT.md', 15 | 'CONTRIBUTING.md', 16 | 'README.md', 17 | '_config.yml', 18 | '_episodes/01-introduction.md', 19 | '_extras/about.md', 20 | '_extras/discuss.md', 21 | '_extras/figures.md', 22 | '_extras/guide.md', 23 | 'aio.md', 24 | 'index.md', 25 | 'reference.md', 26 | 'setup.md', 27 | ) 28 | 29 | 30 | def main(): 31 | """Check for collisions, then create.""" 32 | 33 | # Check. 34 | errors = False 35 | for path in BOILERPLATE: 36 | if os.path.exists(path): 37 | print('Warning: {0} already exists.'.format(path), file=sys.stderr) 38 | errors = True 39 | if errors: 40 | print('**Exiting without creating files.**', file=sys.stderr) 41 | sys.exit(1) 42 | 43 | # Create. 44 | for path in BOILERPLATE: 45 | shutil.copyfile( 46 | "bin/boilerplate/{}".format(path), 47 | path 48 | ) 49 | 50 | 51 | if __name__ == '__main__': 52 | main() 53 | -------------------------------------------------------------------------------- /bin/markdown_ast.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # Use Kramdown parser to produce AST for Markdown document. 4 | 5 | require "kramdown" 6 | require "json" 7 | 8 | markdown = STDIN.read() 9 | doc = Kramdown::Document.new(markdown) 10 | tree = doc.to_hash_a_s_t 11 | puts JSON.pretty_generate(tree) 12 | -------------------------------------------------------------------------------- /bin/repo_check.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | """ 4 | Check repository settings. 5 | """ 6 | 7 | 8 | import sys 9 | import os 10 | from subprocess import Popen, PIPE 11 | import re 12 | from argparse import ArgumentParser 13 | 14 | from util import Reporter, require 15 | 16 | # Import this way to produce a more useful error message. 17 | try: 18 | import requests 19 | except ImportError: 20 | print('Unable to import requests module: please install requests', file=sys.stderr) 21 | sys.exit(1) 22 | 23 | 24 | # Pattern to match Git command-line output for remotes => (user name, project name). 25 | P_GIT_REMOTE = re.compile(r'upstream\s+[^:]+:([^/]+)/([^.]+)\.git\s+\(fetch\)') 26 | 27 | # Repository URL format string. 28 | F_REPO_URL = 'https://github.com/{0}/{1}/' 29 | 30 | # Pattern to match repository URLs => (user name, project name) 31 | P_REPO_URL = re.compile(r'https?://github\.com/([^.]+)/([^/]+)/?') 32 | 33 | # API URL format string. 34 | F_API_URL = 'https://api.github.com/repos/{0}/{1}/labels' 35 | 36 | # Expected labels and colors. 37 | EXPECTED = { 38 | 'help wanted': 'dcecc7', 39 | 'status:in progress': '9bcc65', 40 | 'status:changes requested': '679f38', 41 | 'status:wait': 'fff2df', 42 | 'status:refer to cac': 'ffdfb2', 43 | 'status:need more info': 'ee6c00', 44 | 'status:blocked': 'e55100', 45 | 'status:out of scope': 'eeeeee', 46 | 'status:duplicate': 'bdbdbd', 47 | 'type:typo text': 'f8bad0', 48 | 'type:bug': 'eb3f79', 49 | 'type:formatting': 'ac1357', 50 | 'type:template and tools': '7985cb', 51 | 'type:instructor guide': '00887a', 52 | 'type:discussion': 'b2e5fc', 53 | 'type:enhancement': '7fdeea', 54 | 'type:clarification': '00acc0', 55 | 'type:teaching example': 'ced8dc', 56 | 'good first issue': 'ffeb3a', 57 | 'high priority': 'd22e2e' 58 | } 59 | 60 | 61 | def main(): 62 | """ 63 | Main driver. 64 | """ 65 | 66 | args = parse_args() 67 | reporter = Reporter() 68 | repo_url = get_repo_url(args.repo_url) 69 | check_labels(reporter, repo_url) 70 | reporter.report() 71 | 72 | 73 | def parse_args(): 74 | """ 75 | Parse command-line arguments. 76 | """ 77 | 78 | parser = ArgumentParser(description="""Check repository settings.""") 79 | parser.add_argument('-r', '--repo', 80 | default=None, 81 | dest='repo_url', 82 | help='repository URL') 83 | parser.add_argument('-s', '--source', 84 | default=os.curdir, 85 | dest='source_dir', 86 | help='source directory') 87 | 88 | args, extras = parser.parse_known_args() 89 | require(not extras, 90 | 'Unexpected trailing command-line arguments "{0}"'.format(extras)) 91 | 92 | return args 93 | 94 | 95 | def get_repo_url(repo_url): 96 | """ 97 | Figure out which repository to query. 98 | """ 99 | 100 | # Explicitly specified. 101 | if repo_url is not None: 102 | return repo_url 103 | 104 | # Guess. 105 | cmd = 'git remote -v' 106 | p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, 107 | close_fds=True, universal_newlines=True) 108 | stdout_data, stderr_data = p.communicate() 109 | stdout_data = stdout_data.split('\n') 110 | matches = [P_GIT_REMOTE.match(line) for line in stdout_data] 111 | matches = [m for m in matches if m is not None] 112 | require(len(matches) == 1, 113 | 'Unexpected output from git remote command: "{0}"'.format(matches)) 114 | 115 | username = matches[0].group(1) 116 | require( 117 | username, 'empty username in git remote output {0}'.format(matches[0])) 118 | 119 | project_name = matches[0].group(2) 120 | require( 121 | username, 'empty project name in git remote output {0}'.format(matches[0])) 122 | 123 | url = F_REPO_URL.format(username, project_name) 124 | return url 125 | 126 | 127 | def check_labels(reporter, repo_url): 128 | """ 129 | Check labels in repository. 130 | """ 131 | 132 | actual = get_labels(repo_url) 133 | extra = set(actual.keys()) - set(EXPECTED.keys()) 134 | 135 | reporter.check(not extra, 136 | None, 137 | 'Extra label(s) in repository {0}: {1}', 138 | repo_url, ', '.join(sorted(extra))) 139 | 140 | missing = set(EXPECTED.keys()) - set(actual.keys()) 141 | reporter.check(not missing, 142 | None, 143 | 'Missing label(s) in repository {0}: {1}', 144 | repo_url, ', '.join(sorted(missing))) 145 | 146 | overlap = set(EXPECTED.keys()).intersection(set(actual.keys())) 147 | for name in sorted(overlap): 148 | reporter.check(EXPECTED[name].lower() == actual[name].lower(), 149 | None, 150 | 'Color mis-match for label {0} in {1}: expected {2}, found {3}', 151 | name, repo_url, EXPECTED[name], actual[name]) 152 | 153 | 154 | def get_labels(repo_url): 155 | """ 156 | Get actual labels from repository. 157 | """ 158 | 159 | m = P_REPO_URL.match(repo_url) 160 | require( 161 | m, 'repository URL {0} does not match expected pattern'.format(repo_url)) 162 | 163 | username = m.group(1) 164 | require(username, 'empty username in repository URL {0}'.format(repo_url)) 165 | 166 | project_name = m.group(2) 167 | require( 168 | username, 'empty project name in repository URL {0}'.format(repo_url)) 169 | 170 | url = F_API_URL.format(username, project_name) 171 | r = requests.get(url) 172 | require(r.status_code == 200, 173 | 'Request for {0} failed with {1}'.format(url, r.status_code)) 174 | 175 | result = {} 176 | for entry in r.json(): 177 | result[entry['name']] = entry['color'] 178 | return result 179 | 180 | 181 | if __name__ == '__main__': 182 | main() 183 | -------------------------------------------------------------------------------- /bin/test_lesson_check.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import unittest 4 | 5 | import lesson_check 6 | import util 7 | 8 | 9 | class TestFileList(unittest.TestCase): 10 | def setUp(self): 11 | self.reporter = util.Reporter() # TODO: refactor reporter class. 12 | 13 | def test_file_list_has_expected_entries(self): 14 | # For first pass, simply assume that all required files are present 15 | all_filenames = [filename.replace('%', '') 16 | for filename in lesson_check.REQUIRED_FILES] 17 | 18 | lesson_check.check_fileset('', self.reporter, all_filenames) 19 | self.assertEqual(len(self.reporter.messages), 0) 20 | 21 | 22 | if __name__ == "__main__": 23 | unittest.main() 24 | -------------------------------------------------------------------------------- /bin/util.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import json 4 | from subprocess import Popen, PIPE 5 | 6 | # Import this way to produce a more useful error message. 7 | try: 8 | import yaml 9 | except ImportError: 10 | print('Unable to import YAML module: please install PyYAML', file=sys.stderr) 11 | sys.exit(1) 12 | 13 | 14 | # Things an image file's name can end with. 15 | IMAGE_FILE_SUFFIX = { 16 | '.gif', 17 | '.jpg', 18 | '.png', 19 | '.svg' 20 | } 21 | 22 | # Files that shouldn't be present. 23 | UNWANTED_FILES = [ 24 | '.nojekyll' 25 | ] 26 | 27 | # Marker to show that an expected value hasn't been provided. 28 | # (Can't use 'None' because that might be a legitimate value.) 29 | REPORTER_NOT_SET = [] 30 | 31 | 32 | class Reporter: 33 | """Collect and report errors.""" 34 | 35 | def __init__(self): 36 | """Constructor.""" 37 | self.messages = [] 38 | 39 | def check_field(self, filename, name, values, key, expected=REPORTER_NOT_SET): 40 | """Check that a dictionary has an expected value.""" 41 | 42 | if key not in values: 43 | self.add(filename, '{0} does not contain {1}', name, key) 44 | elif expected is REPORTER_NOT_SET: 45 | pass 46 | elif type(expected) in (tuple, set, list): 47 | if values[key] not in expected: 48 | self.add( 49 | filename, '{0} {1} value {2} is not in {3}', name, key, values[key], expected) 50 | elif values[key] != expected: 51 | self.add(filename, '{0} {1} is {2} not {3}', 52 | name, key, values[key], expected) 53 | 54 | def check(self, condition, location, fmt, *args): 55 | """Append error if condition not met.""" 56 | 57 | if not condition: 58 | self.add(location, fmt, *args) 59 | 60 | def add(self, location, fmt, *args): 61 | """Append error unilaterally.""" 62 | 63 | self.messages.append((location, fmt.format(*args))) 64 | 65 | @staticmethod 66 | def pretty(item): 67 | location, message = item 68 | if isinstance(location, type(None)): 69 | return message 70 | elif isinstance(location, str): 71 | return location + ': ' + message 72 | elif isinstance(location, tuple): 73 | return '{0}:{1}: '.format(*location) + message 74 | 75 | print('Unknown item "{0}"'.format(item), file=sys.stderr) 76 | return NotImplemented 77 | 78 | @staticmethod 79 | def key(item): 80 | location, message = item 81 | if isinstance(location, type(None)): 82 | return ('', -1, message) 83 | elif isinstance(location, str): 84 | return (location, -1, message) 85 | elif isinstance(location, tuple): 86 | return (location[0], location[1], message) 87 | 88 | print('Unknown item "{0}"'.format(item), file=sys.stderr) 89 | return NotImplemented 90 | 91 | def report(self, stream=sys.stdout): 92 | """Report all messages in order.""" 93 | 94 | if not self.messages: 95 | return 96 | 97 | for m in sorted(self.messages, key=self.key): 98 | print(self.pretty(m), file=stream) 99 | 100 | 101 | def read_markdown(parser, path): 102 | """ 103 | Get YAML and AST for Markdown file, returning 104 | {'metadata':yaml, 'metadata_len':N, 'text':text, 'lines':[(i, line, len)], 'doc':doc}. 105 | """ 106 | 107 | # Split and extract YAML (if present). 108 | with open(path, 'r') as reader: 109 | body = reader.read() 110 | metadata_raw, metadata_yaml, body = split_metadata(path, body) 111 | 112 | # Split into lines. 113 | metadata_len = 0 if metadata_raw is None else metadata_raw.count('\n') 114 | lines = [(metadata_len+i+1, line, len(line)) 115 | for (i, line) in enumerate(body.split('\n'))] 116 | 117 | # Parse Markdown. 118 | cmd = 'ruby {0}'.format(parser) 119 | p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, 120 | close_fds=True, universal_newlines=True) 121 | stdout_data, stderr_data = p.communicate(body) 122 | doc = json.loads(stdout_data) 123 | 124 | return { 125 | 'metadata': metadata_yaml, 126 | 'metadata_len': metadata_len, 127 | 'text': body, 128 | 'lines': lines, 129 | 'doc': doc 130 | } 131 | 132 | 133 | def split_metadata(path, text): 134 | """ 135 | Get raw (text) metadata, metadata as YAML, and rest of body. 136 | If no metadata, return (None, None, body). 137 | """ 138 | 139 | metadata_raw = None 140 | metadata_yaml = None 141 | 142 | pieces = text.split('---', 2) 143 | if len(pieces) == 3: 144 | metadata_raw = pieces[1] 145 | text = pieces[2] 146 | try: 147 | metadata_yaml = yaml.load(metadata_raw) 148 | except yaml.YAMLError as e: 149 | print('Unable to parse YAML header in {0}:\n{1}'.format( 150 | path, e), file=sys.stderr) 151 | sys.exit(1) 152 | 153 | return metadata_raw, metadata_yaml, text 154 | 155 | 156 | def load_yaml(filename): 157 | """ 158 | Wrapper around YAML loading so that 'import yaml' is only needed 159 | in one file. 160 | """ 161 | 162 | try: 163 | with open(filename, 'r') as reader: 164 | return yaml.load(reader) 165 | except (yaml.YAMLError, IOError) as e: 166 | print('Unable to load YAML file {0}:\n{1}'.format( 167 | filename, e), file=sys.stderr) 168 | sys.exit(1) 169 | 170 | 171 | def check_unwanted_files(dir_path, reporter): 172 | """ 173 | Check that unwanted files are not present. 174 | """ 175 | 176 | for filename in UNWANTED_FILES: 177 | path = os.path.join(dir_path, filename) 178 | reporter.check(not os.path.exists(path), 179 | path, 180 | "Unwanted file found") 181 | 182 | 183 | def require(condition, message): 184 | """Fail if condition not met.""" 185 | 186 | if not condition: 187 | print(message, file=sys.stderr) 188 | sys.exit(1) 189 | -------------------------------------------------------------------------------- /checklist.md: -------------------------------------------------------------------------------- 1 | # Checklist Questions to stimulate thought about a Project's Reproducibility 2 | 3 | The following checklist serves as a tool to help you think about the reproducibility of your data analysis. Many of the questions can be thought of as having a yes/no answer. A better approach would be to see the questions as being open ended with the real question being, "What can I do to improve the status of my project on this bullet point?". With that in mind, you'll never get 100% of the bullets right for your project, but you'll always be improving. 4 | 5 | ## Documentation 6 | * Is there a README file that indicates the purpose of the project, who to contact with questions, a map of the directory structure, and a description of what software and hardware is needed to reproduce your workflow? 7 | * Are there README files in each folder describing the contents of the folder, how they were acquired/generated? 8 | * Is there a CITATION file that tells users how to site the project, data, and code? 9 | * Are there instructions on how to obtain the raw data and citations for those data? 10 | * Is there a list of dependencies with the exact version number of every external application used in the process? 11 | * Do you indicate dates that websites were accessed to obtain data? 12 | * Are there appropriate LICENSE files that specifies the license under which you're distributing your content, data, and code? Have you edited them to include informations pertinent to your project? 13 | * Have you noted the license(s) for others peoples' content, data, and code used in your analysis? 14 | * For analyses that utilize a random number generator, have you noted the underlying random seed(s)? Do you state the other seeds that you have tested the results with? 15 | * Is your code well documented? 16 | * Do you use a self-commenting coding practice? 17 | * Do each of your scripts have a header indicating the inputs, outputs, and dependencies? 18 | * Is it documented how files relate to each other? 19 | 20 | 21 | ## Organization 22 | * Are all data, code, results, and documentation housed within a monophyletic folder structure? 23 | * Is this folder structure under version control? 24 | * Is the project's repository publicly avaialable? 25 | * Are there assurances that this repository will remain accessible? 26 | * Is your project folder structured to separate your data, code, documentation, and results? 27 | * Does your code run from the project's home directory and output to the appropriate directory? 28 | * Are your raw and processed data files separated? 29 | * Is your raw data truly raw or has it been manipulated? 30 | * Are files that store manually-entered data structured to be easily read by a computer? 31 | * Do files use a consistent naming scheme that indicates what they contain? 32 | * Is there a mechanism in place to archive large files? 33 | * When using other people's data, are you defensive against tarbombs? 34 | 35 | 36 | ## Automation 37 | * Is the project under the control of a makefile? Could one run `make clean; make`? 38 | * How long would it take to rebuild your directory system if your hard drive failed? 39 | * Is manual manipulation of data kept to a minimum? 40 | * If manual manipulation is required, is there sufficient documentation to re-do the manipulation? 41 | * Does data processing make use of open software code? 42 | * How sensitive are results to differences in operating system, dependency versions? 43 | * Is code written to be flexible enough to the addition of new data? 44 | * Does code include unit tests to confirm that it does what you think it does? 45 | * Does your repository make use of continuous integration tools to insure internal reproduciblity? 46 | 47 | 48 | ## Publication 49 | * Are papers and reports from the project generated using literate programming tools so that results are not hard-coded? 50 | * Did you include a reproducibility statement or declaration at the end of your paper(s)? 51 | * Did you archive preprints of resulting papers in a public repository? 52 | * Did you release the underlying code and new data at the time of submitting a paper? 53 | * What mechanisms are in place to insure your project remain accessible and reproducible in 5 years? 54 | -------------------------------------------------------------------------------- /code/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/code/.gitkeep -------------------------------------------------------------------------------- /data/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/data/.gitkeep -------------------------------------------------------------------------------- /data/README.md: -------------------------------------------------------------------------------- 1 | # Data files for intro workshop 2 | 3 | - `gapminder.csv`: Entire GapMinder dataset 4 | - `gapminder-5060.csv`: 1950s and 1960s 5 | - `gapminder-7080.csv`: 1970s and 1980s 6 | - `gapminder-90plus.csv`: 1990s onwards 7 | 8 | - **Important note about `gapminder-5060.csv`: 9 | - The dataset has been altered to add a "data error". 10 | - Life expectancy for Canada in the year 1967 is coded 11 | as `999999`, it should actually be `69.96`. 12 | - For details see [intro-01-slides.Rmd](https://github.com/Reproducible-Science-Curriculum/rr-intro/blob/master/intro-01-slides.Rmd). 13 | - `gapminder-5060_original.csv` contains the correct data. -------------------------------------------------------------------------------- /data/gapminder.rdata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/data/gapminder.rdata -------------------------------------------------------------------------------- /fig/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/fig/.gitkeep -------------------------------------------------------------------------------- /fig/rmd-plot-example-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/fig/rmd-plot-example-1.png -------------------------------------------------------------------------------- /figure/more_task_3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/figure/more_task_3-1.png -------------------------------------------------------------------------------- /figure/task_2_visualize-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/figure/task_2_visualize-1.png -------------------------------------------------------------------------------- /figure/task_3-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/figure/task_3-1.png -------------------------------------------------------------------------------- /figure/unnamed-chunk-1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/figure/unnamed-chunk-1-1.png -------------------------------------------------------------------------------- /files/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/files/.gitkeep -------------------------------------------------------------------------------- /img/RSplashScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/img/RSplashScreen.png -------------------------------------------------------------------------------- /img/RStudio-Logo-Blue-Gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/img/RStudio-Logo-Blue-Gradient.png -------------------------------------------------------------------------------- /img/RStudioSplash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/img/RStudioSplash.png -------------------------------------------------------------------------------- /img/Rlogo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/img/Rlogo-1.png -------------------------------------------------------------------------------- /img/coffee_000000_264.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/img/coffee_000000_264.png -------------------------------------------------------------------------------- /img/wrench_000000_264.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datacarpentry/rr-intro/b8de017e72f51f054f4f768e0919c4117dd0a1bf/img/wrench_000000_264.png -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: lesson 3 | root: . 4 | --- 5 | This is the Introduction to Reproducible Research with `R`. 6 | 7 | > ## Prerequisites 8 | > You should install the following software: 9 | > - `R` 10 | > - `RStudio` 11 | > 12 | > See the setup instructions for details on specific packages to install. 13 | {: .prereq} 14 | -------------------------------------------------------------------------------- /intro-01-instr-notes.md: -------------------------------------------------------------------------------- 1 | 2 | ## As participants arrive... 3 | 4 | Participants have been asked to install or update R and RStudio prior to the workshop, 5 | as well as install the following packages: 6 | 7 | - `knitr` 8 | - `rmarkdown` 9 | - `ggplot2` 10 | - `dplyr` 11 | 12 | It is possible that some of them did not yet do that. If people show up early remind 13 | them to complete installation, and re-point them to the instructions in the 14 | pre-workshop email and/or the workshop website. Note that they will not need these tools until after the coffee break. 15 | 16 | 17 | ## Intro (15 min) 18 | 19 | ## Welcome + overview 20 | 21 | - Welcome the participants and briefly go over the schedule for the 2-day workshop. 22 | - Schedule is purposefully not included on the slides since each workshop might 23 | follow a slightly different schedule. 24 | - Remind them the mission statement and the tagline: 25 | - Mission statement: To Train researchers in the best practices and approaches of reproducible research and accelerate scientific progress 26 | - Tagline: Accelerating scientific progress through reproducible science. 27 | - Getting to know you exercise and group discussion: 28 | - 6 months from now can you or someone else go back to your project and understand what was going on? What types of methods do you use to document a project? 29 | - Take notes on the board as to tools people use. 30 | - Review a few case studies: 31 | - Some are already discussed in `intro-01-slides` 32 | - If you prefer to discuss others, see some examples at https://github.com/Reproducible-Science-Curriculum/Reproducible-Science-Hackathon-Dec-08-2014/wiki/Irreproducible-Examples 33 | 34 | ## Exercise: Motivating reproducibility (40 mins) 35 | 36 | ### Part 1: Analyze + document (20 minutes) 37 | 38 | #### From the slides: 39 | 40 |
41 | Complete the following tasks and **write instructions / 42 | documentation** for your collaborator to reproduce your work starting with the 43 | original dataset (`data/gapminder-5060.csv`). 44 | 45 | 1. Visualize life expectancy over time for Canada in the 1950s and 1960s using 46 | a line plot. 47 | 2. Something is clearly wrong with this plot! Turns out there's a data error 48 | in the data file: life expectancy for Canada in the year 1967 is coded 49 | as `999999`, it should actually be `69.96`. Make this correction. 50 | 3. Visualize life expectancy over time for Canada again, with the corrected 51 | data.
52 | *Stretch goal:* Add lines for Mexico and US. 53 |
54 | 55 | #### Tips for instructors: 56 | 57 | - Some people will assume they have to do this in R, even if they're not an R user, 58 | remind them that the whole point of the exercise is that they do this in an 59 | environment they use / are comfortable with. (Assure them that we'll get to R 60 | later...) 61 | - Remind them that they need to document -- in past workshops most people got hung 62 | up on doing, then documenting, and then the second part of the exercises didn't 63 | have as much of a punch. More important that they document what they do (even if 64 | not all tasks) than that they finish. 65 | 66 | ### Part 1: Swap + discuss (15 minutes) 67 | 68 | #### From the slides: 69 | 70 |
71 | Introduce yourself to your collaborator and tell them why you're here. 72 | 73 | 1. Swap instructions / documentation with your collaborator, and try to reproduce 74 | their work, first **without talking to each oher**. 75 | If your collaborator does not have the software they need to reproduce your work, we 76 | encourage you to either help them install it or walk them through it on your computer 77 | in a way that would emulate the experience. (Remember, this could be part of the 78 | irreproducibility problem!) 79 | 2. Then, talk to each other about challenges you faced (or didn't face) or why 80 | you were or weren't able to reproduce their work. 81 |
82 | 83 | #### Tips for instructors: 84 | 85 | - People not having the software their partner used is likely to be the biggest issue 86 | in this exercise. There isn't really enough time to install sofware, or software might 87 | be proprietary. In these cases ask people to keep it to a discussion. 88 | - Encourage people to read code, even if they don't know the language. If well 89 | documented/commented, one might still be able to follow the code even if they couldn't 90 | write it themselves from scratch. 91 | 92 | ### Reflection - group discussion: (5 mins) 93 | 94 | #### From the slides: 95 | 96 |
97 | - What tools did you use (Excel / R / Python / Word / plain text etc.)? 98 | - Were you successful in reproducing each others' work? 99 | 100 |
101 | 102 | - What would happen if your collaborator is no longer available to walk you through 103 | their analysis? 104 | - What made it easy / hard for reproducing your partners' work? 105 | - What would have to happen if 106 | - you had to swap out the dataset or extend the analysis further? 107 | - you caught further data errors and had to re-create the analysis 108 | with corrections? 109 | - you had to revert back to the original dataset? 110 |
111 | 112 | #### Tips for instructors: 113 | 114 | - Collect data from the students on their tool choice and success. Tallying these 115 | on the board creates a nice visual. 116 | - If you know that the session will have a large number of participants preparing a 117 | Google Form might be useful. 118 | - Keep the discussion on the second set of questions to an informal discussion, and 119 | feel free to keep it short if exercise took longer than intended. 120 | -------------------------------------------------------------------------------- /intro-02-instr-notes.md: -------------------------------------------------------------------------------- 1 | 2 | ## Introduce toolkit 3 | 4 | - R, RStudio, R Markdown 5 | 6 | - Walk through splash screens of R and RStudio (but spend more time on RStudio) 7 | 8 | ## R Markdown demo 9 | 10 | The goal of is to demonstrate how each of the goals of Organization, Documentation, Dissemination, and Automation can be addressed in an R Markdown document. 11 | 12 | ### Key steps introduced: 13 | 14 | **IMPORTANT:** Emphasize that this exercise is NOT about understanding all the R commands, 15 | but rather getting the big picture of how using R in this way facilitates reproducible 16 | analyses. 17 | 18 | - Demonstrate "good practice" for organizing data files and analysis 19 | documents (R Markdown) 20 | - How to read data from a file 21 | - How to manipulate the data, and document it in a reproducible way 22 | - How easy it would be to revert any changes if need be 23 | - How to subset data 24 | - How to make simple plots in ggplot 25 | 26 | ### Important features of an R Markdown document to discuss: 27 | 28 | - YAML on top 29 | - Code in chunks 30 | - R Markdown syntax 31 | - Human readable! 32 | - Limited, so not too time consuming to master 33 | - Self contained workspace 34 | 35 | ### Extend the analysis: 36 | 37 | All code included in the template. 38 | 39 | Important to emphasize we're using the same subsetting and visualization code, 40 | just with new data. Reproducing old work with new data is easy! 41 | 42 | ### Take aways: 43 | 44 | - The analysis is self-documenting 45 | - It's easy to extend or refine analyses by copying and modifying code blocks 46 | - The results of the analysis can be disseminated by sending R Markdown and 47 | providing data sources, or just simply providing the generated HTML of just 48 | a summary of the analysis is needed 49 | 50 | ## Reproducibility checklist: 51 | 52 | Point them to the checklist (`checklist.md`), don't read the whole list (too long), but can 53 | discuss the documentation part if there is time. 54 | -------------------------------------------------------------------------------- /intro/intro-template.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Intro Session: Motivating reproducibility' 3 | output: 4 | html_document: 5 | fig_height: 3 6 | fig_width: 6 7 | pdf_document: default 8 | --- 9 | 10 | This RMarkdown file contains R code you can use to complete the exercises from the Intro 11 | session. To see the output simply click on *Knit HTML* above. This might prompt you to 12 | install and load some required packages, specifically `knitr`. Just click yes, and the a 13 | document including this narrative, the R code, and figures should pop up. 14 | 15 | ## Data: 16 | 17 | The `read.csv` function is used to read the data into R. Note that the argument provided 18 | for this function is the complete path that leads to the dataset from your current 19 | working directory (where this RMarkdown file is located). Also note that this is provided 20 | as a character string, hence in quotation marks. 21 | 22 | ```{r} 23 | gap_5060 <- read.csv("../data/gapminder-5060.csv") 24 | ``` 25 | 26 | ## Packages: 27 | 28 | We will use the `ggplot2` and `dplyr` packages to make the plots for these exercises. 29 | 30 | - `ggplot2` for plotting: This is not the only way to make this plot, but this package 31 | has some aesthetic defaults that makes it attractive. Find out more about the package 32 | at http://ggplot2.org/. 33 | - `dplyr` for data wrangling: This is not the only way manipulate data in R, but this 34 | package uses piping and a simple set of verbs for most common data wranling tasks which 35 | makes it attractive. See the package vignette at https://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html. 36 | 37 | At this point you should have installed these packages using `install.packages()`. 38 | 39 | Now we need to explicitly load the packages: 40 | 41 | ```{r message=FALSE} 42 | library("ggplot2") 43 | library("dplyr") 44 | ``` 45 | 46 | #### Task 1: Visualize life expectancy over time for Canada in the 1950s and 1960s using a line plot. 47 | 48 | 1. Filter the data for Canada only: 49 | ```{r} 50 | gap_5060_CA <- gap_5060 %>% 51 | filter(country == "Canada") 52 | ``` 53 | 54 | 2. Visaualize: 55 | ```{r} 56 | ggplot(data = gap_5060_CA, aes(x = year, y = lifeExp)) + 57 | geom_line() 58 | ``` 59 | 60 | #### Task 2: Something is clearly wrong with this plot! Turns out there's a data error in the data file: life expectancy for Canada in the year 1957 is coded as `999999`, it should actually be `69.96`. Make this correction. 61 | 62 | - `mutate` for creating a new variables 63 | - `replace` for replacing a data entry in a specific 64 | location as determined by the logical statement `(country == "Canada" & year == 1957)` 65 | ```{r} 66 | gap_5060 <- gap_5060 %>% 67 | mutate(lifeExp = replace(lifeExp, (country == "Canada" & year == 1957), 69.96)) %>% 68 | as.data.frame() 69 | ``` 70 | 71 | #### Task 3: Visualize life expectancy over time for Canada again, with the corrected data. 72 | 73 | Exact same code as before, but note that the contents of `gap_5060` are different as it 74 | has been updated in the previous task. 75 | ```{r} 76 | gap_5060_CA <- gap_5060 %>% 77 | filter(country == "Canada") 78 | 79 | ggplot(data = gap_5060_CA, aes(x = year, y = lifeExp)) + 80 | geom_line() 81 | ``` 82 | 83 | #### Task 3 - Stretch goal: Add lines for Mexico and United States. 84 | 85 | - `%in%` for logical operator testing if a country's name is in the list provided 86 | - Same visualization code as before, only difference is the input dataset 87 | ```{r} 88 | gap_5060_NA <- gap_5060 %>% 89 | filter(country %in% c("Canada", "Mexico", "United States")) 90 | 91 | ggplot(data = gap_5060_NA, aes(x = year, y = lifeExp, color = country)) + 92 | geom_line() 93 | ``` 94 | 95 | #### Extending your analysis with new data: 96 | 97 | Load the new data: 98 | ```{r} 99 | gap_7080 <- read.csv("data/gapminder-7080.csv") 100 | gap_90plus <- read.csv("data/gapminder-90plus.csv") 101 | ``` 102 | 103 | Cobine data frames with `rbind` (**r**ow bind): 104 | ```{r} 105 | gap <- rbind(gap_5060, gap_7080, gap_90plus) 106 | ``` 107 | 108 | Make the same plots, with the same code, just changing the input data frame: 109 | 110 | 1. Canada only: 111 | ```{r} 112 | gap_ca <- gap %>% 113 | filter(country == "Canada") 114 | 115 | ggplot(data = gap_ca, aes(x = year, y = lifeExp)) + 116 | geom_line() 117 | ``` 118 | 119 | 2. North America: 120 | ```{r} 121 | gap_NA <- gap %>% 122 | filter(country %in% c("Canada", "Mexico", "United States")) 123 | 124 | ggplot(data = gap_NA, aes(x = year, y = lifeExp, color = country)) + 125 | geom_line() 126 | ``` -------------------------------------------------------------------------------- /pre-workshop-survey.md: -------------------------------------------------------------------------------- 1 | Pre-workshop survey 2 | ======== 3 | 4 | What is your current position? 5 | 6 | * Graduate student 7 | * Postdoctoral felow 8 | * Faculty 9 | * Staff 10 | * Other: _____________ 11 | 12 | Which of the following discipline(s) do you work in? 13 | check all that apply 14 | 15 | * Brain and neuroscience 16 | * Chemistry 17 | * Computer science 18 | * Earth sciences 19 | * Economics 20 | * Engineering 21 | * Humanities 22 | * Life sciences 23 | * Math 24 | * Medicine 25 | * Physics 26 | * Social sciences 27 | * Statistics 28 | * Other: _____________ 29 | 30 | Which operating system will you use for the workshop? 31 | 32 | * Windows 33 | * OS X 34 | * Linux 35 | * I do not know 36 | * Other: ______________ 37 | 38 | Which of the methods below do you use to record progress on your work? 39 | check all that apply 40 | 41 | * Handwritten notes (e.g. a lab notebook) 42 | * Documents on your computer (e.g. Word, text files) 43 | * Online notes (e.g. Google Docs, wikis) 44 | * Comments in scripts 45 | * Literate programming (e.g. R markdown, iPython notebook) 46 | * Other: ______________ 47 | 48 | How often do you currently program? 49 | 50 | * I never program 51 | * Once per year or less 52 | * Several times per year 53 | * A few times per month 54 | * A few times per week 55 | * Every day 56 | 57 | What programming languages do you use regularly? * 58 | Check all that apply 59 | * Python 60 | * R 61 | * C / C++ 62 | * Java 63 | * Perl 64 | * Other: ______________ 65 | 66 | How frequently do you make your code, data, and analyses publicly available? 67 | * Never 68 | * Rarely 69 | * Sometimes 70 | * Most of the time 71 | * Always 72 | 73 | If you were to give a colleague all of the data and documentation for a project, how confident are you that they could produce your results and figures? 74 | 75 | * Very confident 76 | * Confident 77 | * Somewhat confident 78 | * Not very confident 79 | * Not confident 80 | 81 | When you do share code / data, what motivates you to do so? * 82 | Check all that apply 83 | * Journal requirement 84 | * Funding agency requirement 85 | * Opinion of PI / supervisor 86 | * Opinion of colleagues 87 | * Other: ______________ 88 | 89 | Why did you sign up for this workshop? 90 | 91 | (open ended) -------------------------------------------------------------------------------- /preworkshop-email.md: -------------------------------------------------------------------------------- 1 | Pre-workshop email 2 | ========= 3 | 4 | This document contains standard language that can be used in the pre-workshop email 5 | including instructions for software set-up. 6 | 7 | **Note:** The document is designed for a workshop using R, if using another language, 8 | update accordingly. 9 | 10 | * * * 11 | 12 | Prior to the workshop, please download and install R, [a free software environment for 13 | statistical computing and graphics](http://www.r-project.org/) and RStudio, [a powerful 14 | user interface for R](http://www.rstudio.com/). Note that R is the name of the 15 | programming language itself and RStudio is a convenient interface. Therefore while you 16 | will be working in RStudio throughout the workshop, R must also be installed on your 17 | computer. 18 | 19 | **Download:** 20 | 21 | * *R*: You can download R from [CRAN](http://cran.r-project.org/), the Comprehensive R 22 | Archive Network. It is highly recommended to install a precompiled binary distribution 23 | for your operating system – use the links up at the top of the CRAN page. 24 | * *RStudio*: You can download RStudio Desktop [here](http://www.rstudio.com/products/rstudio/download/). 25 | 26 | **Install:** Instructions for installing R and RStudio are provided below, as well as 27 | links to videos that walk you through the process. Note newer versions of R and RStudio 28 | may have been released since this video, and hence the version names you come accross may 29 | not match what you see on the video. However the general instructions should still work. 30 | 31 | Do not worry if you run into any trouble during the installation, we will have some time 32 | during the workshop to help you. 33 | 34 | - Mac / OS X: 35 | - [Video instructios](https://www.youtube.com/watch?v=Ywj6yNfc5nM) - includes RStudio 36 | installation 37 | - Instal R: Install R-3.2.2.pkg. This runs on OS X 10.9 and later (Mavericks 38 | and Yosemite). To install, just double-click on the icon of the file you downloaded. 39 | See [here](http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installing-R-under-OS-X for) for more info. 40 | - Install RStudio: Double click on RStudio-0.99.484.dmg and follow the prompts. 41 | 42 | - PC / Windows: 43 | - [Video instructios](https://www.youtube.com/watch?v=eD07NznguA4) 44 | - Install R: Installation is via the installer R-3.2.2-win.exe. Just double-click on 45 | the icon and follow the instructions. See [here](http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installing-R-under-Windows) for more info. 46 | - Install RStudio:Double click on RStudio-0.99.484.exe and follow the prompts. 47 | 48 | - Unix-alikes: See [here](http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installing-R-under-Unix_002dalikes) for more info. 49 | 50 | **Testing:** Do whatever is appropriate for your OS to launch RStudio. You should get a 51 | window similar to the screenshot you see in the video [here](http://www.rstudio.com/products/rstudio/). Put your cursor in the pane labelled 52 | *Console*, which is where you interact with the live R process. Create a simple object 53 | with code like `x <- 2 * 4` (followed by enter or return). Then inspect the `x` object by 54 | typing `x` followed by enter or return. Obviously you should see the value 8 print to 55 | screen. If yes, you are good to go. 56 | 57 | **Add-on packages:** R is an extensible system and many people share useful code they 58 | have developed as a package via CRAN and github. To install a package from CRAN, for 59 | example the `ggplot2` package for data visualization (which we will use during the 60 | workshop) type `install.packages("ggplot2")` in your Console. This is one way of 61 | installing packages (there are others). -------------------------------------------------------------------------------- /reference.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: reference 3 | permalink: /reference/ 4 | --- 5 | 6 | ## Glossary 7 | - Peng (2009) Reproducible research and Biostatistics. [*Biostatistics 10: 405-408*](http://biostatistics.oxfordjournals.org/content/10/3/405.full) 8 | - **Replication** - when independent investigators use methods, protocols, data, and equipment to confirm scientific claims. 9 | - **Reproduction** - when data sets and computer code are made available for researchers to verify results. 10 | -------------------------------------------------------------------------------- /setup.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Setup 4 | permalink: /setup/ 5 | --- 6 | You will need to install the following programs and packages: 7 | 8 | - `R` 9 | - `RStudio` 10 | 11 | ~~~ 12 | install.packages("tidyverse") 13 | install.packages("rmarkdown") 14 | install.packages("knitr") 15 | ~~~ 16 | {: .language-r} 17 | -------------------------------------------------------------------------------- /slides/intro-01-slides.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Intro I: Motivating reproducibility" 3 | author: "Reproducible Science Workshop" 4 | output: 5 | ioslides_presentation: 6 | highlight: pygments 7 | widescreen: yes 8 | --- 9 | 10 | # Overview 11 | 12 | ## Tagline and mission 13 | 14 | Tagline: Accelerating scientific progress through reproducible science 15 | 16 | Mission: To train researchers in the best practices and approaches of 17 | reproducible research and accelerate scientific progress. 18 | 19 | 20 | ## Intro to Reproducible Research outline 21 | 22 | - Getting to know you 23 | - Recognize the problems that reproducible research helps address 24 | via a case studies 25 | - **Exercise**: Identify pain points in getting your analysis to be reproducible 26 | - Introduce tools that address these pain points 27 | - **Demo**: Computational toolkit for reproducibile data analysis 28 | 29 | 30 | ## Getting to know you... 31 | 32 | with respect to reproducibility 33 | 34 | 35 | 36 | # Why should we care about reproducibility? 37 | 38 | ## Science retracts gay marriage paper without agreement of lead author 39 | 40 | - Science retracted a study of how canvassers can sway people's opinions about 41 | gay marriage. 42 | 43 | - Science Editor-in-Chief: Original survey data not made available for independent 44 | reproduction of results + Survey incentives misrepresented + Sponsorship 45 | statement false 46 | 47 | - Two Berkeley grad students attempted to replicate the study and discovered that 48 | the data must have been faked. 49 | 50 | - Methods we'll discuss today can't prevent this, but they can make it easier to 51 | discover such issues. 52 | 53 | 54 | Source: 55 | http://news.sciencemag.org/policy/2015/05/science-retracts-gay-marriage-paper-without-lead-author-s-consent 56 | 57 | 58 | 59 | ## Seizure study retracted after authors realize data got "terribly mixed" 60 | 61 | From the authors of **Low Dose Lidocaine for Refractory Seizures in Preterm Neonates**: 62 | 63 | *"The article has been retracted at the request of the authors. After carefully 64 | re-examining the data presented in the article, they identified that data of two 65 | different hospitals got terribly mixed. The published results cannot be reproduced in 66 | accordance with scientific and clinical correctness."* 67 | 68 | 69 | Source: http://retractionwatch.com/2013/02/01/seizure-study-retracted-after-authors-realize-data-got-terribly-mixed/ 70 | 71 | 72 | 73 | ## Bad spreadsheet merge kills depression paper, quick fix resurrects it 74 | 75 | - The authors informed the journal that the merge of lab results and other survey 76 | data used in the paper resulted in an error regarding the identification codes. 77 | 78 | - **Original conclusion:** Lower levels of CSF IL-6 were associated with current 79 | depression and with future depression [...]. 80 | 81 | - **Revised conclusion:** Higher levels of CSF IL-6 and IL-8 were associated with 82 | current depression [...]. 83 | 84 | 85 | Source: 86 | http://retractionwatch.com/2014/07/01/bad-spreadsheet-merge-kills-depression-paper-quick-fix-resurrects-it/ 87 | 88 | 89 | 90 | # Exercise: Motivating reproducibility 91 | 92 | ## Exercise: Motivating reproducibility 93 | 94 | This is a two-part exercise: 95 | 96 | **Part 1:** Analyze + document 97 | 98 | **Part 2:** Swap + discuss 99 | 100 | 101 | ## Part 1: Analyze + document 102 | 103 | Complete the following tasks and **write instructions / documentation** for your 104 | collaborator to reproduce your work starting with the original dataset 105 | (`data/gapminder-5060.csv`). 106 | 107 | 1. Visualize life expectancy over time for Canada in the 1950s and 1960s using 108 | a line plot. 109 | 110 | 2. Something is clearly wrong with this plot! Turns out there's a data error 111 | in the data file: life expectancy for Canada in the year 1957 is coded 112 | as `999999`, it should actually be `69.96`. Make this correction. 113 | 114 | 3. Visualize life expectancy over time for Canada again, with the corrected data.
115 | *Stretch goal:* Add lines for Mexico and United States. 116 | 117 | 118 | ## Part 2: Swap + discuss 119 | 120 | Introduce yourself to your collaborator and tell them why you're here. 121 | 122 | 1. Swap instructions / documentation with your collaborator, and try to reproduce 123 | their work, first **without talking to each oher**. 124 | If your collaborator does not have the software they need to reproduce your work, we 125 | encourage you to either help them install it or walk them through it on your computer 126 | in a way that would emulate the experience. (Remember, this could be part of the 127 | irreproducibility problem!) 128 | 129 | 2. Then, talk to each other about challenges you faced (or didn't face) or why 130 | you were or weren't able to reproduce their work. 131 | 132 | 133 | ## Reflection 134 | 135 | - What tools did you use (Excel / R / Python / Word / plain text etc.)? 136 | - Were you successful in reproducing each others' work? 137 | 138 |
139 | 140 | - What would happen if your collaborator is no longer available to walk you through 141 | their analysis? 142 | - What made it easy / hard for reproducing your partners' work? 143 | - What would have to happen if 144 | - you had to swap out the dataset or extend the analysis further? 145 | - you caught further data errors and had to re-create the analysis 146 | with corrections? 147 | - you had to revert back to the original dataset? 148 | 149 | 150 | ## Summary 151 | 152 | - Everyone struggles with reproducibility and it is a hindrance to moving 153 | science forward 154 | 155 | - Evan with a fairly simple analysis challenges were faced in four main areas: 156 | organization, documentation, automation, and dissemination 157 | 158 | - Over the two day workshop, data analysis tasks will become more complex as we 159 | gather more data and ask more complicated questions, so we need better tools and 160 | workflows to combat issues arising in these areas 161 | 162 | # Four facets of reproducibility 163 | 164 | ## Four facets of reproducibility 165 | 166 | 1. **Documentation:** difference between binary files (e.g. docx) and text files and 167 | why text files are preferred for documentation 168 | - *Protip:* Use markdown to document your workflow so that anyone can pick up your 169 | data and follow what you are doing 170 | - *Protip:* Use literate programming so that your analysis and your results are 171 | tightly connected, or better yet, unseperable 172 | 173 | 2. **Organization:** tools to organize your projects so that you don't have a single 174 | folder with hundreds of files 175 | 176 | 3. **Automation:** the power of scripting to create automated data analyses 177 | 178 | 4. **Dissemination:** publishing is not the end of your analysis, rather it is a way 179 | station towards your future research and the future research of others -------------------------------------------------------------------------------- /slides/intro-02-slides.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Intro II: Reproducibility toolkit" 3 | author: "Reproducible Science Workshop" 4 | output: 5 | ioslides_presentation: 6 | highlight: pygments 7 | widescreen: yes 8 | --- 9 | 10 | # Reproduciblility toolkit 11 | 12 | ## R + RStudio 13 | 14 |
15 | ![R](img/Rlogo-1.png) 16 | 17 | ![RStudio](img/RStudio-Logo-Blue-Gradient.png) 18 |
19 | 20 | 21 | ## Why R? 22 | 23 |
24 | - Programming language for data analysis 25 | - Free! 26 | - Open source 27 | - Widely used and supported across all disciplines 28 | - Can be used on Windows, Mac OS X, or Linux 29 | 30 | ![RSplashScreen](img/RSplashScreen.png) 31 |
32 | 33 | 34 | ## Why not language X? 35 | 36 | - There are a number of other great programming tools out there that can also be 37 | used to improve the reproducibility of your analysis 38 | 39 | - The key is to use some type of language that will allow you to automate and 40 | document your analysis 41 | 42 | - Once you master one language you'll probably find it easier to learn another 43 | 44 | 45 | ## Once in R 46 | 47 | You could just type into the command prompt... 48 | 49 | - ... but that doesn't help much with documentation 50 | 51 | - ... but that doesn't help much with automation 52 | 53 | 54 | ## A better solution 55 | 56 | With RStudio you can combine your programming and your documentation 57 | 58 |
59 | - RStudio gives you a single environment to combine your documentation and your 60 | analysis 61 | - It runs on top of R 62 | - Gives you a bunch of really cool features that we'll explore throughout the 63 | workshop 64 | 65 | ![RSplashScreen](img/RStudioSplash.png) 66 |
67 | 68 | ## Anatomy of RStudio 69 | 70 |
71 | - Left: Console 72 | - Text on top at launch: version of R that you’re running 73 | - Below that is the prompt 74 | - Upper right: Workspace and command history 75 | - Lower right: Plots, access to files, help, packages, data viewer 76 | 77 | ![RSplashScreen](img/RStudioSplash.png) 78 |
79 | 80 | ## R Packages 81 | 82 | - Packages are the fundamental units of reproducible R code. They include reusable R 83 | functions, the documentation that describes how to use them, and (often) sample data. 84 | (From: http://r-pkgs.had.co.nz) 85 | 86 | - We will use the `ggplot2` package for plots and `dplyr` for data wrangling in this 87 | session. 88 | 89 | - If you have not yet done so, install these packages by running the following 90 | in the Console: 91 | ```{r eval=FALSE} 92 | install.packages("ggplot2") 93 | install.packages("dplyr") 94 | ``` 95 | 96 | - This is just one way of installing a package, there is also a GUI approach in 97 | the Packages pane 98 | 99 | # Demo 100 | 101 | ## Goals of the demo 102 | 103 | - Demonstrate "good practice" for organizing data files and analysis 104 | documents (R Markdown) 105 | - How to read data from a file 106 | - How to manipulate the data, and document it in a reproducible way 107 | - How easy it would be to revert any changes if need be 108 | - How to subset data 109 | - How to make simple plots in ggplot 110 | 111 | **NOT** about understanding all the R commands, but **rather** getting the big 112 | picture of how using R in this way facilitates reproducible analyses 113 | 114 | ## R Markdown demo 115 | 116 | - Open `intro-template.Rmd` 117 | 118 | - Click on *Knit HTML* to compile the document 119 | 120 | - Important features: 121 | - YAML on top 122 | - Code in chunks 123 | - R Markdown syntax 124 | - Human readable! 125 | - Limited, so not too time consuming to master 126 | - Self contained workspace 127 | 128 | ## Extending the analysis 129 | 130 | Great news!? We just received some more data, in bits and pieces of course: 131 | 132 | - `gapminder-7080.csv` 133 | - `gapminder-90plus.csv` 134 | 135 | Let's walk through generation of new plots for the 1970s and 1980s and 1990s plus (these new analyses are already in the `intro-tutorial.Rmd` document). 136 | 137 | Note that all code required to accomplish these tasks is also in the template. 138 | You do not need to come up with the R code, **knit** the document to combine 139 | the datasets and you'll see that the code required for recreating the plots 140 | is the same as above. That's the beauty of R Markdown! 141 | 142 | 143 | ## Take aways 144 | 145 | - The analysis is self-documenting 146 | - It's easy to extend or refine analyses by copying and modifying code blocks 147 | - The results of the analysis can be disseminated by sending R Markdown and 148 | providing data sources, or just simply providing the generated HTML of just 149 | a summary of the analysis is needed 150 | 151 | # Reproducibility checklist 152 | 153 | ## Reproducibility checklist 154 | 155 | - Serves as a tool to help you think about the reproducibility of your data 156 | analysis. 157 | - Many of the questions can be thought of as having a yes/no answer. 158 | - A better approach would be to see the questions as being open ended with 159 | the real question being, "What can I do to improve the status of my project 160 | on this bullet point?" 161 | - With that in mind, you'll never get 100% of the bullets right for your project, 162 | but you'll always be improving. 163 | 164 | -------------------------------------------------------------------------------- /styling.css: -------------------------------------------------------------------------------- 1 | .boxed { 2 | margin-top: 30px; 3 | margin-bottom: 30px; 4 | color: #808080; 5 | padding: 10px 10px; 6 | font-size: 10pt; 7 | background-color: rgba(128, 128, 128, 0.2); 8 | } --------------------------------------------------------------------------------