├── .gitattributes ├── 01-intro.Rmd ├── 99-references.Rmd ├── .gitignore ├── _bookdown.yml ├── preamble.tex ├── DESCRIPTION ├── .travis.yml ├── style.css ├── _build.sh ├── 04-vis-foundations.Rmd ├── book.bib ├── 06-discrete.Rmd ├── uncertainty-vis-book.Rproj ├── README.md ├── 09-maps-glyphs.Rmd ├── 08-multiple.Rmd ├── _deploy.sh ├── _output.yml ├── 03-uncertainty.Rmd ├── 07-continuous.Rmd ├── 05-strategies.Rmd ├── 02-why-hard.Rmd ├── index.Rmd ├── 98-scratch.Rmd ├── toc.css └── packages.bib /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | -------------------------------------------------------------------------------- /01-intro.Rmd: -------------------------------------------------------------------------------- 1 | # Introduction {#ch-intro} 2 | 3 | TBD 4 | -------------------------------------------------------------------------------- /99-references.Rmd: -------------------------------------------------------------------------------- 1 | `r if (knitr:::is_html_output()) ' 2 | # References {-} 3 | '` 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | _publish.R 5 | _book 6 | _bookdown_files 7 | rsconnect 8 | *~ 9 | -------------------------------------------------------------------------------- /_bookdown.yml: -------------------------------------------------------------------------------- 1 | book_filename: "uncertainty-visualization" 2 | language: 3 | ui: 4 | chapter_name: "Chapter " 5 | delete_merged_file: true 6 | -------------------------------------------------------------------------------- /preamble.tex: -------------------------------------------------------------------------------- 1 | \usepackage{booktabs} 2 | \usepackage{amsthm} 3 | \makeatletter 4 | \def\thm@space@setup{% 5 | \thm@preskip=8pt plus 2pt minus 4pt 6 | \thm@postskip=\thm@preskip 7 | } 8 | \makeatother 9 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: placeholder 2 | Type: Book 3 | Title: Uncertainty Visualization 4 | Version: 0.0.1 5 | Imports: 6 | bookdown, 7 | tidyverse, 8 | modelr, 9 | broom, 10 | ggstance 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: r 2 | cache: packages 3 | pandoc_version: 2.0.6 4 | 5 | before_script: 6 | - chmod +x ./_build.sh 7 | - chmod +x ./_deploy.sh 8 | 9 | script: 10 | - ./_build.sh 11 | - ./_deploy.sh 12 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | p.caption { 2 | color: #777; 3 | margin-top: 10px; 4 | } 5 | p code { 6 | white-space: inherit; 7 | } 8 | pre { 9 | word-break: normal; 10 | word-wrap: normal; 11 | } 12 | pre code { 13 | white-space: inherit; 14 | } 15 | -------------------------------------------------------------------------------- /_build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -ev 4 | 5 | Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::gitbook')" 6 | Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::pdf_book')" 7 | Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::epub_book')" 8 | 9 | -------------------------------------------------------------------------------- /04-vis-foundations.Rmd: -------------------------------------------------------------------------------- 1 | # Foundations: Uncertainty and the grammar of graphics {#ch-vis-foundations} 2 | 3 | - basic strategies for applying uncertainty visualization within the grammar of graphics 4 | - visual channels, marks, etc. (and mapping onto ggplot) 5 | - simple prediction grid example 6 | -------------------------------------------------------------------------------- /book.bib: -------------------------------------------------------------------------------- 1 | @Book{xie2015, 2 | title = {Dynamic Documents with {R} and knitr}, 3 | author = {Yihui Xie}, 4 | publisher = {Chapman and Hall/CRC}, 5 | address = {Boca Raton, Florida}, 6 | year = {2015}, 7 | edition = {2nd}, 8 | note = {ISBN 978-1498716963}, 9 | url = {http://yihui.name/knitr/}, 10 | } 11 | -------------------------------------------------------------------------------- /06-discrete.Rmd: -------------------------------------------------------------------------------- 1 | # Discrete data {#ch-discrete} 2 | 3 | - categorical 4 | - proportions 5 | - product plots / mosaic plots 6 | - icon arrays 7 | - unit visualizations 8 | - HOPs-like stuff 9 | - entropy-based approaches 10 | - ordinal / integer 11 | - proportions 12 | - histograms 13 | - CDFs 14 | - dotplots 15 | - ... 16 | -------------------------------------------------------------------------------- /uncertainty-vis-book.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: knitr 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | 18 | BuildType: Website 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repository contains the source of a book on uncertainty visualization. 2 | 3 | The compiled version of the book can be found [here](https://mjskay.github.io/uncertainty-vis-book/). 4 | 5 | It is written using [bookdown](https://github.com/rstudio/bookdown). Please see [Get Started](https://bookdown.org/yihui/bookdown/get-started.html) bookdown page for information on how to edit and compile this book. 6 | -------------------------------------------------------------------------------- /09-maps-glyphs.Rmd: -------------------------------------------------------------------------------- 1 | # Maps and glyphs {#ch-maps-glyphs} 2 | 3 | *Not sure this is a separate chapter but putting this here for now...* 4 | 5 | - always remember to ask if you need a map in the first place 6 | - uncertainty glyphs 7 | - blur, and problems with it 8 | - problems with glyphs more generally 9 | - bivariate maps 10 | - VSUPs 11 | - connect back to LLO and/or regularization (I think LLO...) 12 | - pixelation 13 | - HOPs 14 | -------------------------------------------------------------------------------- /08-multiple.Rmd: -------------------------------------------------------------------------------- 1 | # Dealing with multiple uncertainties {#ch-multiple} 2 | 3 | - a note on comparisons 4 | - univariate marginals might bite you... 5 | - aleatory / epistemic (or data space / parameter space) 6 | - frankenplots maybe (product plots / mosaic plots / unit visualizations) 7 | - animation 8 | - NYT needle 9 | - Galton boards 10 | - mixing discrete and continuous 11 | - color with densities 12 | - HOPs 13 | - some hurricane stuff 14 | -------------------------------------------------------------------------------- /_deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | [ -z "${GITHUB_PAT}" ] && exit 0 6 | [ "${TRAVIS_BRANCH}" != "master" ] && exit 0 7 | 8 | git config --global user.email "matthew.kay@gmail.com" 9 | git config --global user.name "Matthew Kay" 10 | 11 | git clone -b gh-pages https://${GITHUB_PAT}@github.com/${TRAVIS_REPO_SLUG}.git book-output 12 | cd book-output 13 | rm -f *.html *.md 14 | cp -r ../_book/* ./ 15 | git add --all * 16 | git commit -m"Update the book" || true 17 | git push -q origin gh-pages 18 | -------------------------------------------------------------------------------- /_output.yml: -------------------------------------------------------------------------------- 1 | bookdown::gitbook: 2 | css: style.css 3 | config: 4 | toc: 5 | before: | 6 |
  • Uncertainty Visualization
  • 7 | after: | 8 |
  • Published with bookdown
  • 9 | edit: https://github.com/mjskay/uncertainty-vis-book/edit/master/%s 10 | download: ["pdf", "epub"] 11 | bookdown::pdf_book: 12 | includes: 13 | in_header: preamble.tex 14 | latex_engine: xelatex 15 | citation_package: natbib 16 | keep_tex: yes 17 | bookdown::epub_book: default 18 | -------------------------------------------------------------------------------- /03-uncertainty.Rmd: -------------------------------------------------------------------------------- 1 | # Foundations: Uncertainty as we'll see it {#ch-uncertainty} 2 | 3 | - primarily Bayesian perspective 4 | - unifies aleatory and epistemic 5 | - gives us one framework to work in 6 | - simplifies building things 7 | - simplifies communicating things (see e.g. confidence fallacy) 8 | - will still occasionally touch on frequentist, usually as a subsection at the end of each chapter: 9 | - tips on how to translate the visualization techniques presented into that mode 10 | - at times, visualizations unique to the frequentist approach that might be useful 11 | -------------------------------------------------------------------------------- /07-continuous.Rmd: -------------------------------------------------------------------------------- 1 | # Continuous data {#ch-continuous} 2 | 3 | *not sure of the organization here, especially within multivariate...* 4 | 5 | - univariate 6 | - densities, gradients 7 | - CDFs 8 | - intervals 9 | - quantile dotplots 10 | - HOPs 11 | - multivariate 12 | - the joint case 13 | - gradients 14 | - contour plots 15 | - the conditional case 16 | - gradients 17 | - bands 18 | - generalizing quantile dotplots to multiple dimensions: representative sampling approaches 19 | - scatterplots 20 | - spaghetti plots 21 | - HOPs 22 | 23 | - frequentist addendum 24 | - interpreting in a Bayesian mode: advantages and pitfalls (and what it reveals) 25 | - *this maybe goes elsewhere* 26 | - those double-sided p value plot things 27 | -------------------------------------------------------------------------------- /05-strategies.Rmd: -------------------------------------------------------------------------------- 1 | # Foundations: General strategies {#ch-strategies} 2 | 3 | *Dunno if this goes before or after all the specific examples* 4 | 5 | - think about task 6 | - what do people actually need from the representation to do the task? densities? intervals? (arbitrary or known in advance?) point estimates? 7 | - employ frequency framing where possible 8 | - *(maybe a table here translating common non-frequency representations into frequency representations)* 9 | - quantile dotplots 10 | - representative sampling in scatterplots (need a better name for this) 11 | - spaghettis 12 | - pixelated maps (also needs a name) 13 | - use animation / HOPs 14 | - anticipate deterministic construal errors 15 | - think about task context, common elements of that context with plausibly similar abstract representations 16 | - when animating / using metaphor, think about the mechanism - do we think of it as random? 17 | -------------------------------------------------------------------------------- /02-why-hard.Rmd: -------------------------------------------------------------------------------- 1 | # Why uncertainty visualization is hard {#ch-why-hard} 2 | 3 | - Efficient encodings for uncertainty can be hard to find 4 | - try putting mean, variance, and interval estimation in one plot + doing this when useful channels are already used up 5 | - Even if you get the encoding right have to contend with making sure people understand it 6 | - explain a CDF to someone (N.B.: sometimes this works! task has an effect here) 7 | - Even if people understand have to deal with how people perceive uncertainty 8 | - linear-in-log-odds and other perceptual models of probability 9 | - Even if people correctly perceive the uncertainty have to deal with how people make decisions under uncertainty 10 | - Even if you solve all these problems in one context a new context may cause your solution to break 11 | - see e.g. deterministic construal errors 12 | - Plus, you still have to build the damn thing 13 | - But some strategies for building uncertainty vis using the grammar of graphics helps a lot here (the **how** of this book) 14 | -------------------------------------------------------------------------------- /index.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Uncertainty Visualization" 3 | author: "Matthew Kay" 4 | date: "`r Sys.Date()`" 5 | site: bookdown::bookdown_site 6 | output: bookdown::gitbook 7 | documentclass: book 8 | bibliography: [book.bib, packages.bib] 9 | biblio-style: apalike 10 | link-citations: yes 11 | github-repo: mjskay/uncertainty-vis-book 12 | description: "The How and Why of Uncertainty Visualization" 13 | --- 14 | 15 | ```{r include=FALSE} 16 | # automatically create a bib database for R packages 17 | knitr::write_bib(c( 18 | .packages(), 'bookdown', 'knitr', 'rmarkdown', 'ggplot2' 19 | ), 'packages.bib') 20 | ``` 21 | 22 | # Preface {-} 23 | 24 | This book^[or what it will be---it is a work in progress] aims to provide the *why* and the *how* of uncertainty visualization. The *why* is based on what we currently know about how people interpret and make decisions from uncertainty visualizations, and the *how* is structured around generating uncertainty visualizations using the R programming language and the grammar of graphics.^[as implemented in the *ggplot2* package [@R-ggplot2]] 25 | 26 | -------------------------------------------------------------------------------- /98-scratch.Rmd: -------------------------------------------------------------------------------- 1 | # Scratch space {-} 2 | 3 | ```{r message=FALSE, results='hide'} 4 | library(tidyverse) 5 | library(modelr) 6 | library(broom) 7 | library(ggstance) 8 | ``` 9 | 10 | ```{r} 11 | set.seed(12345) 12 | x = rnorm(10, -0.25) 13 | ci_color = "#d95f02" 14 | 15 | intervals = data_frame( 16 | # conf.level = seq(.7, .99, by = .01), 17 | conf.level = c(.50, .80, .95), 18 | alpha = 1 - conf.level, 19 | test = map(conf.level, ~ tidy(t.test(x, conf.level = ..1))) 20 | ) %>% 21 | unnest() 22 | 23 | crossing( 24 | null = seq(-6, 6, length.out = 1001) 25 | ) %>% 26 | mutate(test = map(null, ~ tidy(t.test(x, mu = ..1)))) %>% 27 | unnest() %>% 28 | ggplot() + 29 | geom_line(aes(x = null, y = p.value)) + 30 | geom_hline(aes(yintercept = alpha), color = "gray50", data = intervals, linetype = "dotted") + 31 | geom_rect(aes(xmin = conf.low, xmax = conf.high, ymax = alpha), ymin = -1, fill = ci_color, alpha = .1, 32 | data = intervals, color = NA, size = .75) + 33 | geom_pointrangeh(aes(xmin = conf.low, xmax = conf.high, x = estimate, y = alpha), 34 | data = intervals, color = ci_color, size = .75) + 35 | geom_vline(aes(xintercept = estimate), data = intervals, color = ci_color, linetype = "dotted") + 36 | geom_text(aes(y = alpha, label = paste0("p value = ", format(alpha, digits = 2, nsmall = 2))), 37 | x = -5.3, vjust = -.5, hjust = 0, data = intervals, color = "gray50") + 38 | geom_text(aes(y = alpha, label = paste0("1 - ", format(alpha, digits = 2, nsmall = 2), " = ", round((1 - alpha) * 100), "% CI")), 39 | x = 0.33, vjust = -.5, color = ci_color, hjust = 0, data = intervals) + 40 | theme_light() + 41 | theme(panel.grid = element_blank()) + 42 | xlab("two-sided null hypothesis") + 43 | ylab("p value") + 44 | coord_cartesian(xlim = c(-5, 5)) 45 | ``` 46 | 47 | -------------------------------------------------------------------------------- /toc.css: -------------------------------------------------------------------------------- 1 | #TOC ul, 2 | #TOC li, 3 | #TOC span, 4 | #TOC a { 5 | margin: 0; 6 | padding: 0; 7 | position: relative; 8 | } 9 | #TOC { 10 | line-height: 1; 11 | border-radius: 5px 5px 0 0; 12 | background: #141414; 13 | background: linear-gradient(to bottom, #333333 0%, #141414 100%); 14 | border-bottom: 2px solid #0fa1e0; 15 | width: auto; 16 | } 17 | #TOC:after, 18 | #TOC ul:after { 19 | content: ''; 20 | display: block; 21 | clear: both; 22 | } 23 | #TOC a { 24 | background: #141414; 25 | background: linear-gradient(to bottom, #333333 0%, #141414 100%); 26 | color: #ffffff; 27 | display: block; 28 | padding: 19px 20px; 29 | text-decoration: none; 30 | text-shadow: none; 31 | } 32 | #TOC ul { 33 | list-style: none; 34 | } 35 | #TOC > ul > li { 36 | display: inline-block; 37 | float: left; 38 | margin: 0; 39 | } 40 | #TOC > ul > li > a { 41 | color: #ffffff; 42 | } 43 | #TOC > ul > li:hover:after { 44 | content: ''; 45 | display: block; 46 | width: 0; 47 | height: 0; 48 | position: absolute; 49 | left: 50%; 50 | bottom: 0; 51 | border-left: 10px solid transparent; 52 | border-right: 10px solid transparent; 53 | border-bottom: 10px solid #0fa1e0; 54 | margin-left: -10px; 55 | } 56 | #TOC > ul > li:first-child > a { 57 | border-radius: 5px 0 0 0; 58 | } 59 | #TOC.align-right > ul > li:first-child > a, 60 | #TOC.align-center > ul > li:first-child > a { 61 | border-radius: 0; 62 | } 63 | #TOC.align-right > ul > li:last-child > a { 64 | border-radius: 0 5px 0 0; 65 | } 66 | #TOC > ul > li.active > a, 67 | #TOC > ul > li:hover > a { 68 | color: #ffffff; 69 | box-shadow: inset 0 0 3px #000000; 70 | background: #070707; 71 | background: linear-gradient(to bottom, #262626 0%, #070707 100%); 72 | } 73 | #TOC .has-sub { 74 | z-index: 1; 75 | } 76 | #TOC .has-sub:hover > ul { 77 | display: block; 78 | } 79 | #TOC .has-sub ul { 80 | display: none; 81 | position: absolute; 82 | width: 200px; 83 | top: 100%; 84 | left: 0; 85 | } 86 | #TOC .has-sub ul li a { 87 | background: #0fa1e0; 88 | border-bottom: 1px dotted #31b7f1; 89 | filter: none; 90 | display: block; 91 | line-height: 120%; 92 | padding: 10px; 93 | color: #ffffff; 94 | } 95 | #TOC .has-sub ul li:hover a { 96 | background: #0c7fb0; 97 | } 98 | #TOC ul ul li:hover > a { 99 | color: #ffffff; 100 | } 101 | #TOC .has-sub .has-sub:hover > ul { 102 | display: block; 103 | } 104 | #TOC .has-sub .has-sub ul { 105 | display: none; 106 | position: absolute; 107 | left: 100%; 108 | top: 0; 109 | } 110 | #TOC .has-sub .has-sub ul li a { 111 | background: #0c7fb0; 112 | border-bottom: 1px dotted #31b7f1; 113 | } 114 | #TOC .has-sub .has-sub ul li a:hover { 115 | background: #0a6d98; 116 | } 117 | #TOC ul ul li.last > a, 118 | #TOC ul ul li:last-child > a, 119 | #TOC ul ul ul li.last > a, 120 | #TOC ul ul ul li:last-child > a, 121 | #TOC .has-sub ul li:last-child > a, 122 | #TOC .has-sub ul li.last > a { 123 | border-bottom: 0; 124 | } 125 | #TOC ul { 126 | font-size: 1.2rem; 127 | } 128 | -------------------------------------------------------------------------------- /packages.bib: -------------------------------------------------------------------------------- 1 | @Manual{R-base, 2 | title = {R: A Language and Environment for Statistical Computing}, 3 | author = {{R Core Team}}, 4 | organization = {R Foundation for Statistical Computing}, 5 | address = {Vienna, Austria}, 6 | year = {2018}, 7 | url = {https://www.R-project.org/}, 8 | } 9 | @Manual{R-bindrcpp, 10 | title = {bindrcpp: An 'Rcpp' Interface to Active Bindings}, 11 | author = {Kirill Müller}, 12 | year = {2018}, 13 | note = {R package version 0.2.2}, 14 | url = {https://CRAN.R-project.org/package=bindrcpp}, 15 | } 16 | @Manual{R-bookdown, 17 | title = {bookdown: Authoring Books and Technical Documents with R Markdown}, 18 | author = {Yihui Xie}, 19 | year = {2018}, 20 | note = {R package version 0.7}, 21 | url = {https://CRAN.R-project.org/package=bookdown}, 22 | } 23 | @Manual{R-broom, 24 | title = {broom: Convert Statistical Analysis Objects into Tidy Tibbles}, 25 | author = {David Robinson and Alex Hayes}, 26 | year = {2018}, 27 | note = {R package version 0.5.0}, 28 | url = {https://CRAN.R-project.org/package=broom}, 29 | } 30 | @Manual{R-dplyr, 31 | title = {dplyr: A Grammar of Data Manipulation}, 32 | author = {Hadley Wickham and Romain François and Lionel Henry and Kirill Müller}, 33 | year = {2018}, 34 | note = {R package version 0.7.6}, 35 | url = {https://CRAN.R-project.org/package=dplyr}, 36 | } 37 | @Manual{R-forcats, 38 | title = {forcats: Tools for Working with Categorical Variables (Factors)}, 39 | author = {Hadley Wickham}, 40 | year = {2018}, 41 | note = {R package version 0.3.0}, 42 | url = {https://CRAN.R-project.org/package=forcats}, 43 | } 44 | @Manual{R-ggplot2, 45 | title = {ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics}, 46 | author = {Hadley Wickham and Winston Chang and Lionel Henry and Thomas Lin Pedersen and Kohske Takahashi and Claus Wilke and Kara Woo}, 47 | year = {2018}, 48 | note = {R package version 3.0.0}, 49 | url = {https://CRAN.R-project.org/package=ggplot2}, 50 | } 51 | @Manual{R-ggstance, 52 | title = {ggstance: Horizontal 'ggplot2' Components}, 53 | author = {Lionel Henry and Hadley Wickham and Winston Chang}, 54 | year = {2018}, 55 | note = {R package version 0.3.1}, 56 | url = {https://CRAN.R-project.org/package=ggstance}, 57 | } 58 | @Manual{R-knitr, 59 | title = {knitr: A General-Purpose Package for Dynamic Report Generation in R}, 60 | author = {Yihui Xie}, 61 | year = {2018}, 62 | note = {R package version 1.20}, 63 | url = {https://CRAN.R-project.org/package=knitr}, 64 | } 65 | @Manual{R-modelr, 66 | title = {modelr: Modelling Functions that Work with the Pipe}, 67 | author = {Hadley Wickham}, 68 | year = {2018}, 69 | note = {R package version 0.1.2}, 70 | url = {https://CRAN.R-project.org/package=modelr}, 71 | } 72 | @Manual{R-purrr, 73 | title = {purrr: Functional Programming Tools}, 74 | author = {Lionel Henry and Hadley Wickham}, 75 | year = {2018}, 76 | note = {R package version 0.2.5}, 77 | url = {https://CRAN.R-project.org/package=purrr}, 78 | } 79 | @Manual{R-readr, 80 | title = {readr: Read Rectangular Text Data}, 81 | author = {Hadley Wickham and Jim Hester and Romain Francois}, 82 | year = {2017}, 83 | note = {R package version 1.1.1}, 84 | url = {https://CRAN.R-project.org/package=readr}, 85 | } 86 | @Manual{R-rmarkdown, 87 | title = {rmarkdown: Dynamic Documents for R}, 88 | author = {JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang}, 89 | year = {2018}, 90 | note = {R package version 1.10}, 91 | url = {https://CRAN.R-project.org/package=rmarkdown}, 92 | } 93 | @Manual{R-stringr, 94 | title = {stringr: Simple, Consistent Wrappers for Common String Operations}, 95 | author = {Hadley Wickham}, 96 | year = {2018}, 97 | note = {R package version 1.3.1}, 98 | url = {https://CRAN.R-project.org/package=stringr}, 99 | } 100 | @Manual{R-tibble, 101 | title = {tibble: Simple Data Frames}, 102 | author = {Kirill Müller and Hadley Wickham}, 103 | year = {2018}, 104 | note = {R package version 1.4.2}, 105 | url = {https://CRAN.R-project.org/package=tibble}, 106 | } 107 | @Manual{R-tidyr, 108 | title = {tidyr: Easily Tidy Data with 'spread()' and 'gather()' Functions}, 109 | author = {Hadley Wickham and Lionel Henry}, 110 | year = {2018}, 111 | note = {R package version 0.8.1}, 112 | url = {https://CRAN.R-project.org/package=tidyr}, 113 | } 114 | @Manual{R-tidyverse, 115 | title = {tidyverse: Easily Install and Load the 'Tidyverse'}, 116 | author = {Hadley Wickham}, 117 | year = {2017}, 118 | note = {R package version 1.2.1}, 119 | url = {https://CRAN.R-project.org/package=tidyverse}, 120 | } 121 | --------------------------------------------------------------------------------