.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated_examples\solvency2\plot_scr_radar.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_generated_examples_solvency2_plot_scr_radar.py: solvency2: Life SCR radar chart ===================================== This script draws radar charts for selected policies. Each spoke of the radar chart represents a sub risk of SCR life risks, and the sizes of the sub risks by duration are drawn in the radar chart. .. seealso:: * The :mod:`~solvency2` library .. GENERATED FROM PYTHON SOURCE LINES 12-36 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /generated_examples/solvency2/images/sphx_glr_plot_scr_radar_001.png :alt: Policy ID: 41 :srcset: /generated_examples/solvency2/images/sphx_glr_plot_scr_radar_001.png :class: sphx-glr-multi-img * .. image-sg:: /generated_examples/solvency2/images/sphx_glr_plot_scr_radar_002.png :alt: Policy ID: 171 :srcset: /generated_examples/solvency2/images/sphx_glr_plot_scr_radar_002.png :class: sphx-glr-multi-img .. code-block:: default import modelx as mx import pandas as pd from draw_charts_radar import draw_radar model = mx.read_model("model") scr = model.SCR_life risks = ('mort', 'longev', 'disab', 'exps', 'lapse') scenid = 1 def draw(polid): data = {} for t in range(0, 20, 5): data['t=' + str(t)] = scr[t, polid, scenid].Life.to_series(risks) draw_radar(pd.DataFrame(data), ax_title='Policy ID: ' + str(polid), fig_title='SCR Life Risks') for i in (41, 171): draw(i) .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 2.291 seconds) .. _sphx_glr_download_generated_examples_solvency2_plot_scr_radar.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_scr_radar.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_scr_radar.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_