Create powerful dataviz with R

Ilya Kashnitsky

8 November 2019

code for the workshop https://bit.ly/prc20dv

before we start

https://twitter.com/RuJEconomics/status/1191697644499984384

rule 0 – DO VISUALIZE YOUR DATA

Anscombe’s Quartet

http://i.imgur.com/QA3Ss8D.png

https://i.imgur.com/Ym0oKHj.png

https://i.imgur.com/T7xz3UN.png

https://i.imgur.com/MxUNZxV.png

rule 1 – text should be horizontal

http://www.b-eye-network.com/view/2468

http://demographer.com/dsitl/08-cleveland-dot-plots/

https://ikashnitsky.github.io/2019/dotplot/

Plots don’t have to be overly complicated to be powerful

https://fivethirtyeight.com/features/why-the-oldest-person-in-the-world-keeps-dying/

time for some coding

we are going to improve this figure

https://doi.org/10/ggbtpx

rule 2 – on slides, text should be as large as possible

https://i.imgur.com/u1nCiJt.jpg

https://i.imgur.com/bYePASN.jpg

https://i.imgur.com/nvNEc2F.jpg

https://i.imgur.com/KpBVKP1.png

rule 3 – mind colors, especially regarding colorblind friendliness

https://www.toptal.com/designers/colorfilter?orig_uri=https://infographic.statista.com/normal/chartoftheday_13680_the_legal_status_of_abortion_worldwide_n.jpg&process_type=protan

rule 4 – highlight what’s important for the story

https://barcanumbers.wordpress.com/2018/12/06/who-are-the-best-finishers-in-contemporary-football/

(not a rule) suggestion

When possible and meaningful for you story – animate

https://www.ft.com/video/83703ffe-cd5c-4591-9b4f-a3c087aa6d19

On pipes

ggplot2 resources

http://docs.ggplot2.org/current

http://www.ggplot2-exts.org/gallery/

https://pkg.garrickadenbuie.com/gentle-ggplot2/#1

https://emitanaka.org/workshopUTokyo2018/day1-session02-datavis.html#1

https://www.r-graph-gallery.com/cartogram.html

https://github.com/dreamRs/esquisse