Thus, 2 types of input format work to build it:
In any case, a lollipop is built using
the circle, and
geom_segment() for the stem.
The code works pretty much the same way, but it is important to note that the X axis can represent a categorical variable as well. In this case, the lollipop chart is a good replacement of the barplot.
The lollipop chart is one of my favourite. There is so much to do with
it and it is under-utilized in favor of barplot. Visit the
dedicated section for more examples
to learn about the available variations and caveats to avoid.