
Explore synthetic data across nine sheets in a relational database setup. Learn to join sheets using primary and foreign keys, with left joins to combine reports, locations, and clinical information.
Download zip folder with data, R project file, and project folders.
Download and install RStudio desktop, a free integrated development environment for R, from Posit. Configure global options, enable soft wrap, and tailor a clean multi-pane layout for coding.
Zip folder with project folders and course datasets.
Learn to install and load packages in R from CRAN or GitHub, create a vector of package names, and use a consolidated command to manage tidyverse packages for data analysis.
Learn to subset and rename columns in R using dplyr's select, set_names, and rename, then split a column with separate; pipe into glimpse to inspect results.
Wrangle data with dplyr and lubridate: mutate date variables, filter by admin year, group by admin quarter and county, count, sort, and ungroup for clean analysis.
Create a ggplot bar chart of counts by admission quarter, faceted by the top five counties, and annotate bars with counts using geom_text, while adjusting y scales.
Attached is the Jumpstart final code.
Load four tables from CSV, Excel, and Snowflake, perform left joins to create a single data frame, restructure columns, and begin exploratory data analysis with visuals and descriptive statistics.
Explore data types and data structures by loading packages, creating character vectors, converting to factors, and handling dates with lubridate's mdy to prepare tibbles.
Combine vectors into data frames and tables, forming a two-dimensional structure of columns and rows. Access with the dollar sign and square brackets, and manage unequal lengths with NA.
Learn to create a Snowflake database, load four tables from csv files, connect from RStudio via ODBC, and query data with SQL to create data frames.
Explore feature engineering with mutate, case_when and if_else in R, creating report counts, binning by quantile and ntile, and deriving boolean and categorical variables like foster care and incident category.
Explore an initial data overview using three packages, starting with Data Explorer, to glimpse, introduce, and gather, then visualize missingness with plot missing, and learn NAF handling.
Explore data using Data Explorer visualizations, combining select helpers with startswith and dplyr, to create bar, density, correlation, and box plots, and generate an EDA report.
Explore data insight with the skimmer package to quickly summarize data structure, missing values, and statistics, then examine bivariate relationships using the gallery package’s GG pairs with gender-based grouping.
Filter with multiple conditions using and, or, and not, and explore filter if and filter at, plus missing values handling across character and numeric variables.
Explore date and time handling in R using lubridate to parse, convert, and manipulate date-time stamps, time zones, and Unix timestamps for time-based analysis.
Explore how str_glue in R can append text around variables and using mutate to create an incident response column from incident type and medical attention, and lowercase text when needed.
Explore feature engineering fundamentals, including creating new variables with mutate, categorizing by quantiles, and using case when and ordinal factors, with time series and categorical data examples.
Learn to compute year-to-date and rolling averages in R by counting monthly reports, creating cumulative and percentage columns, and applying a three-month rolling mean.
Leverage Lubridate for time-based feature engineering in R, using select, filter, mutate, and group by to count reports by quarter and by date ranges.
At this point in the course, you can choose to continue with functional programming or skip to data visualizations and reporting. Functional programming can be more challenging and you may prefer to understand how to visualize data and create reports before diving into functions.
Apply functional programming in R to compute descriptive statistics: mean, sd, min, max, and IQR for numeric variables with anonymous functions, across variables, while handling missing values and excluding columns.
Create a small synthetic data set, compute outlier flags with the outliers function on report count, and visualize a ggplot box plot by gender with ID labels for outliers.
Save numeric and grouping variables, pass them to the runtests function, and create a functions.R file in the zero_zero_scripts folder with append = true.
Learn to build a bar plot in R with ggplot, counting program admitted. Order bars by n in descending order with factor reorder, and add labs including title, subtitle, caption.
Visualize the distribution of a numeric variable by gender using density plots in ggplot. Learn how to compare female and male report counts, adjust transparency, and explore optional facet wrapping.
Develop skills to create boxplots and violin plots in ggplot, compare report count by incident type and gender, and interpret medians, means, outliers, and distribution shapes.
Install and load new libraries for reports, using the here package to navigate folders and tinytex to output pdfs, with steps to uncomment and run commands before the next section.
Learn how to create R Markdown reports that integrate text, code, graphs, and tables, export to HTML or PDF, and customize with YAML headers, code chunks, and themes.
Load and configure data analysis tools in R using tidyverse, readxl, and here; align project data, join tables, mutate variables, and prepare a customizable report with graphs.
Master placing text beside a table with CSS flex and div styles, using margins and padding to tailor left and right content in an HTML report.
Explore converting R markdown outputs to PDF, adjust YAML to pdf_document with a table of contents, and tune LaTeX styling and layout for tables and graphs.
Combine multiple graphs on a single page in R using the patchwork library and layout syntax, then prepare parameterized, automated reports in R markdown.
Toggle to the visual editor window and manually insert a table. Format headers, lists, pictures, code blocks, CSS, and equations, then knit to preview results.
This is the R course for beginners with no coding experience. It is based on the latest research in online learning theory and my personal experience with dozens of online courses. I created this course as the course I wish I would have had when I first started learning R.
We will code together and focus on the 20% of code responsible for 80% of the work. At the end of sections, you will have a 'Make It Stick' challenge to apply what you have just learned with a different dataset (based on principles in the book 'Make It Stick').
This course is different from other beginner courses in R in a couple significant ways:
Project-based learning with real-world scenarios: All lessons are based on common questions facing data practioners.
Content focus: The course outline and lectures are based on everyday workflows of data practioners rather than a bottom-up approach to R programming. Practically, this means we won't spend much time learning about R and core principles of programming; we will immediately start with how you will use it.
Current (& continually updated) code: I work in R everyday and make sure you are learning the best and most efficient ways to accomplish the most common and important tasks. For example, the rowwise function in the dplyr package enables you to perform calculations across columns by rows. A single line of code can now accomplish what was previously far more challenging.
Keeping it real: I keep the video rolling when I make an error. You can learn a lot from mistakes. R was my first programming language and I quit twice because of too many errors, too much time to learn it, and frustration with online courses that left out important steps or assumed knowledge that simply wasn't there. I try really hard to explain what we're doing while we're doing it and then giving you an opportunity to do it on your own with a different (but related) dataset.
In this course, you will learn to:
Load data from different sources (files, databases)
Structure data for analysis using the tidyverse packages
Quickly explore and visualize data trends
Conduct feature engineering for deeper analysis
Analyze survey data
Select the right visualization for your data
Create professional visualizations
Create and automate reports using RMarkdown