stat_sii_risksurface: stat_sii_risksurface

Description Usage Arguments Value

Description

returns a 'ggplot2' object with filled, concentric circle(part)s, defined by the values of a hierarchy of levels.

Usage

1
2
3
4
5
6
7
stat_sii_risksurface(mapping = NULL, data = NULL,
  geom = "sii_risksurface", position = "identity",
  show.legend = TRUE, inherit.aes = TRUE, na.rm = FALSE,
  levelmax = 99, structure = ggsolvencyii::sii_structure_sf16_eng,
  maxscrvalue = NULL, aggregatesuffix = "_other", scalingx = 1,
  scalingy = 1, rotationdegrees = NULL, rotationdescription = NULL,
  squared = FALSE, plotdetails = NULL, ...)

Arguments

mapping

required aes(thetics) : x (i.e. time, longitude), y (i.e SCR ratio, lattitude), id, description (), value

data

the dataset in tidyverse format (column 'description' as a factor). see examples in sii_z_ex2_data or sii_z_ex3_data

geom

the default is geom_sii_risksurface

position

standard ggplot function

show.legend

standard ggplot function

inherit.aes

standard ggplot function

na.rm

standard ggplot function

levelmax

(integer or dataframe, default = 99)
a positive integer or a dataframe with columns 'level' and 'levelmax'.
The maximum amount of items in a certain level to be plotted. The smallest items are combined to one item. In the case level consisting of 7 items has a levelmax of 5 this results in 4 separate items and one grouped item.
For a less detailed plot sii_levelmax_sf16_995 and sii_levelmax_sf16_993 are present in the package where the components of market, life, non-life, health are combined in 5 or 3 items.

structure

(dataframe: default = sii_structure_sf16_eng)
A representation of the buildup from individual risks to the SCR. columns are

  1. description (chr),

  2. level (chr),

  3. childlevel (chr)

. In the standard formula structure, SCR has level 1, with childlevel 2. This means it consists of all datalines with level == 2, ie. "BSCR", "operational" and "Adjustment-LACDT". lines in the dataset with a suffix "d" behind the levelnumber are diversification items. As of now these are not used in any calculation. the values in column "description" in the dataset need to match the description in this file. The package contains also a file sii_structure_sf16_nld with Dutch terms in description column.

maxscrvalue

(optional, double, default = NULL)
the scale of the different plot elements is is by default measured to the largest level 1 element (i.e. SCR) in the dataset, this can be overridden by this parameter for example when combining several plots

aggregatesuffix

(string, default = "_other")
When a certain level contains more items than specified by levelmax the smallest items are combined. The description is of the name of the one higher level (lower number) with a suffix

scalingx

(optional, positive value ,default = 1)
for plots where units in x and y are different in magnitude distortion can occur. This parameter scales only in x-direction

scalingy

(optional, positive value ,default = 1)
for plots where units in x and y are different in magnitude distortion can occur. This parameter scales only in y-direction

rotationdegrees

(optional, integer, -360 to 360, default = NULL)
when given, the fixed amount of degrees (positive is clockwise) of which each item is rotated (as in a compass, -90 is a quarter rotation anti-clockwise), additive to possible rotation to description

rotationdescription

(optional, string, default = NULL)
default the orientation of the lower level (higher number) circles is based on the structure. When this parameter is not NULL then the circles are rotated in such a way that the indicated item lies in the "north-east" part of the circle.

squared

(optional, boolean, default = FALSE)
when set to TRUE plot returns a square representation. Compared with a circle representation of the same data the height and width of the square are smaller than the radius of the circle. Segments which fall in the corner parts of the square are smaller than equally sized part which fall in the vertical or horizontal parts of the square.

plotdetails

(optional) a table with columns 'levelordescription' and 'surface', indicating which circle elements to plot. When no table is provided all segments are plotted. example 3 shows how to combine geom_sii_risksurface and geom_sii_riskoutline by using using table sii_z_ex3_plotdetails. geom_sii_riskoutline uses other columns in the same table

...

ellipsis, a standard R parameter

Value

a ggplot object


ggsolvencyii documentation built on May 1, 2019, 7:54 p.m.