Skip to main content

Risk plot generator

Project description

pipeline status

Risk plot generator (rpg)

This tool takes a CSV or YAML file with your observations and can output either a grid plot, or a donut ring. It also accepts a CSV or YAML file with recommendations to output a recommendations grid.


I was fed-up with having to manually create these graphs for a client and I wanted to make my life easier. And since I want to increase my Python skills some more, this would be a fun little project to catch two birds with one stone.


  1. argparse (dev-python/argparse);
  2. matplotlib (dev-python/matplotlib);
  3. python (dev-lang/python).


Using Pip:

pip install --user rpg-0bs1d1an


python install


You can use sr2t in two ways:

  • When installed as package, call the installed script: rpg --help.
  • When Git cloned, call the package directly from the root of the Git repository: python -m rpg --help
$ rpg -h
usage: rpg [-h] (-iC INPUT_CSV_FILE | -iY INPUT_YAML_FILE) (-g | -d | -r)
           [-oP OUTPUT_PNG_FILE] [--axis-labels AXIS_LABELS]
           [--axis-arrows AXIS_ARROWS] [--legend LEGEND]

Converting scanning reports to a tabular format

optional arguments:
  -h, --help            show this help message and exit
  -iC INPUT_CSV_FILE, --input-csv-file INPUT_CSV_FILE
                        specify an input CSV file (e.g. observations.csv).
  -iY INPUT_YAML_FILE, --input-yaml-file INPUT_YAML_FILE
                        specify an input YAML file (e.g. observations.yml).
  -g, --grid            generate a risk grid plot.
  -d, --donut           generate a risk donut.
  -r, --recommendations
                        generate a risk recommendations plot.
  -oP OUTPUT_PNG_FILE, --output-png-file OUTPUT_PNG_FILE
                        specify an output PNG file (e.g. risk.png).
  --axis-labels         specify to print the axis labels
  --axis-arrows         specify to print arrows along the axis


A few examples

Risk grid plot

To generate a risk grid plot: $ rpg -iC example/input/observations.csv -oP example/output/grid.png -g

Or if you prefer YAML: $ rpg -iY example/input/observations.yaml -oP example/output/grid.png -g


Risk donut

To generate a risk donut: $ rpg -iC example/input/observations.csv -oP example/output/donut.png -d

Or if you prefer YAML: $ rpg -iY example/input/observations.yaml -oP example/output/donut.png -d


Risk recommendations

To generate a recommendations plot: $ rpg -iC example/input/recommendations.csv -oP example/output/recommendations.png -r

Or if you prefer YAML: $ rpg -iY example/input/recommendations.yaml -oP example/output/recommendations.png -r


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rpg-0bs1d1an, version 0.0.10
Filename, size File type Python version Upload date Hashes
Filename, size rpg-0bs1d1an-0.0.10.tar.gz (331.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page