Introduction to Datascience

with R

Aurélien Ginolhac

University of Luxembourg

Wednesday, the 28th of October, 2026

Hello!

What you can do before Feb 27:

  • Check for material at the main site

https://basv53.uni.lu

  • Install R, RStudio and packages

setup

Check your install

library(tidyverse)
read_csv("https://biostat2.uni.lu/practicals/data/swiss.csv",
         show_col_types = FALSE) |>
  filter_out(Fertility > 80) |>
  pivot_longer(cols = c(Fertility, Agriculture),
               names_to = "measurement", 
               values_to = "value") |>
  ggplot(aes(x = value, y = Education, colour = measurement)) +
  geom_point() +
  geom_smooth(method = "loess", formula = "y ~ x", alpha = 0.2) +
  theme_bw(14)

Overview

This course provides an introduction to and the tidyverse, one of its dialect.

  • Brief computer history, programming and hardware notions
  • Biology track: data analysis is mandatory
  • Focusing on loading and cleaning data for exploratory visualizations

Lectures

  • Slides, formal lecture
  • Quick exercises inserted
  • Unprepared live demo

Practicals

  • Detailed exercises
  • Solutions hidden/revealed

Projects

  • Individual work
  • Due date: June
  • Oral exam
  • No slides to prepare: Quarto HTML

Data Science, not a computer science course

  • Computer parts
  • Programming basics, exemplified in
    • Data types
    • Data structures
    • Sub-setting
    • Control flow for and if
  • Data wrangling
    • Import data
    • Manipulating
    • Visualizing
  • Literate programming
    • Quarto

Literate programming, separate content from formatting

HTML

PDF

Live Demo: French first names over 125 years

Dataset baby names in France over 120 years (data from the French statistic institute INSEE

https://www.insee.fr/fr/statistiques/8595130

Flat file

First lines of the 724,645 lines :

sexe;prenom;periode;valeur;rang
1;GABRIEL;2025;4625;1
1;NOAH;2025;3465;2
1;LÉO;2025;3420;3
1;RAPHAËL;2025;3285;4
1;LOUIS;2025;3260;5
1;JULES;2025;3040;6
1;ARTHUR;2025;2875;7
1;LÉON;2025;2835;8
1;ADAM;2025;2810;9
[...]

Dataset loaded in R

prenoms
# A tibble: 724,645 × 5
    sexe prenom  periode valeur  rang
   <dbl> <chr>     <dbl>  <dbl> <dbl>
 1     1 GABRIEL    2025   4625     1
 2     1 NOAH       2025   3465     2
 3     1 LÉO        2025   3420     3
 4     1 RAPHAËL    2025   3285     4
 5     1 LOUIS      2025   3260     5
 6     1 JULES      2025   3040     6
 7     1 ARTHUR     2025   2875     7
 8     1 LÉON       2025   2835     8
 9     1 ADAM       2025   2810     9
10     1 MAËL       2025   2700    10
# ℹ 724,635 more rows
# ℹ Use `print(n = ...)` to see more rows

Data analysis

Questions?

  • Number of babies born per year
  • Births per month across recent years
  • Ratio Male / Female
  • Evolution of your first names
  • Dynamic of novelty
  • Novelty versus Saints
  • Double gender first names
  • Most popular first names per decade
  • …