powered by
Function to create the balloon plot for gender first name
balloon_plot(data_df, gender_var, cutoff)
data frame containing `first name` and `gender` columns from assign_gender
assign_gender
gender possible values are F for female, M for male and U for unknown
numerical value indicating where to cut the counting data
The output is a gg object from ggplot2 which shows the most frequent names as a balloon plot.
# NOT RUN { gender <- assign_gender(authors, "first_name") bp <- balloon_plot(gender, "M", cutoff = 5) # }
Run the code above in your browser using DataLab