R
Completed
-
Section 1: Getting Started
-
Section 2: Core Syntax
-
Section 3: Data Structures
-
Section 4: Data Manipulation
-
Section 5: Visualization and Statistics
-
Section 6: Advanced R
-
Section 7: Practical Projects
-
Section 8: Interview Practice
-
Section 9: More Practice Exercises
-
Section 10: Shiny Apps in Depth
-
Section 11: More Data Wrangling
-
Section 12: Tidyverse Deep Dive
-
Section 13: Statistical Modeling Deep Dive
-
Section 14: Machine Learning in R
-
Section 15: R Visualization Deep Dive
-
Section 16: R Package Development Deep Dive
-
Section 17: R for Reproducible Research
-
Section 18: R and Databases
-
Section 19: R Performance Optimization
-
Section 20: Bioinformatics and Specialized R
-
Section 21: More Shiny Practice
-
Section 22: More Practice Exercises
-
Section 23: R Data Structures Deep Dive
-
Section 24: More Interview and Review
-
Section 25: R for Business Analytics
-
Section 26: R Text Mining and NLP
-
Section 27: R Spatial Data Analysis
-
Section 28: R Deep Learning
-
Section 29: Advanced Statistical Techniques
-
Section 30: R Object Systems Deep Dive
-
Section 31: R Environments and Metaprogramming
-
Section 32: R for Finance
-
Section 33: R for Clinical and Health Data
-
Section 34: More Shiny Advanced Practice
-
Section 35: R Data Cleaning Deep Dive
-
Section 36: R Reporting Automation
-
Section 37: More Practical Projects Round 2
-
Section 38: R Ecosystem and Career
-
Section 39: More Visualization Practice
-
Section 40: R for Experimentation
-
Section 41: R for Genomics and Bioinformatics Deep Dive
-
Section 42: R for Marketing Analytics
-
Section 43: R Data Import/Export Deep Dive
-
Section 44: R String Processing Deep Dive
-
Section 45: R for Actuarial and Insurance Analytics
-
Section 46: R Testing and Quality Assurance Deep Dive
-
Section 47: R Version Control and Collaboration
-
Section 48: R Advanced Functional Programming
-
Section 49: R for Supply Chain and Operations
-
Section 50: More Practice Exercises Round 3
-
Section 51: R Dashboards and BI Integration
-
Section 52: R Data Governance and Ethics
-
Section 53: More Modeling Practice
-
Section 54: R Final Capstone Projects
-
Section 55: R for Sports Analytics
-
Section 56: More Interview Practice Round 2
-
Section 57: R Networking and APIs
-
Section 58: R for Environmental Science
-
Section 59: R Notebook and Documentation Practices
-
Section 60: More Data Wrangling Mastery
-
Section 61: R for A/B Testing at Scale
-
Section 62: R Package Ecosystem Deep Dive
154: Preparing an R Portfolio for Data Roles
I was looking back at some of my old GitHub repositories from a few years ago, and it hit me: most of them were essentially "code graveyards." I had these scripts that worked perfectly on my machine, but to anyone else, they were just walls of uncontextualized R code. If I were a hiring manager spending only three minutes on a portfolio, I'd have no idea what the goal was or why the results mattered. We need to fix that.
The "Script Dump" Trap
Let's say I have a project where I analyzed NYC Citi Bike trip data to find the most efficient docking stations. My first instinct—the lazy engineer instinct—is to just push my analysis.R script to GitHub. I'll try that now.
# analysis.R
library(tidyverse)
df <- read_csv("citi_bike_data.csv")
summary_stats <- df %>% group_by(station_id) %>% summarize(avg_trip = mean(tripduration))
ggplot(summary_stats, aes(x=station_id, y=avg_trip)) + geom_col()
# ... 200 more lines of data cleaning ...
I'm looking at this in the GitHub UI, and it's bleak. There's no explanation of the dataset, no "so what," and the plots are trapped in my local /plots folder. A recruiter isn't going to clone my repo, install the same version of tidyverse I used, and run the script just to see if I know how to use a dataframe. That's a huge friction point. I need to move from "sharing code" to "presenting a project."
Turning Code into a Narrative
The fix here isn't just a better README; it's changing the medium. I'm going to move this into a Quarto (or R Markdown) document. The goal is to weave the code into a story. I'll try rendering a section of my analysis to see if the flow feels more natural.
## The Efficiency Gap in Midtown
I noticed that several stations in Midtown have a massive imbalance in trip duration.
```{r}
#| echo: false
# I'm hiding the tedious cleaning code here so the reader
# focuses on the insight, not the regex.
ggplot(summary_stats, aes(x=station_id, y=avg_trip)) +
geom_col(fill = "steelblue") +
theme_minimal() +
labs(title = "Average Trip Duration by Station")
```
As you can see above, Station 123 is an outlier. This suggests...
Now we're getting somewhere. By using echo: false for the boring parts and keeping the "meat" of the logic visible, I'm guiding the reader. I'm not just showing them I can write R; I'm showing them I can derive a business insight from data. That's the difference between a coder and a data professional.
The Last Mile: Making it Public
Even with a Quarto doc, if the recruiter has to download a .qmd file, we're back to the friction problem. I want this to be a one-click experience. I'll try rendering this to an HTML file and hosting it via GitHub Pages.
I noticed a common mistake I used to make: uploading the raw .csv file to the repo. If the dataset is 500MB, the repo becomes sluggish and might even hit GitHub's limits. Instead, I'll host the data on a public S3 bucket or a Dropbox link and use read_csv("https://...") in the code. This keeps the portfolio lean and ensures the project is reproducible regardless of the user's local file structure.
Once I push the index.html to my gh-pages branch, my project is no longer a "folder of scripts"—it's a live case study. I can put a link to this in my resume, and the hiring manager sees the result immediately. My R skills are now an evidence-based claim rather than just a bullet point.
📋 Practical Task
Transforming a Raw Script into a Public Case Study
You have a raw R script called weather_analysis.R that calculates the average temperature increase over ten years using a public dataset. Your goal is to turn this from a "script dump" into a portfolio piece.
- Step 1: Create a Quarto (.qmd) or R Markdown (.Rmd) file. Instead of just listing the code, write two paragraphs: one explaining the "Problem" (why this analysis matters) and one explaining the "Insight" (what the data actually tells us).
- Step 2: Organize your code chunks. Use
echo: falsefor the data loading and cleaning sections, but keep theggplot2visualization code visible so the reviewer can see your styling logic. - Step 3: Replace any local file paths (e.g.,
read.csv("C:/Users/Documents/data.csv")) with a URL to a public CSV file to ensure the project is reproducible. - Step 4: Render the document to HTML and describe (or simulate) the process of pushing it to a GitHub repository and enabling GitHub Pages to make it a live URL.
There are no comments for now.