Skip to content
Learn Netverks

Lesson

Step 19/36 53% through track

ggplot2-intro

ggplot2 introduction (local install)

Last reviewed Jun 1, 2026 Content v20260601
Track mode
server_script
Means
Server runner
Reading
~1 min
Level
intermediate

This lesson

An orientation to the R track—how the compiled playground works, core vocabulary, and what you will practice next.

You need a clear map of the R track so vectors, data frames, factors, and the tidyverse mindset do not feel like magic.

You will apply ggplot2 introduction (local install) in contexts like: Publication charts, EDA notebooks, and stakeholder dashboards.

Write R in the editor and click Run on server—the dev runner executes with Rscript; use print() or cat() and base R in playground snippets (tidyverse locally; LEARNING_RUNNER_ENABLED=true). Also read the interview prep blocks.

After basic programming and ideally SQL—pair with Python for ML-heavy roles or stay in R for stats and research pipelines.

ggplot2 builds charts with layers: data, aesthetics, geoms, facets, and themes. Install with install.packages("ggplot2")—lessons explain locally; playground prints chart-ready data.

Grammar of graphics

library(ggplot2)
ggplot(df, aes(x = week, y = score)) +
  geom_point() +
  labs(title = "Scores over time")

Playground: prepare data

chart <- data.frame(week = 1:4, score = c(82, 85, 88, 90))
print(chart)

Understand the table ggplot would consume—compare layering with matplotlib in Python.

Important interview questions and answers

  1. Q: What is aes()?
    A: Maps variables to visual properties—x, y, color, fill—ggplot2 handles scales and legends.
  2. Q: Why ggplot2 locally?
    A: Package not in base R sandbox; install locally for publication charts.

Self-check

  1. What ggplot2 function adds points?
  2. What does aes(x = week, y = score) map?

Tip: Install ggplot2 locally—prepare tidy data frames in the playground first.

Interview prep

Grammar of graphics?

Layer data, aesthetics, geoms, scales, and themes declaratively.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • aes mapping?
  • geom_point role?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump