A Python plotnine book built with Rmarkdown

28 December 2020
 GitHub  Pages


Found this interesting article by Jeroen Janssens on applying the Grammar of Graphics introduced to data science by #rstats ggplot2. The amazing thing is that the article has been totally computed with Python as the coding engine, while the text is in Rmarkdown. The plots have been generated by the Python package plotnine, practically duplicating what R ggplot2 does!

I liked the article so much that I decided to make it a “minimal book” with R bookdown, maintaining the Python computations. Rmarkdown is the extended and super-powered version of Markdown, which uses some text symbols - such as #, *, _, [ ], and others to add formatting to the document. Markdown and Rmarkdown documents are fully reproducible and can have version control with Git, since they are full text.

What I am seeing, more and more lately, are Python analysis being written in Rmarkdown instead of Jupyter notebooks. This will bring a significant change in data science, machine learning, and reproducibility due to the flexible nature of Rmarkdown. And of course, mingling tightly Python and R, through a common document, as both can share data objects.

« A compilation of Machine Learning examples | A Matplotlib book with Rmarkdown »