Summarizing Data Part 2

Meetups
Slides and recording for the Summarizing Data Part 2 meetup.
Author

Jason Bryer

Published

September 15, 2025

Click here to open the slides (PDF).

install.packages(‘brickset’) library(brickset) data(“legosets”)

names(legosets)

ggplot(legosets, aes(x = ‘Lego’, pieces)) + geom_boxplot() + geom_point(y = mean(legosets$pieces, na.rm= TRUE), color = ‘blue’, size = 4) # scale_y_log10()

mean(log(legosets\(pieces + 1), na.rm = TRUE) log(mean(legosets\)pieces, na.rm = TRUE)) - 1

ggplot(legosets, aes(x = pieces, y = US_retailPrice, color = availability)) + geom_point(alpha = 0.1) + theme_minimal()

ggplot(legosets, aes(x = pieces, y = US_retailPrice)) + geom_point() + theme_minimal()

ggplot(legosets, aes(x = pieces, y = US_retailPrice)) + geom_point(color = ‘purple’) + theme_minimal()

ggplot(legosets, aes(x = US_retailPrice)) + geom_histogram() ggplot(legosets, aes(x = US_retailPrice)) + geom_histogram(binwidth = 25) ggplot(legosets, aes(x = US_retailPrice)) + geom_histogram(bins = 100) ggplot(legosets, aes(x = US_retailPrice)) + geom_density()

x <- seq(0, 1000, by = 0.1) df <- data.frame(x = x, y = log(x)) ggplot(df, aes(x = x, y = y)) + geom_path() + geom_point()