Teaching Materials

Downloadable exercises, templates, and solutions

Download Course Materials

All course materials are packaged together for easy download. The package includes exercise templates, solutions, sample datasets, and reference guides.

NoteπŸ“¦ Download Complete Package

Download Course Materials (ZIP)

This package contains: - Exercise templates for all 5 modules - Complete solutions with working code - Sample tax administration datasets - Quick reference guides


What’s Inside

Exercise Files

Each module includes two files:

  • Template file (exercise_XX_template.R) - Guided exercises with # TODO: instructions
  • Solution file (exercise_XX_solution.R) - Complete working code

Module 1: Introduction to R
Variables, data types, basic operations, R environment

Module 2: Data Import & Export
Reading CSV/Excel files, using data.table::fread(), exporting results

Module 3: Data Wrangling
Filtering, selecting, mutating, summarizing with dplyr

Module 4: Reshaping & Joins
Pivoting data, combining datasets with joins

Module 5: Data Visualization
Creating charts and plots with ggplot2


Sample Datasets

All exercises use realistic tax administration data:

  • panel_vat.csv - VAT declaration panel data
  • taxpayer_registry.csv - Taxpayer information
  • payment_data.csv - Tax payment records

Data files use synthetic data based on real patterns from tax administrations.


Getting Started

1. Install Required Packages

Before starting the exercises, install these packages:

# Install core packages
install.packages(c(
  "data.table",
  "dplyr",
  "tidyr",
  "ggplot2",
  "readr",
  "readxl",
  "writexl"
))

2. Download and Extract Materials

  1. Click the download link above

  2. Extract the ZIP file to a folder on your computer

  3. Open RStudio

  4. Set your working directory to the extracted folder:

    setwd("path/to/course_materials")

3. Start with Module 1

Open exercise_01_template.R and follow the instructions.


How to Use the Materials

TipWorking with Exercises

Template files provide: - Step-by-step instructions in comments - # TODO: markers showing where to write code - Partial code to guide you

Solution files show: - Complete working code - Best practices and style - Expected output (as comments)

Workflow: 1. Open the template file 2. Read the instructions 3. Write your code following the # TODO: prompts 4. Run and test your code 5. Check the solution if stuck


File Organization

The course_materials folder is organized as follows:

course_materials/
β”œβ”€β”€ exercises/
β”‚   β”œβ”€β”€ module_01/
β”‚   β”‚   β”œβ”€β”€ exercise_01_template.R
β”‚   β”‚   └── exercise_01_solution.R
β”‚   β”œβ”€β”€ module_02/
β”‚   β”‚   β”œβ”€β”€ exercise_02_template.R
β”‚   β”‚   └── exercise_02_solution.R
β”‚   β”œβ”€β”€ module_03/
β”‚   β”œβ”€β”€ module_04/
β”‚   └── module_05/
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ panel_vat.csv
β”‚   β”œβ”€β”€ taxpayer_registry.csv
β”‚   └── payment_data.csv
└── reference/
    └── cheatsheets/

All file paths are relative, so exercises will work regardless of where you extract the folder.


Alternative: Clone from GitHub

For advanced users who want to stay updated:

git clone https://github.com/rdoino-wb/datax_r.git
cd datax_r/course_materials

This allows you to pull updates as new materials are added.


Need Help?

  • Technical issues: Report on GitHub
  • Questions about exercises: Review the solution files or post in RStudio Community
  • Missing materials: Re-download the ZIP file for the latest version

Course materials updated regularly | Last generated: 2025-10-17

Back to top