Skip to content

Visualising Data

Overview

The ggplot block creates charts using R's ggplot2 library. It provides a visual interface for the grammar of graphics: map data columns to aesthetics (x, y, color, size), choose a chart type, and blockr renders the plot in real time.

Chart types

blockr supports a wide range of ggplot2 geometries:

TypeBest for
Scatter plotRelationships between two continuous variables
Bar chartComparing categories or showing distributions
Line chartTrends over time or ordered data
Box plotDistribution spread and outliers by group
Violin plotDetailed distribution shape by group
HistogramFrequency distribution of a single variable
Density plotSmoothed distribution curves
Area chartCumulative trends, stacked compositions
Pie / DonutPart-of-whole comparisons

Customization

Beyond the basic chart, the video covers:

  • Color and fill: map categorical or continuous columns to color
  • Faceting: split a chart into panels by one or two variables using facet wrap or facet grid
  • Themes: change the overall look (minimal, classic, dark, etc.)
  • Grid composition: arrange multiple plots side by side

Next steps

Developed by cynkra and BMS