knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

gisadata

Travis build status Codecov test coverage

Workflow functions for tidying up claims data from the General Insurance Statistical Agency (GISA) of Canada.

Installation

remotes::install_github("kasaai/gisadata")

Example

Attach necessary packages:

library(gisadata)
library(tidyverse)
library(fs)

Suppose the data archives are in the gisa-data directory:

dir_ls("gisa-data")

We can extract the CSV files by calling gisa_unzip():

# By default, files are extracted to a temp directory
extract_dir <- gisa_unzip("gisa-data")
dir_ls(extract_dir)

Read and process tables:

data_auto <- extract_dir %>% 
  path("Auto Loss Development") %>% 
  gisa_process_auto_dev()

data_auto$`Loss development exhibit - Private Passenger - All Perils - AB` %>% 
  glimpse()

Contributing



kasaai/gisadata documentation built on March 22, 2021, 3:42 p.m.