2 min read

How to Visualize Entertainment Expenditures on a Bubble Chart


Bubble Chart Categorical Variables Expenditures Analytics

I’ve been recently asked to analyze some Board entertainment expenditures in order to acquire sufficient assurance about their nature and responsible.

In response to that request I have developed a little Shiny app with an interesting reactive Bubble chart.

The plot, made using ggplot2 package, is composed by: a categorical x value, represented by the clusters identified in the expenditures population A numerical y value, representing the total amount expended Points defined by the total amount of expenditure in the given cluster for each company subject. Morover, point size is given by the ratio between amount regularly passed through Account Receivable Process and total amount of expenditure for that subject in that cluster.

The advantage i found in developing such a plot is the possibility to get a lot of information at a glance.

Reactivity is given by two sliders that let you decide the period and the range you want to analyze.

Full code (with italian comments, sorry about that) is given on GitHub, but let me underline some details:

Labels are made pasting subjects names and the amount show, in order to give you both information at once.

Colours are automatically assigned by ggplot function simply by specifying


Point size is simply obtained by putting size=rapporto

Hope you will find at least colorful the job. Going on talking about colours: does anyone knows how to make point solid in this case?

Any feedback will be appreciated, but please be kind!

comments disclaimer
thank you for taking the time to comment. If the comment you are about to write is related to a piece of code I wrote, please reach its Github respository and place there any request of improvement or report of bugs.