Member Login Join Now
SSA Vic & Tas Branch and MelbURN - R Users of Melbourne Network Meetup are holding a joint event: Reusing ‘ggplot2’ Code: How to Design Better Plot Helper Functions.
Wrapping ‘ggplot2’ code into plot helper functions is a common way to make multiple versions of a custom plot without copying and pasting the same code over and over again. Helper functions can replace long and complex ‘ggplot2’ code chunks with just a single function call. However, if that single function is not designed carefully, the initial convenience can often turn into frustration. While helper functions can reduce the amount of code needed to remake a complicated plot, they often mask the underlying layered grammar of graphics, complicating further customisation and tweaking of the plot. This talk addresses how to design effective ‘ggplot2’ plot helper functions that maximise reuse convenience whilst preserving access to the elegant flexibility of layered plot composition. By studying existing ‘ggplot2’ extensions for producing calendar plots, we identify a number of common pitfalls, including overly specific function arguments and hidden data manipulations. Then, propose a strategy for avoiding these pitfalls and retain the benefits of ‘ggplot2’ by: separating data preparation from plotting, utilising list arguments for customisation, and providing transparent documentation. We illustrate these strategies using examples from the design of the ‘ggtilecal’ package, which provides helper functions for plotting calendars using the geom_tile() geometry from ggplot2.
Agenda:
6:00-6:45 - Networking over pizza and tea/coffee
6:45-7:00 - Welcome and talk introductions
7:00-7:30 - Seminar/Talk
Please RSVP on the MelbURN Meetup Website for catering purposes. If you have special dietary needs, we recommend you BYO as what will be provided will only be of standard and vegetarian options.
https://www.meetup.com/melburn-melbourne-users-of-r-network/events/309238396/?utm_medium=referral&utm_campaign=share-btn_savedevents_share_modal&utm_source=link&utm_version=v2
This event is an opportunity to meet with members of the Melbourne Users of R Network Meetup over pizza and a shared interest in the programming lanugage R. During the seminar you will learn useful techniques for making your plotting code both reusable and flexible.
Bio: Cynthia Huang, Research Fellow in the Department of Econometrics and Business Statistics at Monash University
Cynthia Huang completed her undergraduate and honours degrees in Economics at the University of Melbourne. Cynthia is passionate about the interdisciplinary work of solving complex problems and the importance of trustworthy and accessible data science. Her research focuses on principles and tools for working with complex data in the social sciences.
Statistical Society of Australia (SSA) PO Box 213 Belconnen ACT 2616 Australia 02 6251 3647www.statsoc.org.auABN 82 853 491 081
Please direct enquiries to:
the SSA Team via email at
contact@statsoc.org.au
© 2019 Statistical Society of Australia (SSA). All Rights Reserved. | member login
Website by Converge Design