In this blog series over the next 30 days, I invite you to join me in building basic and essential plots in R, learning one concept every single day.
I recently presented Data Visualization to a group of beginners in R. Their numerous questions made me reconsider how to introduce R in a way that wouldn’t overwhelm them. That’s what inspired me to embark on this journey.
“Soundarya, let’s take a step back and think one step at a time.” - My postdoc supervisor
And I took that advice to heart. I realized that the best way to learn R or anything is to take it one step at a time.
You have been eyeing R for a while now, but you are not sure where to start. You might have heard about the power of ggplot but are intimidated by the code. You have taken a few courses but still feel lost when you try to build your own visualizations. Maybe you have not heard anything about R, but you are curious to learn. Or you are simply expected to learn a statistical software for your own analysis.
If this sounds like you, I have good news! I am starting a blog series called “Viz with me” where I will guide you through building basic and essential plots in R, learning one concept every single day.
This series is designed for beginners who are new to R and data visualization.
This is a series of posts that will arrive every day for the next 30 days. Each post will introduce one main concept about building data visualizations with R. We will take it one piece of code at a time, working toward creating beautiful and publishable data visualizations.
R is a powerful software for data visualization (dataviz) and statistical analysis. When I first started, I was drawn to its data visualization capabilities, and that is usually what I mention when meeting people for the first time. My honest reason is aside!
I’m not a programmer, but learning to write code for data viz and analysis in R has taught me so much more than traditional classes ever did, especially about statistics and design principles. Sure, I stumbled at first, but I kept coming back, and R never let me down.
Why not?
If you are interested in reproducible research, R is a fantastic place to start. If you are just beginning your PhD, now is the perfect time. Imagine conducting data visualizations and analyses through scripts that you can reproduce for yourself and for others—R makes that possible.
And, it is free.
When I first started learning R, the traditional methods—vectors and matrices—were honestly daunting. I struggled to relate them to what I was doing as a researcher in the biomedical field.
It took me a while to realize that starting with data visualization in R can be both rewarding and practical. The power of ggplot (a widely-used data visualization package) opens up countless opportunities. You can stick with the basics or dive into customization. The beauty is, you don’t have to push yourself to customize if you don’t want to—you can learn and adapt at your own pace.
So, viz with me for the next 30 days commencing tomorrow.
Towards the closing of each year, I take 100-day challenges to fast-forward my New Year’s resolutions. I’ve accomplished more during these 100-day challenges than when I start fresh at the beginning.
And we are learning one single thing everyday. This approach is beneficial because it won’t take much time each day. Even if you forget about it during the day, you can revisit the concept at the end of the day to complete it. You might need RStudio handy, though. You can also start it first thing in the morning to kickstart your day.
If you are eager to build the chart right away, this method may not suit you, as it will take 5 or 6 days to cover everything needed. However, you can take it at your own pace; you don’t have to follow it every single day, but I suggest you go through the sequence I present.
It is like taking one step at a time, learning to walk day by day. So, here we are, taking one step at a time each day toward mastering data visualization in R.
Starting tomorrow, I will be posting a daily blog for 30 days, introducing you to one (or sometimes two) lightweight concepts that will help you build your visualizations. Don’t worry, we are starting from scratch—you don’t need any prior experience with data visualization.
This is a minimalist approach, so by the end, you won’t have a flipbook of every possible data visualization technique. But I’m confident that by the end of the 30 days, you will have enough resources and skills to create data visualizations using ggplot (Wickham 2016). From there, you should be able to build on these basic skills and take them further as you need them.
If you are already experienced with ggplot, there is something for you too! I will be sharing some advanced techniques each day that you can explore to keep improving your skills throughout this challenge.
It is different from other courses because many focus on drawing the visualization immediately. Here, we will approach it step by step, and there may be days when we don’t produce a chart for 2–3 days. Don’t let that discourage you. Remember, taking one step at a time and savoring the process of learning ggplot slowly will build a stronger foundation than rushing through it.
Don’t worry about memorizing the code. As long as you understand what each line of code is doing, you’ll be fine! You can always refer back to the code when you need it.
What to do if you are up for the challenge:
Where to go? - Here is the link Download and install the latest version of R for your operating system.
Where to go? - Here is the link Download and install the latest version of RStudio for your operating system.
Open RStudio, go to tools–> Global options–> General and check if R version is appropriate. If not, you can change it to the latest version of R you have installed.
Why install R and RStudio separately?
You may be wondering why I have been talking about R but now introducing RStudio. Let us take a food analogy. Using R without RStudio can feel like eating plain rice. Sure, you can eat it, but it is much better with a side of gravy or rasam! RStudio makes working with R more beginner-friendly and much less intimidating, just like eating a rasam rice.
If you want to dive in today and cannot wait until tomorrow, read this blog where I explain how to open and write in scripts in RStudio.
That’s all for today. Let’s dive into Day 1 tomorrow, where we’ll officially get started!
Inhale and lets take one step a day…
When you feel ready, visit day 1 of the challenge page.
For attribution, please cite this work as
Soundararajan (2024, Sept. 30). My R Space: Viz with me - Inviting Beginners. Retrieved from https://github.com/soundarya24/SoundBlog/posts/2024-09-30-viz-with-me/
BibTeX citation
@misc{soundararajan2024viz, author = {Soundararajan, Soundarya}, title = {My R Space: Viz with me - Inviting Beginners}, url = {https://github.com/soundarya24/SoundBlog/posts/2024-09-30-viz-with-me/}, year = {2024} }