Description Usage Arguments Note: Please cite as: Author(s) References Examples
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).
1 |
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 |
No horizontal line will be drawn if any of the arguments line.col
, line.lty
or line.lwd
are set to NULL
.
Hlavac, Marek (2019). parade: Pen's Income Parades in R.
R package version 0.1. https://CRAN.R-project.org/package=parade
Marek Hlavac < mhlavac at alumni.princeton.edu >
Research Fellow, Central European Labour Studies Institute (CELSI), Bratislava, Slovakia
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.
1 2 3 4 5 6 7 8 | # 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.