class: center, middle, inverse, title-slide # Towards An Open-access, Fast, and Reproducible Journal ## Thoughts and Possible Implementations ###
Yihui Xie, RStudio
### 2017/06/02 @ WOMBAT MeDaScIn, Melbourne --- class: center # Theory vs Practice <img src="gif/theory-vs-practice-1.gif" width="80%" /> ??? This is a very unusual talk of mine. I rarely talk about anything until I finish it. For example, I won't talk to a publisher until I finish writing a book. --- class: center # Theory vs Practice <img src="gif/theory-vs-practice-2.gif" width="100%" /> --- class: inverse, center, middle background-image: url(images/sprout.jpg) background-size: cover -- # Open -- # Decentralized -- # Reproducible --- # About me <img src="https://db.yihui.org/images/avatar-200.png" width="100" align="right" /> - Software Engineer - I write (software) tools, but want to escape from tools, too > [We become what we behold. We shape our tools and then our tools shape us.](https://mcluhangalaxy.wordpress.com/2013/04/01/we-shape-our-tools-and-thereafter-our-tools-shape-us/) --- John Culkin - There are many good practices in software development can improve academic publishing (e.g. automation, version control, testing, CI) -- - Relatively impatient - There have been a lot of things that I want to change. - Sweave -> **knitr** (to make it easier for myself to write homework) - LaTeX -> Markdown (for me to escape from backslashes) - Journals -> ??? -- - Busy and lazy --- layout: true # My first journal paper --- .pull-left[ - Format - LaTeX (Stockholm syndrome) - `\documentclass{jss}` - `\proglang{}`, `\code{}`, `\pkg{}` ] -- .pull-right[ - Do you really care more about the content or appearance of my paper? - We shaped LaTeX and then LaTeX shaped us. ] ??? In my eyes, LaTeX is the ugliest language that produces the most beautiful output documents. When you write a paper and the first line is `\documentclass` instead of the title, there is probably something wrong. --- .pull-left[ - Review - 9 months ] -- .pull-right[ - Sorry, the reviewer forgot to review your paper. ] --- .pull-left[ - Conventional structure: Introduction / Motivation, Literature, Framework, Methods, Examples, Conclusion / Discussion, Appendix <video controls loop autoplay><source src="gif/demo-a.mp4"></video> ] -- .pull-right[ - Everything was fun until I sat down to write the paper. - [How to write consistently boring scientific literature](http://www.philippeweil.com/links/BoringWriting.pdf) (Kaj Sand-Jensen) 1. Avoid focus 1. Avoid originality and personality 1. Write looooong contributions ... - [The eight-legged essay](https://en.wikipedia.org/wiki/Eight-legged_essay) (八股文) ] ??? I hope papers could start with a question, or just Example 1. --- layout: false class: center # I thought a paper was to share the joy of my research and findings -- <img src="gif/baby-wat.gif" width="70%" /> --- class: center, bottom, inverse background-image: url(images/dragon.jpg) background-size: cover # I wrote a blog post in 2012 ## [Ideas on A Really Fast Statistics Journal](https://yihui.org/en/2012/03/a-really-fast-statistics-journal/) --- # An open journal - Open and public by default - Free and open-access - Public peer review <sup>1</sup> - Public comments <sup>2</sup> .footnote[ [1] More likely to be fair to authors. Reviewers have public records, which could be a form of incentives. Future authors may learn from these reviews, too. [2] Good ones could be published as discussion papers. There will certainly be bad comments, but we can always upvote good comments. ] --- class: inverse, center background-image: url(images/1984.jpg) background-size: cover # A decentralized journal .footnote[ Although I believe most journals' "big brothers" are very kind and helpful, the number of big brothers is too small in my eyes. We could have more reviewers and editors. Do we really need a chief editor and two associate editors? Instead of assigning papers to reviewers, how about letting wild-caught reviewers choose papers by themselves? Think Wikipedia. ] ??? I took this photo on my way back to hotel yesterday. --- class: center ![](images/hex-knitr.png) ![](images/hex-rmarkdown.png) ![:image 100px, bookdown](https://bookdown.org/yihui/bookdown/images/logo.png) ![:image 100px, blogdown](https://bookdown.org/yihui/blogdown/images/logo.png) # A reproducible journal ## You don't have a lot of exuses now <sup>*</sup> .footnote[ [*] Unless your data is really big, or your computation takes really long time (e.g. a few days). What is stopping you from using R Markdown? ] --- class: center background-image: url(images/constructocat.jpg) background-size: contain # Implementation details --- class: center, middle # Document format --- # LaTeX -- .center[<img src="gif/encontro.gif" width="80%" />] --- # Word -- .center[<img src="gif/rain-man.gif" width="80%" />] ??? Very difficult to automate, hence not suitable for reproducibility, either. --- class: inverse, center, middle # R Markdown ## Content first (HTML), style/format later (PDF) --- # Fitting the paper to page limit -- .center[<img src="gif/shovel-snow.gif" width="80%" />] --- # Interactive examples? -- .center[<img src="gif/dull-cat.gif" width="80%" />] .footnote[ [Distill](http://distill.pub/2017/momentum/), [HTML Widgets](http://www.htmlwidgets.org/showcase_networkD3.html) ] ??? Why not add interactive illustrations? --- # R Markdown + bookdown + blogdown - Relatively simple and human-readable syntax - One document, multiple output formats (no longer locked to a specific format) - Technical writing with bookdown - If necessary, it will be easy to publish selected papers as (contributed) books on a regular basis - Web publishing with blogdown - Of course, reproducible <sup>*</sup> .footnote[ [*] More _likely_ to be reproducible. ] --- class: right background-image: url(images/poptocat.jpg) background-size: contain # GitHub --- class: inverse, right background-image: url(gif/tiny-human.jpg) background-size: cover # GitHub pull requests ## Alone, we are all weak .footnote[ https://github.com/yihui/knitr/graphs/contributors ] --- # New paper submission via GitHub pull requests - R Markdown is plain-text (good for GIT) - Full history preserved - All comments are public - Inline comments; no need to point to Page X Line Y - Automated test and build (e.g. Travis CI) - Trivially easy to accept a paper: click the Merge button .footnote[https://github.com/rbind/support/pull/26] --- # Find a reviewer (in practice) -- .center[<img src="gif/drag-cat.gif" width="80%" />] --- # Find a reviewer (my wish) -- .center[<img src="gif/cat-hands.gif" width="80%" />] --- # Potential challenges - Cost - Not a problem (e.g. use GitHub and Netlify for free) - It is difficult for traditional journals to be free (even [PLoS](http://journals.plos.org/plosone/s/publication-fees)) because of 1. The focus on printing 1. Employees - Incentives - Everything is difficult in the beginning. - Authors: if the main reason to publish in this journal is not sharing knowledge, this is not a journal for you (e.g. you need publications for promotion) - Reviewers: no longer anonymous, so you may get some reputation in the community --- # Potential challenges - Computing environment - For small-scale computations, Travis CI should work well - How about intensive computations? Perhaps we have to let authors submit the compiled results instead of recompiling their manuscripts - Data - Small data (no larger than several megabytes) could be easily stored on GitHub and other places online (then you can `read.csv()` from URLs) - Huge data? --- # Recap - Open - Source document/code of papers - Review - Comments - Fast - Decentralized (the model of one chief editor + two associate editors doesn't scale) - Efficient tools (pull requests, automated tests and build) - Reproducible - From day one (R Markdown) <sup>*</sup> .footnote[ [*] Again, more _likely_ to be reproducible. Not guaranteed. ] --- class: inverse, center, middle background-image: url(images/sunrise-forest.jpg) background-size: cover # A NEW WORLD OR UTOPIA? ??? Image/GIF credit: [Research in Progress](http://researchinprogress.tumblr.com/) and [Unsplash](https://unsplash.com/).