Plot a simple conversion funnel in ggplot

Viewed 7945

I have a simple dataframe that looks like this:

df
   steps  numbers     rate
 1 clicks 332835  100.000000
 2 signup  157697  47.379933
 3  cart   29866   8.973215
 4  buys   17012   5.111241

How can I plot a simple conversion funnel instead of a barchart?

2 Answers

Alternatively, you can do a simple funnel in highcharts. My dataframe looks like this:

# data is a df called check_stage
check_stage

# A tibble: 9 × 4
  stage_name               count x     percent
  <ord>                    <int> <chr>   <dbl>
1 Opportunity Disqualified   805 1        13.5
2 Qualifying                5138 2        86.5
3 Evaluation                1773 3        29.8
4 Meeting Scheduled         4104 4        69.1
5 Quoted                    4976 5        83.7
6 Order Submitted           1673 6        28.2
7 Closed Won                1413 7        23.8
8 Closed Lost                957 8        16.1
9 Nurture                   1222 9        20.6

library(highcharter)

# make a funnel plot of stage
options(highcharter.theme = hc_theme_smpl(tooltip = list(valueDecimals = 1,
                                                         pointFormat = "{point.y}%")))


hc <- check_stage %>%
  hchart(
    "funnel", hcaes(x = stage_name, y = percent), name = "Proportion of Leads")

hc

enter image description here

Related