Trying visdat

I found a link to the vis_dat package on CRAN. In my ongoing learning journey in and with R, I am fascinated by the resources that are shared openly … in this case by Nicholas Tierney (link).

vis_dat “helps you visualise a dataframe and “get a look at the data” by displaying the variable classes in a dataframe as a plot with vis_dat, and getting a brief look into missing data patterns using vis_miss.”

I tried it with a csv file of data from the 2019 Asian Cup football tournament. The data include cards given by referees for fouls and other behaviours (including dissent). vis_dat confirmed that the data that are incomplete are for a red card and a second yellow card. Not all cards are red cards or second yellow cards. In my data set I use NA to indicate if a card has NOT been awarded.

An example of the first card given at the tournament:

My data are available as a Google Sheet (link).

The image at the start of this post was produced with vis_dat. I used vis_miss() to visualise the missing data. The function “allows for missingness to be clustered and columns rearranged”.

I am delighted I found this package. I enjoyed reading Nicholas’s thank yous. This underscored for me what a remarkable community nourishes innovation in R.

Thank you to Ivan Hanigan who first commented this suggestion after I made a blog post about an initial prototype ggplot_missing, and Jenny Bryan, whose tweet got me thinking about vis_dat, and for her code contributions that removed a lot of errors.
Thank you to Hadley Wickham for suggesting the use of the internals of readr to make vis_guess work. Thank you to Miles McBain for his suggestions on how to improve vis_guess. This resulted in making it at least 2-3 times faster. Thanks to Carson Sievert for writing the code that combined plotly with visdat, and for Noam Ross for suggesting this in the first place. Thank you also to Earo Wang and Stuart Lee for their help in getting capturing expressions in vis_expect.
Finally thank you to rOpenSci and it’s amazing onboarding process, this process has made visdat a much better package, thanks to the editor Noam Ross (@noamross), and the reviewers Sean Hughes (@seaaan) and Mara Averick (@batpigandme).

LEAVE A REPLY

Please enter your comment!
Please enter your name here