Hello, Quarto

My very first article in my personal site which is built using Quarto!

General
Author

stesiam

Published

July 27, 2022

Hello, Quarto !

Finally, I built my website using Quarto. Currently the page is hosted via GitHub Pages.

How it all started

My encounter with Statistics was rather accidental. The first time I sat the Panhellenic exams, I was admitted to the Department of Economics at the University of the Peloponnese. Although I liked the idea of studying Economics, moving to another city (Tripolis) would have meant a significant financial burden combined with a great deal of uncertainty, something that felt quite overwhelming for me at the time. For that reason, I decided to sit the Panhellenic exams again the following year. As far as I remember, I had listed Economics departments and Computer Science departments, followed by Statistics departments, first in the Attica region and then in the rest of Greece. Eventually, when the admission scores were announced, I found out that I had been accepted into the Department of Statistics and Insurance Science at the University of Piraeus. As a student in a Statistics department, I began to gain my first relevant exposure through my studies. During the first years of my degree, the focus was mainly on theory, covering areas such as Statistics, Probability Theory, Insurance, and Actuarial Science. In this way, I built my first solid theoretical foundations. However, I felt that something essential was missing, perhaps the most important skill for a statistician: the ability to give substance to theoretical knowledge and apply statistical techniques in practice. Unfortunately, the department placed very little emphasis on this aspect. Indicatively, the curriculum of my academic year included only two courses related to applied statistical methodology using statistical software: Excel and SPSS. The SPSS course was fairly good, but it was by no means aligned with the level of knowledge I wanted to acquire, nor did it reflect the contemporary needs of the job market. Moreover, SPSS as a software package has several drawbacks that make it a poor choice: you cannot easily customize your models, you do not fully see how the results are produced, and, of course, it is not free. During the period 2018-2019, I started looking for alternatives, as I had grown to truly dislike this particular software, or, more precisely, the fact that I had to pay for it. Among other options, I discovered software tools with a similar philosophy to SPSS but available for free, such as PSPP, JASP, and jamovi. Personally, I found the latter two to be particularly solid choices. In fact, I would strongly recommend JASP and jamovi to anyone who lacks programming skills while also having no access to SPSS. It was around that time that I discovered the existence of a programming language specifically designed for data analysis: R, also known as Rstats.

From SPSS to R

The transition from a statistical software suite to a programming language can be quite a shocking change, especially when it is your first programming language. SPSS and its free alternatives accompanied me for a considerable period of time, however, what initially seemed to be their main advantage gradually turned into a limitation. These tools are primarily designed to allow individuals with basic statistical knowledge to perform their own analyses. As my studies progressed and I became familiar with more methodologies and techniques, I started to realize that such tools could only help me grow up to a certain point. They are undoubtedly useful, but they impose a boundary on how deeply the user is expected or allowed to think. Anything beyond that boundary is either ignored because it is considered too complex for the majority, or handled through reasonable assumptions based on the data, so that the average user does not need to engage with theory or hypothesis testing. This point differs from one application to another: some aim to be overly simple and do a few things well for everyday use. All of them, however, come with limitations. As I continued working with such software, I began to wonder: if I wanted to introduce additional parameters or apply a variation of a statistical test I had encountered in a recently published paper, what would I do? That was the moment I realized that, by continuing down this path, I would end up serving the tools rather than my actual purpose. My goal was clear: to become knowledgeable in my field, not in a specific program or a statistical software suite. This realization led me to make a major change.

Λογότυπο γλώσσας προγραμματισμού R Η γλώσσα R είναι μία γλώσσα προγραμματισμού

First steps

My relationship with R began in 2019 and went through quite a few ups and downs. At first, I found it rather strange and, for the most part, I used it in a fairly procedural way. In simple terms, I was copying code and just trying to understand what I was doing. To expose myself even more, whenever I wanted to check whether differences were statistically significant, I would simply google it. Due to its particular nature as a language, I used R more as an analysis tool than as a programming language. My first uses of R were limited to simple statistical tests, and I was excited by the fact that I could now use a tool with theoretically unlimited capabilities compared to “ready-made” software. The whole journey was quite interesting and involved many sleepless nights. Nevertheless, after countless error messages, I began to notice my gradual improvement. At the same time, I had not yet realized how right a choice I had made, as I was still unaware of the true breadth of its capabilities. Over time, I discovered that you could create your own plots using the ggplot2 package, and I got excited, perhaps a bit more than normal, when I learned that the BBC and the Financial Times use ggplot to produce their impressive visualizations. When I later found out that you could also build web applications and dashboards using the Shiny package, I was genuinely impressed by the range of possibilities, which went far beyond statistics alone. Later on, I discovered Kaggle, a website dedicated to data science. I found it to be a particularly interesting platform, and that’s where I started publishing notebook-style articles, plots, and generally experimenting with R. Looking back at them today, several years later, my plots were awful, but at the time, I was proud of them. At least, over time I improved, and now I have the self-awareness to admit that they were indeed terrible 🙂. If you ask nicely, I might even upload one or two so you can see how clueless I was back then. Kaggle was extremely useful: I learned a great deal, and there were people working at major companies who shared accessible solutions to real-world problems. Even today, competitions are still being posted, and many participants publish their solutions. The only downside is that Python eventually became dominant, with around 80% of the material focusing on other languages. As a result, the R user community has shrunk, and fewer and fewer articles about R are being published or are being replaced by Python equivalents.

Out of platform

A few years ago, I decided to build my own website so I could host my articles myself. The first step was figuring out how I actually wanted to build it. There were plenty of options, and I ended up experimenting with several different approaches and tools. One option was a traditional WordPress website, but that quickly proved to be fairly expensive, since it would require hosting on a server and covering the associated costs (around $10 per month) for a reasonably secure VPS plan. That didn’t really seem worth it, so, being the cheapskate that I am, I started looking for a more affordable alternative. As it turns out, there is one. That’s when I came across static websites and realized that a blog doesn’t necessarily need a server at all. Examples include Hugo with the help of the blogdown package, as well as Distill. Both were solid options, but they also came with some notable limitations. On the one hand, Hugo is based on a language I don’t know (Golang), which meant that making changes or adding new features would be pretty much impossible for me. On the other hand, my previous website, built with Distill, wasn’t friendly on smaller screens (non-responsive), since it hid the menu button. Quarto addressed many of the issues I encountered with these two approaches, and it’s now widely used for building personal websites. Sure, Quarto still has some shortcomings when compared to more established website frameworks (such as Astro), but at the moment it’s arguably the best option for anyone working with data analysis languages (R, Python, Julia) who wants to publish articles based on them. Its main advantage, in my view, is the ability to execute an analysis file and render it directly into an article. If I were using another static site builder like Astro, I would have to run the code separately each time and then manually embed the results or plots into the site before rebuilding it, making the whole process far less productive.

Λογότυπο γλώσσας προγραμματισμού R Η γλώσσα R είναι μία γλώσσα προγραμματισμού

Figure 1: Packages to make a website in R (before Quarto)

Objectives

As this is my first article on my website, I would like to enumerate my goals for this website. So, on this website, I am planning to :

  • Write ML Notebooks (using R and Python)
  • Upload articles that will help other users (e.g., “How to make your Quarto site” etc.)
  • Showcasing my projects (regarding Shiny Apps, courses, etc.)
  • Write posts about R in Greek as there are not many R users in Greece
  • Solving exam papers on my website.
  • And many more …, so stay tuned!

Acknowledgments

Image by R. E. Beck from Pixabay

References

Allaire, J. J., Teague, C., Scheidegger, C., Xie, Y., & Dervieux, C. (2022). Quarto. https://doi.org/10.5281/zenodo.5960048
Dervieux, C., Allaire, J., Iannone, R., Presmanes Hill, A., & Xie, Y. (2022). Distill: ’R markdown’ format for scientific and technical writing. Retrieved from https://CRAN.R-project.org/package=distill
Xie, Y., Dervieux, C., & Hill, A. P. (2022). Blogdown: Create blogs and websites with r markdown. Retrieved from https://github.com/rstudio/blogdown