Menu

Lollipop Chart

In this tutorial, we’ll demonstrate how to draw a Lollipop Chart in Glimpse to visualize the retirement age in 2012 and proposed future retirement age across 18 OECD countries. This is a redrawing of the chart shown on The Washington Post article Retirement getting further away.

Below is the data you will need for this tutorial:

Country Retirement Age 2012 Future Retirement Age
Malta 61  
Slovakia 62  
France 62  
Cyprus 63  
Estonia 63 65
Slovenia 63 65
Austria 65  
Belgium 65  
Finland 65  
Germany 65 67
Greece 65 67
Italy 65 69
Luxembourg 65  
Netherlands 65  
Portugal 65  
Ireland 66 68
Spain 67  
United States 66 67

Data source: Government pension agencies, Organization for Economic Cooperation and Development


First, import this data into Glimpse (copy, then in Glimpse on the top menu go Data > Add Source > Clipboard). These field tokens will appear:

image1


Change the mark type to Rule and then move the fields Retirement Age 2012 into X and Country into Y.

image2


The lines need thickening up. So go Viz > Mark > Stroke. There, change the Stroke color to black and the Width to 2.5 pt.

image3


To add the ‘lollipop’ ends, activate Point Overlay (under Viz > Mark). Then, go Point Overlay > Size and in Size type 15 pt.

image4


Next, go Point Overlay > Color and set the Fill color to R197, G64, B45 (#C5402D) and tick Fill Marks.

After, go Point Overlay > Stroke and set the color to white and the Width to 2 pt.

image5


Create a new layer by going (on top menu) Layer > Add Layer > Rule and then go Layer > Send Backward.

image6


Move the fields Future Retirement Age into X and Country into Y.

image7


Go Viz > Mark > Stroke, set the color to black, the Width to 2 pt and under Dash select a dash line pattern.

image8


Activate Point Overlay (under Viz > Mark) and in Point Overlay > Size set it to 15 pt.

In Point Overlay > Color, set the Fill to R 237, G 178, B 157 (#EDB29D) and tick Fill Marks.

After, go Point Overlay > Stroke and set the color to white and the Width to 2 pt.

image9


Time to adjust the x-axis. Press a field in the encoding X and go Viz > Encoding > Title and enter “Government retirement age”. After, go Viz > Encoding > Scale > Domain and untick Include Zero, then in Value press + and select Number and type in 60. Press + again and type in 70.

image10


To fix the number of decimal places, go Viz > Encoding > Axis > Labels > Formatting and select Number in Format As. After, in the Formatting options, set the Precision to 2.

image11


To fix the repeating value labels on the x-axis, go Viz > Encoding > Axis > Ticks > Distribution and set the Count to 8. After, deactivate Ticks and Baseline.

To move the axis to the top of the chart, go Viz > Encoding > Axis > Layout > Placement and set the Orient to Top.

image12


Then, in Viz > Encoding > Axis > Title set the Anchor to the left position.

image13


Select the Country field in Y and under Viz > Encoding deactivate Title, and under Viz > Encoding > Axis deactivate Baseline and Ticks.

image14


To remove the light grey line around the gridlines, go Doc > Info > Viewport and set the Width to 0 pt.

image15


This concludes this tutorial on drawing a Lollipop Chart. If you want to further customize your chart, please read the documentation.