Chart troubleshooting: grouped beeswarm or packed circles on linear axis

Hello,

I am trying to create 2 charts from the same information. I'll include my masked dataset below, but basically it contains three variables: year; a categorical variable with 3 discrete values; a categorical variable with 17 discrete values; and a numerical variable. None of them are unique.

The charts I would like to re-create are:

  1. A beeswarm chart with year as the x-axis variable, where size = total_awards, color = award_type, and the values are office_character

  2. A similar chart, grouped by award_type

I am able to import my data and achieve both of these using RawGraphs 2.0 fairly easily:

but I cannot recreate the gravitation effect of the circles using the beeswarm package without the circles overlapping.

I have also attempted to use a modified version of packedcircles from this thread to achieve this, but only received an error message that the xmin and xmax values were the same for the award_type variable.

I need to add a tooltip so that the values are displayed when hovering over each circle...otherwise I would have settled for the static RawGraph 2.0 outputs by now. Any advice on how to proceed is appreciated!

--

              year  = c(2005, 2006, 2006, 2007, 2007, 2007, 2008, 2008, 2008, 2009, 2009, 2009, 2009, 2009, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2011, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2013, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014, 2014),
              
              office_character = c("Michael Scott”, “Michael Scott”, “Jan Levinson”, “Michael Scott”, “Toby Flenderson”, “Jan Levinson”,  “Pam Beesly", "Michael Scott”, “Kelly Kapoor”, “Jim Halpert”, “Pam Beesly”, “Michael Scott”, “Kelly Kapoor”,  “Dwight Schrute”, “Jim Halpert”, “Pam Beesly”, “Erin Hannon”, “Andy Bernard”, “Angela Martin”, “Darryl Philbin”,  “Michael Scott”, “Kelly Kapoor”, “Dwight Schrute”, “Stanley Hudson”, “Jim Halpert”, “Pam Beesly”, “Erin Hannon”,  “Andy Bernard”, “Angela Martin”, “Darryl Philbin”, “Michael Scott”, “Kelly Kapoor”, “Dwight Schrute”, “Stanley Hudson”,  “Jim Halpert”, “Pam Beesly”, “Kevin Malone”, “Erin Hannon”, “Andy Bernard”, “Angela Martin”, “Darryl Philbin”, “Michael Scott”, “Creed Bratton”, “Kelly Kapoor”, “Dwight Schrute”, “Toby Flenderson”, “Meredith Palmer”,  “Phyllis Lapin-Vance”, “Stanley Hudson”, “Jim Halpert”, “Pam Beesly”, “Kevin Malone”, “Erin Hannon”, “Angela Martin”, “Darryl Philbin”, “Michael Scott”, “Creed Bratton”, “Kelly Kapoor”, “Dwight Schrute”, “Toby Flenderson”, “Meredith Palmer”,  “Phyllis Lapin-Vance”, “Oscar Martinez”, “Stanley Hudson”, “Jim Halpert”, “Pam Beesly”, “Kevin Malone”, “Erin Hannon”, “Angela Martin”, “Darryl Philbin”, “Michael Scott”, “Creed Bratton"),
              
              award_type = c("Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”,  “Oscar”, “Oscar”, “Tony”, “Tony”, “Tony”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Tony”, “Oscar”, “Oscar”, “Tony”, “Tony”, “Tony”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Tony”, “Tony”, “Oscar”, “Oscar”, “Oscar”,  “Oscar”, “Oscar”, “Tony”, “Tony”, “Tony”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Oscar”, “Tony”, “Oscar”, “Tony”, “Oscar”, “Oscar”, “Oscar”, “Tony”, “Oscar”, “Tony”, “Oscar”, “Oscar”, “Emmy”, “Emmy”, “Oscar”, “Oscar”, “Tony”, “Oscar”, “Tony”, “Oscar”, “Emmy”, “Emmy”, “Tony”, “Oscar”, “Oscar”, “Oscar"),
              
              total_awards = c(1, 2, 1, 3, 1, 2, 1, 4, 1, 1, 2, 5, 2, 1, 2, 3, 1, 1, 1, 1, 6, 3, 2, 1, 3, 4, 2, 2, 2, 2, 7, 4, 3, 2, 4, 5, 1, 3, 3, 3, 3, 8, 1, 5, 4, 2, 1, 1, 3, 5, 6, 2, 4, 4, 4, 9, 2, 6, 5, 3, 2, 2, 1, 4, 6, 7, 3, 5, 5, 5, 10, 3, 7, 6, 4, 3, 2, 5)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.