knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Workflow functions for tidying up claims data from the General Insurance Statistical Agency (GISA) of Canada.
remotes::install_github("kasaai/gisadata")
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.