šŸ“š Collection of Data Analytics Tutorials for R & Python

Jan 1, 2023Ā·
Yuxiao (Rain) Luo, PhD
Yuxiao (Rain) Luo, PhD
Ā· 5 min read

From 2021 to 2023, we created and published a variety of digital tutorials online, ranging from text analysis in R to building games in Python. These resources are free, accessible, and perfect for building your data skills.

Tutorials from R User Group

We created a series of R tutorails from the bi-weekly R User Group (RUG) meetings, covering topics from text analysis to R Markdown and Shiny applications. You can find a more organized stack in the GitHub repository. All these tutorials are beginner-friendly.

I’m listing some useful R tutorials below.

  • Introduction to R Markdown: The tutorial introduces R Markdown as a format combining Markdown text with R code to create dynamic, reproducible reports. It covers installing the package, creating .Rmd files, adding code chunks, and embedding plots or text. Finally, it explains rendering documents to HTML, PDF, or Word via RStudio’s Knit button or render().

  • Introduction to R Shiny: The tutorial introduces R Shiny as an R package for building interactive web apps with a user interface and server logic. It covers creating layouts with fluidPage(), adding input widgets, and rendering outputs that respond to user input. Finally, it explains running apps via shinyApp() or RStudio’s ā€œRun Appā€ button using Shiny’s reactive programming model.

  • Introduction to string processing in R: The tutorial introduces the stringr package for consistent, easy string manipulation in R. It covers functions for changing case, measuring length, extracting/modifying substrings, concatenating, trimming, and padding. It also demonstrates pattern matching with regular expressions using functions like str_detect(), str_replace(), and str_split().

  • Introduction to regular expression in R: The tutorial introduces regular expressions in R for defining text patterns, using stringr functions built on stringi. It explains key regex elements like metacharacters, quantifiers, character classes, and anchors. It demonstrates finding, replacing, and viewing matches for tasks like pattern detection and text cleaning.

Workshops (Python & R)

We also created some workshops focusing on building up specific skills in Python & R. All these workshops are beginner-friendly.

Python

  • Building your first game using Pygame: The tutorial introduces Pygame for building simple interactive games in Python. It covers setting up the display, handling events, and running a game loop with drawing and updates. It also demonstrates using sprites for movement, collisions, and basic game mechanics.

  • Creating simulations in Python: The tutorial teaches building simulations in Python using object-oriented programming and custom functions. It models ā€œCrittersā€ with attributes like age, food, and reproduction, adding events such as environmental disasters. The focus is on replicating real-world processes to explore different outcomes.

R

  • [Data Wrangling in R](https://github.com/GC-DRI/r_data_analysis_2021/blob/main/data-wrangling.md: This workshop teaches: 1. Cleaning and transforming Spotify datasets; 2. Identifying patterns or trends within the data; 3. Creating visualizations to surface those insights.

  • Predictive modeling in R (PDF) & Code: The workshop covers building predictive models in R, from data preparation to model training and evaluation. It demonstrates methods like logistic regression and tree-based models with cross-validation and performance metrics. The accompanying R code implements the full workflow for training, predicting, and assessing models.

  • Introduction to regression analysis in R: The tutorial introduces simple and multiple linear regression in R using lm(). It covers checking model assumptions with diagnostic plots and interpreting key statistics. It also demonstrates visualizing regression results with ggplot2.

  • Introduction to text analysis in R: The tutorial introduces text analysis in R using tidyverse, tidytext, and visualization libraries. It covers tokenizing text, counting word frequencies, removing stopwords, and creating word clouds with wordcloud and wordcloud2. It also demonstrates filtering by artist, visualizing word frequency with ggplot2, and applying the workflow to another dataset.

  • Qualitative data analysis with R: RQDA: The workshop trains participants to use RQDA, a free R package for qualitative data analysis. It covers installation, importing and coding text data, writing memos, organizing codes, and running searches—combining a GUI with R scripting. Participants learn to manage and analyze qualitative data efficiently without costly proprietary software.

Other blog posts about using R

Please find the 2-hour workshop recording here).

  1. Context & Motivation: A PhD student in Business Information Systems, yielding from projects analyzing ERP system implementation interviews and CEO speeches, highlights the limitations of purely quantitative methods. Such approaches can oversimplify social complexity, obscure theory-building, and ā€œpresent an illusion of precision,ā€ ultimately losing perspectives vital to qualitative understanding.
  2. Why RQDA? The student chose RQDA, an open‑source R package, for three key reasons: - It’s free and open source—no expensive licenses required. - It integrates seamlessly with R/RStudio, allowing both GUI interactions and script‑based manipulation. - It offers standard CAQDAS features comparable to proprietary software.
  3. Capabilities & Limitations: - RQDA supports plain-text input, qualitative coding (including multiple levels and concept development), memos, file and code organization, and both general and conditional search—all via a GUI with the option to extend functionality via R scripting - However, its development became inactive as of early 2020, and it’s not guaranteed to receive future updates—though existing versions remain functional for most research needs
AspectDetails
ToolRQDA (R package for CAQDAS)
ProsFree; integrates with R; full-featured (coding, memos, search, organization)
ConsDevelopment halted; may require working with R version 3.6.3 for compatibility
Use CaseSuitable for mixed-method qualitative research, particularly when avoiding proprietary licenses

Integrated R Tutorials Book

All of our R-related tutorials have been compiled into a single resource:
šŸ“– Data Analytics in Digital Research with R

This book includes guides on R Markdown, Shiny, text analysis, predictive modeling, and more—making it a one-stop resource for learning R in the context of data analytics and digital research.


These tutorials are open resources—feel free to explore them at your own pace and integrate them into your projects, learning, or teaching.

–>

Did you find this page helpful? Consider sharing it šŸ™Œ