R for Actuaries 2026

Reproducible Analysis, Visualization,
and AI-Assisted Learning

27 August 2026 · Federica Gazzelloni

Before Modelling

You receive policy and claims data.

Before modelling anything, can you trust the data?

Today we use R to answer that question step by step.

Course Principle

Write code that another actuary can understand, reproduce, and trust.

One-Day Learning Path

Welcome

Orientation

Session 1

Data checks

5-minute pause

Session 2

Analyse

5-minute pause

Session 3

Visualise and report

Practical

Mini-project

Reproducible Actuarial Workflow

Raw data

Validation

Analysis

Visualisation

Quarto report

GitHub publication

The workflow is part of the actuarial deliverable.

Practical Mini-Project

Sample policy data table

One case study

Policies
Claims
Validation
Actuarial measures
Charts and report

R Setup And Project Structure

r-for-actuaries-2026/

data/ -> raw/ and processed/

case-study/ -> mini-project notebook

sessions/ -> course pages

slides/ -> teaching deck

Open the R Project first. Work from the project root.

Session 1

01

From raw data to checked data

Data Import

library(readr)

p <- read_csv("data/raw/policies.csv")
c <- read_csv("data/raw/claims.csv")

glimpse(p)

Start by making the data visible.

Data Validation

Validation summary table

Missing values · Duplicates · Dates · Policy IDs · Numeric ranges

Discussion

What would you check before calculating claim frequency?

Inspect the data · Talk to the person next to you · Name one risk

5-Minute Pause

5

minute pause

Stretch, reset, and keep the project open.

Session 2

02

From checked data to actuarial insight

Join Policies And Claims

portfolio <- c |>
  left_join(p, by = "policy_id") |>
  count(product, claim_type)

Policies

Claims

Portfolio view

Core Actuarial Measures

Frequency

claims / exposure

Severity

claim cost / claims

Pure premium

claim cost / exposure

Loss ratio

claim cost / premium

Portfolio Summary

Earned premium by product chart

Use summaries to understand portfolio shape before interpretation.

Loss Ratio View

Loss ratio by product chart

Which product would you investigate first?

5-Minute Pause

5

minute pause

Next: make the analysis communicable.

Session 3

03

From analysis to communication

Visualisation Answers Questions

Claim frequency by risk band chart

Charts should answer actuarial questions, not decorate reports.

Quarto Reporting

Code

Text

Tables

Figures

Render the mini-project notebook into a report another actuary can review.

AI-Assisted Learning

Try

Ask

Run

Check

Rewrite

AI is a tutor, reviewer, and debugging partner, not an autopilot.

Practical Session

Import data

Validate checks

Create measures

Produce plots

Render report

Thank You!

Write code that another actuary can understand, reproduce, and trust.

Back to course materials