Gustavo Varela Alvarenga

R Code

R Code

Data Visualization

Some of the R packages I have used for data visualization:

ggplot2plotlyhighcharterdygraphsgoogleVisggiraphshiny

Selected R Scripts

A few self-contained ggplot2 walkthroughs. Each link downloads the full, runnable R script.

Waterfall chart with ggplot2

Waterfall chart with ggplot2

A stacked waterfall built from scratch with geom_rect, with running totals printed above each bar.

Download .R ↓
Dumbbell (dot) plot with ggplot2

Dumbbell (dot) plot with ggplot2

A two-point dumbbell plot comparing values across groups with geom_point and geom_segment.

Download .R ↓
Animated Brazil deforestation map

Animated Brazil deforestation map

A choropleth of native-forest loss rendered with ggplot2 and animated frame-by-frame into a GIF.

Download .R ↓

Selected Answers on Stack Exchange

What is a contrast matrix (in an analysis with categorical predictors)? Cross Validated Hitting times for Brownian Motion Mathematics How to define a rejection region? Cross Validated Why does a sufficient statistic contain all the information needed to compute any estimate of the parameter? Cross Validated If rank(A)=k, can we say something about rank(AAᵀ)? Mathematics R package for motion-capture data analysis and visualisation Stack Overflow Transposing time series (mutate with lags) with dplyr Stack Overflow