parade {parade} | R Documentation |
Pen's Income Parades
Description
parade
produces Pen's parade graphs, useful for visualizing inequalities in income, wages or other variables. They were first proposed by Jan Pen in his well-known story of the "parade of dwarfs and a few giants" (Pen, 1971). In this story, income is captured by the vertical axis, while the population is arranged in ascending order of income ("height") along the horizontal axis. As such, Pen's income parades provide an easy-to-interpret visualization of economic inequalities (Cowell, 2000).
Usage
parade(height, line.fun = NULL, line.col = "red", line.lty = 1, line.lwd = 2, ...)
Arguments
height |
a vector of numerical values (e.g., incomes, wages) describing the vertical bars which make up the plot. |
line.fun |
a function whose result, when applied to the data in |
line.col |
a specification for the horizontal line color. This can be a character string giving the color name (e.g., "blue"). Colors can also be specified in terms of their RGB components with a string of the form "#RRGGBB", in which RR, GG and BB correspond to two hexadecimal digits. |
line.lty |
the horizontal line type. It can be specified as an integer (0=blank, 1=solid (default), 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash) or as one of the character strings |
line.lwd |
the horizontal line widths (a positive number). |
... |
additional (e.g., graphical) arguments that will be passed on to the |
Note:
No horizontal line will be drawn if any of the arguments line.col
, line.lty
or line.lwd
are set to NULL
.
Please cite as:
Hlavac, Marek (2019). parade: Pen's Income Parades in R.
R package version 0.1. https://CRAN.R-project.org/package=parade
Author(s)
Marek Hlavac < mhlavac at alumni.princeton.edu >
Research Fellow, Central European Labour Studies Institute (CELSI), Bratislava, Slovakia
References
Cowell, Frank A. (2000). Measurement of Inequality. In: Atkinson, Anthony B. and Francois Bourguignon, Handbook of Income Distribution. North Holland, 87-166.
Pen, Jan. (1971). Income Distribution. Harmondsworth: Allen Lane.
Examples
# load data set of Hispanic workers in Chicago
data("chicago")
# generate real wages from their logged versions
chicago$real.wage <- exp(chicago$ln.real.wage)
# simple Pen's parade with a blue, dashed, thin horizontal line at the mean
parade(chicago$real.wage, line.col = "blue", line.lwd = 1, line.lty = "dashed")