---

title: "OGPO Insurance Scoring Dataset"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{OGPO Insurance Scoring Dataset}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
-------------------------

## Overview

The OGPO Insurance Scoring Dataset is designed for insurance risk scoring and fair pricing analysis of compulsory motor third-party liability insurance policies.

The dataset can be used for:

* claim probability modelling;
* risk scoring;
* premium adjustment analysis;
* loss ratio analysis;
* customer retention analysis;
* validation of insurance scoring models.

The full datasets are stored externally in GitHub Releases and are downloaded only when the user explicitly calls the corresponding loading functions.

## Available loading functions

The package provides the following helper functions:

```{r, eval=FALSE}
library(AFR)

ogpo_train <- load_ogpo_train()
ogpo_test_with_target <- load_ogpo_test_with_target()
ogpo_test_final <- load_ogpo_test_final()
data_dictionary <- load_ogpo_data_dictionary()
```

## Training dataset

```{r, eval=FALSE}
ogpo_train <- load_ogpo_train()

dim(ogpo_train)
head(ogpo_train)
```

## Test dataset with target

```{r, eval=FALSE}
ogpo_test_with_target <- load_ogpo_test_with_target()

dim(ogpo_test_with_target)
head(ogpo_test_with_target)
```

## Final scoring dataset

```{r, eval=FALSE}
ogpo_test_final <- load_ogpo_test_final()

dim(ogpo_test_final)
head(ogpo_test_final)
```

## Data dictionary

The data dictionary is included directly in the package.

```{r, eval=FALSE}
data_dictionary <- load_ogpo_data_dictionary()

head(data_dictionary)
```

## Local cache

Downloaded OGPO files are cached locally and reused in subsequent calls.

The default cache directory is:

```{r, eval=FALSE}
~/.afr/ogpo_insurance_scoring/
```

## CRAN note

The large OGPO datasets are not included directly in the CRAN package. They are downloaded only on explicit user request and are not downloaded during package installation, package loading, CRAN checks or vignette building.
