class: middle, center, title-slide .title[ # Introduction ] .subtitle[ ## Data Visualization ] .author[ ### Johan Larsson ] .author[ ### Behnaz Pirzamanbein ] .institute[ ### The Department of Statistics, Lund University ] --- class: section-title # Why visualize? --- class: middle, center <img src="introduction_files/figure-html/unnamed-chunk-1-1.png" width="576" style="display: block; margin: auto;" /> .footnote[ <a name=cite-reinsel2018></a>[Reinsel, Gantz, and Rydning (2018)](#bib-reinsel2018) ] --- class: center, middle <div class="figure" style="text-align: center"> <img src="introduction_files/figure-html/unnamed-chunk-2-1.png" alt="Interest in data visualization as a fraction of the maximum interest recorderd (using Google Trends). The blue line represents a moving average." width="576" /> <p class="caption">Interest in data visualization as a fraction of the maximum interest recorderd (using Google Trends). The blue line represents a moving average.</p> </div> --- ## Visualization as communication * main goal is to **communicate** patterns in data * we are wired to learn from **seeing** -- <div class="figure" style="text-align: center"> <img src="images/napoleon.png" alt="Charles Minard's visualization of Napoleon's Russian campaign of 1812." width="853" height="30%" /> <p class="caption">Charles Minard's visualization of Napoleon's Russian campaign of 1812.</p> </div> --- class: center, middle .pull-left[ <table class="table" style="font-size: 13px; margin-left: auto; margin-right: auto;"> <thead> <tr> <th style="text-align:left;"> region </th> <th style="text-align:right;"> employment (%) </th> </tr> </thead> <tbody> <tr> <td style="text-align:left;"> Stockholms län </td> <td style="text-align:right;"> 72.7 </td> </tr> <tr> <td style="text-align:left;"> Hallands län </td> <td style="text-align:right;"> 72.1 </td> </tr> <tr> <td style="text-align:left;"> Jönköpings län </td> <td style="text-align:right;"> 70.9 </td> </tr> <tr> <td style="text-align:left;"> Västra Götalands län </td> <td style="text-align:right;"> 70.0 </td> </tr> <tr> <td style="text-align:left;"> Kronobergs län </td> <td style="text-align:right;"> 69.3 </td> </tr> <tr> <td style="text-align:left;"> Uppsala län </td> <td style="text-align:right;"> 68.4 </td> </tr> <tr> <td style="text-align:left;"> Gotlands län </td> <td style="text-align:right;"> 68.2 </td> </tr> <tr> <td style="text-align:left;"> Östergötlands län </td> <td style="text-align:right;"> 67.4 </td> </tr> <tr> <td style="text-align:left;"> Värmlands län </td> <td style="text-align:right;"> 67.1 </td> </tr> <tr> <td style="text-align:left;"> Jämtlands län </td> <td style="text-align:right;"> 66.2 </td> </tr> <tr> <td style="text-align:left;"> Örebro län </td> <td style="text-align:right;"> 66.0 </td> </tr> <tr> <td style="text-align:left;"> Västmanlands län </td> <td style="text-align:right;"> 65.7 </td> </tr> <tr> <td style="text-align:left;"> Gävleborgs län </td> <td style="text-align:right;"> 65.0 </td> </tr> <tr> <td style="text-align:left;"> Västerbottens län </td> <td style="text-align:right;"> 64.9 </td> </tr> <tr> <td style="text-align:left;"> Kalmar län </td> <td style="text-align:right;"> 64.9 </td> </tr> <tr> <td style="text-align:left;"> Skåne län </td> <td style="text-align:right;"> 64.8 </td> </tr> <tr> <td style="text-align:left;"> Dalarnas län </td> <td style="text-align:right;"> 64.7 </td> </tr> <tr> <td style="text-align:left;"> Västernorrlands län </td> <td style="text-align:right;"> 64.6 </td> </tr> <tr> <td style="text-align:left;"> Blekinge län </td> <td style="text-align:right;"> 63.9 </td> </tr> <tr> <td style="text-align:left;"> Norrbottens län </td> <td style="text-align:right;"> 62.9 </td> </tr> <tr> <td style="text-align:left;"> Södermanlands län </td> <td style="text-align:right;"> 62.8 </td> </tr> </tbody> </table> ] -- class: center, middle .pull-right[ <img src="introduction_files/figure-html/unnamed-chunk-5-1.png" width="324" style="display: block; margin: auto;" /> ] --- class: section-title # An example ## GDP per capita and life expectancy across time --- ## First attempt <img src="introduction_files/figure-html/unnamed-chunk-6-1.png" width="648" style="display: block; margin: auto;" /> --- ## Transforming the axis <img src="introduction_files/figure-html/unnamed-chunk-7-1.png" width="648" style="display: block; margin: auto;" /> --- ## Grouping time, adding population <img src="introduction_files/figure-html/unnamed-chunk-8-1.png" width="648" style="display: block; margin: auto;" /> --- ## Animated plots (using **gganimate**) <img src="introduction_files/figure-html/unnamed-chunk-9-1.gif" style="display: block; margin: auto;" /> --- class: section-title # Learning outcomes --- ## Knowledge and understanding * demonstrate knowledge of the theoretical and practical construction of visualisations, and * demonstrate understanding of how the type of data impacts the visualisation and what components are appropriate. -- ## Competence and skills * demonstrate the skill to independently, using software, visualise various types of data, * demonstrate the ability to make appropriate choices in designing visualisations, and * demonstrate the ability to in writing present and discuss visualisations in dialogue with others. --- ## Judgement and approach * demonstrate the ability to assess visualisations with respect to clarity, accessibility and ethics, and * demonstrate insight into the importance of the design of visualisations with respect to communicative properties, accessibility and ethics. --- class: section-title # Course structure --- ## Topics * introduction to R and R Studio * introduction to ggplot2 * basics of data visualizations * visualizations with one variable * visualizations with several variables * maps * interactive and animated visualizations --- ## Learning activities * lectures * text * worked examples --- ## Examination ### Assessment * quizzes * assignments * project .pull-left[ ### Peer feedback The assignment and project will be reviewed through peer-feedback. ] .pull-right[ <img src="images/feedback.jpg" width="800" style="display: block; margin: auto;" /> ] --- class: section-title # Good luck! --- ## References <a name=bib-reinsel2018></a>[Reinsel, D., J. Gantz, and J. Rydning](#cite-reinsel2018) (2018). _The Digitization of the World: From Edge to Core_. US44413318. MA, USA: IDC, p. 28.