-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path41_chart_types.Rmd
367 lines (144 loc) · 14.4 KB
/
41_chart_types.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# Chart types {#charttypes}
## Chart types: theory and methods
Naomi Robbins (2013), _Creating More Effective Graphs_, Chart House.
## Bar charts (and their variants)
Andy Kirk (2019-07-19) [Five Ways To...Present Bar Charts](https://www.visualisingdata.com/2019/07/five-ways-to-present-bar-charts/) -- first in a series of "Five Ways To..."
* Thomas Mock: [{ggplot2} code for the article](https://gist.github.com/jthomasmock/2db9db2c534a48af9e2330758be90b8b)
## Box plots (a way to visualize distributions)
R package [`boxplot`](https://stat.ethz.ch/R-manual/R-devel/library/graphics/html/boxplot.html)
Laura DeCicco, 2018-08-10, [Exploring ggplot2 boxplots - Defining limits and adjusting style](https://web.archive.org/web/20230623161729/https://waterdata.usgs.gov/blog/boxplots/) (via The Wayback Machine at web.archive.org)
Ron Pearson, 2011-01-29, [Boxplots and Beyond – Part I](https://www.r-bloggers.com/boxplots-and-beyond-part-i/) (first in a multi-part series on various distribution plots)
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">More papers should use this plot type!! <a href="https://t.co/iEglulaMyM">pic.twitter.com/iEglulaMyM</a></p>— Johanna Rickne (/@/johannarickne) <a href="https://twitter.com/johannarickne/status/1028174230146478080?ref_src=twsrc%5Etfw">August 11, 2018</a></blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
## Bump plot
A line chart that shows changes in ranking over time (not the absolute value).
* [{ggbump}](https://github.com/davidsjoberg/ggbump) -- "A geom for {ggplot} to create bump plots"
* Kaiser Fung, 2019-04-16, [The Bumps come to the NBA, courtesy of 538](https://junkcharts.typepad.com/junk_charts/2019/04/the-bumps-come-to-the-nba-courtesy-of-538.html) -- some good examples of bump charts, with links to other examples.
## Density plot
* Jodie Burchell, 2016-03-16, [Creating plots in R using ggplot2 - part 8: density plots](http://t-redactyl.io/blog/2016/03/creating-plots-in-r-using-ggplot2-part-8-density-plots.html)
#### within `{ggplot2}`
[Smoothed density estimates](https://ggplot2.tidyverse.org/reference/geom_density.html)
* "Computes and draws kernel density estimate, which is a smoothed version of the histogram. This is a useful alternative to the histogram for continuous data that comes from an underlying smooth distribution."
## Dot plot (Cleveland dot plot, lollipop plot)
* UC Business Analytics R Programming Guide, [Cleveland Dot Plots](https://uc-r.github.io/cleveland-dot-plots)
* Nina Zumel (2013-02-18) [Revisiting Cleveland’s The Elements of Graphing Data in ggplot2](http://www.win-vector.com/blog/2013/02/revisiting-clevelands-the-elements-of-graphing-data-in-ggplot2/)
* [Datavis with R: Drawing a Cleveland dot plot with ggplot2](https://web.archive.org/web/20190907194822/http://www.joyce-robbins.com/blog/2016/06/02/datavis-with-rdrawing-a-cleveland-dot-plot-with-ggplot2/) (via The Wayback Machine at web.archive.org)
## Dynamite plots
A.K.A. bar and line graphs. Don't use them!
* Rafael Irizarry, 2019/02/21, ["Open letter to journal editors: dynamite plots must die"](https://simplystatistics.org/posts/2019-02-21-dynamite-plots-must-die/)
* GB Drummond and SL Vowler, 2011, ["Show the data, don't conceal them"](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3087125/), _British Journal of Pharmacology_, 2011 May; 163(2): 208–210.
## Eikosograms
> an eikosogram is a picture of probability. It visually partitions a unit square into rectangular regions whose areas give the numerical values of various probabilities. The construction is such that each rectangular region is identified with the value of one or more categorical variates.
> _R.W. Oldford_
* Wayne Oldford, Erle Holgersen, Ben Lafreniere, Tianlu Zhu (2018-08-22) [{eikosograms} CRAN page](https://CRAN.R-project.org/package=eikosograms)
## Flow visualizations
**1. Circle plots**
* a.k.a. [Circos plot](http://circos.ca/)
* David Smith, [Global Migration, animated with R](http://blog.revolutionanalytics.com/2018/06/global-migration-animated-with-r.html), 2018-06-29
**2. Sankey plots**
[Interactive flow visualization in R](http://personal.tcu.edu/kylewalker/interactive-flow-visualization-in-r.html); Kyle Walker, 2016-06-26
[How to Make a D3 Sankey diagram in R](http://emapr.ceoas.oregonstate.edu/pages/education/how_to/sankey_diagram/sankey_diagram_to_visualize_landcover_change.html)
## Genealogical data
#### `{ggeneology}`
* Lindsay Rutter, Susan VanderPlas, Dianne Cook, Michelle A. Graham (2019) ["ggenealogy: An R Package for Visualizing Genealogical Data"](https://www.jstatsoft.org/article/view/v089i13), _Journal of Statistical Software_, Vol 89 (13)
* CRAN page: [ggenealogy: Visualization Tools for Genealogical Data](https://cran.r-project.org/package=ggenealogy)
## Heatmaps
[The Heatmap function](https://www.r-graph-gallery.com/215-the-heatmap-function/) in the [R Graph Gallery](https://www.r-graph-gallery.com/)
Rebecca L. Barter & Bin Yu, 2017-01-30, ["Superheat: An R package for creating beautiful and extendable heatmaps for visualizing complext data"](https://arxiv.org/pdf/1512.01524.pdf)
[Heatmaps in R](https://plot.ly/r/heatmaps/), from [ploty](https://plot.ly/)
Mick Watson, 2015-04-05, [You probably don’t understand heatmaps](https://web.archive.org/web/20191207151904/http://www.opiniomics.org/you-probably-dont-understand-heatmaps/) (via The Wayback Machine at web.archive.org)
## Histograms
_see also [Mosaic (a.k.a. Marimekko) charts]_
[Variable width column charts](https://learnr.wordpress.com/2009/03/29/ggplot2_marimekko_mosaic_chart/) (in ggplot2)
Aran Lunzer and Amelia McNamara, [What's so hard about histograms?](http://tinlizzie.org/histograms/)
## Lexis diagrams
Tim RiffeEmail author, Jonas Schöley and Francisco Villavicencio (2017) ["A unified framework of demographic time"](http://genus.springeropen.com/articles/10.1186/s41118-017-0024-4), _Genus: Journal of Population Sciences_, 2017 73:7
## Mosaic (a.k.a. Marimekko) charts
_Mosaic plots are a variant of [Histograms]_
Haley Jeppson and Heike Hofmann (2018-09-12) [Mosaic plots with ggplot2](https://cran.r-project.org/web/packages/ggmosaic/vignettes/ggmosaic.html)
Hadley Wickham and Heike Hofmann, ["Product Plots"][@Wickham-Hofmann_2011]
[Mosaic or Marimekko charts](https://learnr.wordpress.com/2009/03/29/ggplot2_marimekko_mosaic_chart/) (in {ggplot2})
Perceptual Edge, [A Design Problem](https://www.perceptualedge.com/example13.php)
Alberto Cairo (2019-07-09) [A mosaic plot that exemplifies good design practices](http://www.thefunctionalart.com/2019/07/a-mosaic-plot-that-exemplifies-good.html)
## Network graphs
#### `{DiagramR}`
{DiagramR}: Graph and network visualization using tabular data in R
* [github repo](https://github.com/rich-iannone/DiagrammeR)
* CRAN page: [DiagrammeRsvg: Export DiagrammeR Graphviz Graphs as SVG](https://cran.r-project.org/package=DiagrammeRsvg)
[ggnet2: network visualization with ggplot2](https://briatte.github.io/ggnet/) -- part of the [`GGally`](https://www.rdocumentation.org/packages/GGally/versions/1.3.2) package
## Pie Charts
Over-used and often mis-used and poorly designed, the pie chart is frequently the subject of ridicule and scorn. But this format does have utility (if done well) and supporters.
Robert Kosara, 2016, "A Pair of Pie Chart Papers" [@Kosara_pair_of_pies_2016]
Robert Kosara, 2016, "An Illustrated Tour of the Pie Chart Study Results" [@Kosara_pie_2016]
Elizabeth Ricks, 2020, "What is a Pie Chart" [@Ricks_pie_2020]
## Population Pyramids
A common visualization in demography to show the age and gender distribution of a population.
Lauren Boucher (2016-03-10) [What are the different types of population pyramids?](https://www.populationeducation.org/content/what-are-different-types-population-pyramids)
### Examples
[Estimated U.S. Population Distribution, 1980 to 2050](https://www.reddit.com/r/dataisbeautiful/comments/73u5po/estimated_us_population_distribution_1980_to_2050/)
### R
[Population Pyramids for Select Canadian Provinces, 2015-2035](https://github.com/atheriel/visualizations/tree/master/provincial-demography)
* uses {ggplot2} to create pyramids
[Simpler population pyramid in ggplot2](https://stackoverflow.com/questions/14680075/simpler-population-pyramid-in-ggplot2)
** Kyle Walker's stuff **
Kyle Walker (2014-06-07) [Interactive international population pyramids with R, rCharts](https://www.r-bloggers.com/2014/06/interactive-international-population-pyramids-with-r-rcharts/)
Kyle Walker (2014-07-06) [International population pyramids with ggplot2](https://rpubs.com/walkerke/pyramids_ggplot2)
Kyle Walker (2015-04-07) [Animated population pyramid of India with rcdimple](https://rpubs.com/walkerke/india_pyramid)
Kyle Walker (2016-06-06) [idbr: access the US Census Bureau International Data Base in R](http://www.arilamstein.com/blog/2016/06/06/idbr-access-us-census-bureau-international-data-base-r/?utm_source=recurpost) (http://personal.tcu.edu/kylewalker/)
* Example: ["Japan's aging population in R "](http://urbandemographics.blogspot.ca/2016/03/japans-aging-population-in-r.html)
Arizona pyramids:
* [gist](https://gist.github.com/walkerke/47414a289ccf8eca2a5281cc09b41077)
Ilya Kashnitsky, 2017-03-31, ["Who is old? Visualizing the concept of prospective ageing with animated population pyramids"](https://ikashnitsky.github.io/2017/who-is-old/)
* ["Visualizing the concept of prospective aging with R"](http://urbandemographics.blogspot.ca/2017/05/visualizing-concept-of-prospective.html)
acarioli (2016-01-11) [Population pyramids in ggplot](https://aledemogr.wordpress.com/2016/01/11/population-pyramids-in-ggplot/)
## Raincloud plot
Micah Allen, Davide Poggiali, Kirstie Whitaker, Tom Rhys Marshall, Jordy van Langen, Rogier A. Kievit, 2021-01-21, ["Raincloud plots: a multi-platform tool for robust data visualization"](https://doi.org/10.12688/wellcomeopenres.15191.2), _Wellcome Open Res_ 2021, 4:63
[RainCloudPlots](https://github.com/RainCloudPlots/RainCloudPlots) -- "Code and tutorials to visualise your data that is both beautiful *and* statistically valid"
David Zhao, 2019-09-02, [The ultimate EDA visualization in R](https://towardsdatascience.com/the-ultimate-eda-visualization-in-r-e6aff6afe5c1)
## Ridgeline plot
**ridgeline plots in R**
#### `{ggridges}`
[{ggridges} package by Claus Wilke](https://cran.r-project.org/package=ggridges) -- CRAN page
Alex Whan, 2016-03-24, [ggplot2 and Joy Division](http://alexwhan.com/2016-03-24-joy-division-plot) - at Incrutable Errors
Mauricio Vargas S., 2016-11-08, [Joy Division’s Unknown PleasuRes](https://www.r-bloggers.com/joy-divisions-unknown-pleasures/) - at R-Bloggers
Henrik Lindberg, [Sports: Time of Day](https://github.com/halhen/viz-pub/tree/master/sports-time-of-day)
* [plot code](https://github.com/halhen/viz-pub/blob/master/sports-time-of-day/2_gen_chart.R)
**_Unknown Pleasures_**
The over of Joy Division's debut album [_Unknown Pleasures_](https://en.wikipedia.org/wiki/Unknown_Pleasures) (1979) is perhaps the most famous ridgeline plot.
* Jen Christiansen, 2015-02-18, [Pop Culture Pulsar: Origin Story of Joy Division’s Unknown Pleasures Album Cover](https://blogs.scientificamerican.com/sa-visual/pop-culture-pulsar-origin-story-of-joy-division-s-unknown-pleasures-album-cover-video/) - _Scientific American_, [SA Visual](https://blogs.scientificamerican.com/sa-visual/) -- a great piece that traces the Joy Division album cover image directly back to the PhD dissertation of Harold D. Craft, Jr.
- Adam Cap, 2011-05-19 - 2016-02-13, [The History of Joy Division’s “Unknown Pleasures” Album Art](https://adamcap.com/2011/05/19/history-of-joy-division-unknown-pleasures-album-art/)
- [Data Visualization, Reinterpreted by VISUALIZED](https://vimeo.com/51365288): Peter Saville on the Design + Effect of Joy Division's "Unknown Pleasures" - ([from Visualized](https://vimeo.com/visualized))
* Andrew B. Collier, 2019-07-15, [Recreating 'Unknown Pleasures' graphic](https://datawookie.dev/blog/2019/07/recreating-unknown-pleasures-graphic/) -- using {ggplot} and {gganimate}
## Slopegraphs
A common visualization to show relative change between two time periods across different categories.
### Theory and methods
Cole Nussbaumer Knaflic, 2015, _Storytelling with Data_, pp.47-49.
### R
Kyle Walker, 2015-05-17, [Global population change with a slopegraph in ggplot2](https://rpubs.com/walkerke/slopegraph)
#### `CGPfunctions`
["Using newggslopegraph"](https://cran.r-project.org/web/packages/CGPfunctions/vignettes/Using-newggslopegraph.html) -- CRAN vignette
#### `{slopegraph}`
[github](https://github.com/leeper/slopegraph)
## Ternary plots
#### `{ggtern}`
Nicholas Hamilton, [ggtern: An Extension to 'ggplot2', for the Creation of Ternary Diagrams](https://CRAN.R-project.org/package=ggtern ): CRAN page
## Violin plots
[wikipedia: Violin plot](https://en.wikipedia.org/wiki/Violin_plot)
* "It is similar to a box plot, with the addition of a rotated kernel density plot on each side."
#### within `{ggplot2}`
[`geom_violin`](https://ggplot2.tidyverse.org/reference/geom_violin.html)
* "A violin plot is a compact display of a continuous distribution. It is a blend of geom_boxplot() and geom_density(): a violin plot is a mirrored density plot displayed in the same way as a boxplot."
#### `{vioplot}`
**Package**
CRAN page: [vioplot: Violin Plot](https://cran.r-project.org/package=vioplot): "A violin plot is a combination of a box plot and a kernel density plot. This package allows extensive customisation of violin plots."
GitHub page: {vioplot}(https://github.com/TomKellyGenetics/vioplot): "This package allows extensive customisation of violin plots."
## Waffle plots
#### `{waffle}`
**Package**
CRAN page: [waffle: Create Waffle Chart Visualizations in R](https://cran.r-project.org/package=waffle)
GitHub page: [{waffle}: Make waffle (square pie) charts in R](https://github.com/hrbrmstr/waffle)
**articles**
[Infographic-style charts using the R waffle package](https://nsaunders.wordpress.com/2017/09/08/infographic-style-charts-using-the-r-waffle-package/amp/)
## Unit visualization
Antoine Béland and Thomas Hurtut (2020) [Unit Visualizations for Visual Storytelling](https://bpb-us-w2.wpmucdn.com/sites.northeastern.edu/dist/d/53/files/2020/02/CJ_2020_paper_37.pdf), 2020, research paper presented at the [2020 Computation + Journalism Symposium](https://cj2020.northeastern.edu/research-papers/) (2020-03-20 to 2020-03-21)
-30-