LogisticalBudget icon indicating copy to clipboard operation
LogisticalBudget copied to clipboard

Create Treemap visualisation

Open blackswanburst opened this issue 7 years ago • 4 comments

Create a module using plotly to allow us to visualise treemap style graphs, for logistical budgets. An example graph is here: https://coin360.io/

However, for our purposes we might want to visualise say network components over file components, or using the actor module, time over money for a given threat actor. So keep the treemap code flexible, and usable for 3 dimensions of visualisations.

Stick to the output conventions of png, html, etc as in heamps module.

blackswanburst avatar May 25 '18 08:05 blackswanburst

The best way to approach this would probably be to add a module, say treemaps.py, which would sit alongside heatmaps.py and scorecards.py. Then the main program, generate.py, could then be modified to add processing of command-line arguments which would trigger and control treemap generation. Then development can proceed on the treemaps without collision with changes to heatmaps.py or scorecards.py.

Within treemaps.py, we might have a function that iterates over events in a similar manner to heatmaps.py or scorecards.py, like the code here:

https://github.com/Concinnity-Risks/LogisticalBudget/blob/33aee14f1fee316dfb5d441182253f46f1ae58f7/scorecards.py#L149

Then this loop can pull out our desired statistics. We probably want to parameterise the function so that the caller can choose which statistics to look at. Once all of the events have been scanned through, we can look at generating a visualisation.

I am not seeing anything jumping out in terms of gnuplot supporting treemaps, but I shall have a look for suitable alternatives.

StrayLightning avatar Jun 18 '18 14:06 StrayLightning

I just discovered that plotly supports treemaps: https://plot.ly/python/treemaps/

StrayLightning avatar Jul 01 '18 10:07 StrayLightning

Thanks @StrayLightning. I just pushed my original code to a branch called "erin." I'll try what you suggested and update the branch this weekend. That plotly tutorial was what I was following when I first tried creating the treemap.

erinburns avatar Jul 04 '18 12:07 erinburns

I'll have a look at this too, and thank you two for getting it started.

blackswanburst avatar Aug 02 '18 04:08 blackswanburst