\documentclass{beamer}
\usepackage{graphicx}
% \usepackage{enumitem}
\usepackage{outlines}
\usepackage{booktabs}
\usepackage{textcomp} %% for Registered circle-R symbol for Pstat
\usepackage{xcolor}
\definecolor{darkred}{rgb}{0.9,0,0}
\usepackage{url}
\usepackage{hyperref}
\hypersetup{
  colorlinks,
  allcolors=.,
  urlcolor=blue,
}
\definecolor{darkred}{rgb}{0.9,0,0}
\setbeamercolor{block title alerted}{bg = darkred!80!black, fg = white}
%\setbeamercolor{block title alerted}{bg = darkred}

\usepackage{amsmath}
\usetheme{CambridgeUS}
\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true]
\beamertemplatenavigationsymbolsempty

\graphicspath{{/home/rcw/DATA/work/SemiRetirementStatisticalConsulting/ConsultingBusiness/StatisticsAndEpidemiologyTeaching/GraphicsGallery/GoodGraphics/}
  {/home/rcw/DATA/work/SemiRetirementStatisticalConsulting/ConsultingBusiness/StatisticsAndEpidemiologyTeaching/GraphicsGallery/BadGraphics/}{/home/rcw/DATA/work/SemiRetirementStatisticalConsulting/ConsultingBusiness/StatisticsAndEpidemiologyTeaching/GraphicsGallery/AssortedGraphics/}
  {/home/rcw/DATA/work/SemiRetirementStatisticalConsulting/ConsultingBusiness/StatisticsAndEpidemiologyTeaching/GraphicsGallery/}
  }

\title[]{Agency Statistical Consulting, LLC}
  
\author[www.agencystatistical.com]{Christopher W. Ryan. MD, MS, MSPH, PStat\textregistered}

\institute[]{\href{www.agencystatistical.com}{Agency Statistical Consulting, LLC} \\ \includegraphics[scale = 0.015]{/home/rcw/DATA/work/SemiRetirementStatisticalConsulting/ConsultingBusiness/qrcode}}

\logo{ \includegraphics[scale = 0.3]{/home/rcw/DATA/work/SemiRetirementStatisticalConsulting/ConsultingBusiness/croppedPoloShirtLogo2} }

\begin{document}


\begin{frame}

  \begin{center}

    {\huge Agency Statistical Consulting, LLC}

    {\large \color{blue} \emph{Helping those in public service get the most from their data}}

    \medskip

    {\large Christopher W. Ryan, MD, MS, MSPH, Pstat\textregistered}

    \bigskip

    \bigskip

    {\Large \color{darkred} Offering education and training in all things data-related}
      

    \bigskip

    \href{www.agencystatistical.com}{www.agencystatistical.com}

    \includegraphics[scale = 0.015]{/home/rcw/DATA/work/SemiRetirementStatisticalConsulting/ConsultingBusiness/qrcode}

\end{center}

\end{frame}




\section{Thinking about data: starting concepts for high school students}


\begin{frame}[plain]

  \begin{alertblock}{Thinking about data}

    {\Large
      Basic concepts
    }

  \end{alertblock}

\end{frame}




\subsection{Variation is the name of the game}


\begin{frame}
  \frametitle{Population versus sample}

  \begin{table}\scriptsize
    \begin{tabular}{ll}
      \toprule
      Scientific phenomenon of interest & Growth in lake trout \\
      What you need to study it & Lake trout---your \emph{population} \\
      What you \alert{get} to study & The lake trout you catch---your \emph{sample} \\
      \bottomrule
    \end{tabular}
  \end{table}

  \begin{outline}
    \1 You never get to study your whole population of interest
    \1 Samples will vary. The sample you \emph{get} will differ from the sample(s) you \emph{could have gotten} if you did the whole experiment again
    \1 It's called \emph{sampling variation}, and it's the key to statistics
  \end{outline}

\end{frame}


  


\subsection{Understand the ``data-generating mechamism''}


\begin{frame}
  \frametitle{Where did the data come from?}

  \begin{outline}
    \1 Making and recording your own measurements
    \2 Define precisely what you will measure, how, when, and where
    \3 What will you consider a ``fish?''  How about eels?
    \3 Catch with a pole and line? Or a net? How fine is the netting?
    \2 Write that all down ahead of time
    \1 Using existing data
    \2 Who collected it, how, when, where, and why?
    \2 What definitions did they use? Get the ``data dictionary''
    \3 Do telephone surveys include cell phones?
    \3 What is a ``fever?'' What temperature, for how long, and measured how?
  \end{outline}

\end{frame}


\begin{frame}
  \frametitle{What is your ``unit of analysis?''}

  Although there are some subtle differences, ``entity level,'' ``experimental unit,'' ``unit of measurement,'' and ``unit of randomization,'' are similar terms.  It's the thing you have measurements about.

  \begin{outline}
    \1 The student, the class, the school, or the school district?
    \1 The forest, the stand of trees, the individual tree, or the individual leaf?
    \1 The neighborhood, the city, or the state?
  \end{outline}

\end{frame}



\subsection{Understand your level of measurement}


\begin{frame}
  \frametitle{What are your levels of measurment?}

    \begin{table}
      \begin{tabular}{lccc}
        \toprule
        Name & Species & Size & Height (cm) \\
        \midrule
        Frodo & hobbit & small & 120 \\
        Gandalf & wizard & large & 220 \\
        Aragorn & human & large & 200 \\
        Gimli & dwarf & medium & 148 \\
        Bilbo & hobbit & small & 116 \\
        Boromir & human & medium & 170 \\
        \midrule
        \alert{level of} \\ \alert{measurement} & \alert{nominal} & \alert{ordinal} & \alert{ratio} \\
        \bottomrule
      \end{tabular}
    \end{table}

    What is the average species in this sample? Average size? Average height? Each of these measurements requires a different type of ``average,'' because each is made at a different \alert{level of measurement.}

\end{frame}
  

\begin{frame}
  \frametitle{Nominal measures}

  \begin{outline}
    \1 Sometimes called ``categorical''
    \1 Names or labels, with no meaningful order
    \1 Examples: species, mineral type, occupation
    \1 Suitable ``average:'' the mode---the most frequent category
  \end{outline}

\end{frame}


\begin{frame}
  \frametitle{Ordinal measures}

  \begin{outline}
    \1 Like nominal, but the categories have some order
    \1 Each category represents  more or less of something than the adjacent category
    \1 But we don't know \alert{how much} more or less---\alert{not even if we label the categories with numbers!}
    \1 Example: letter grades
    \1 Suitable ``average:'' the median or the mode
  \end{outline}

\end{frame}


\begin{frame}
  \frametitle{Interval measures}

  \begin{outline}
    \1 Sometimes called ``numeric'' or ``continuous''
    \1 Like ordinal, but with uniform ``steps''
    \1 100 differs from 90 by the same amount as 450 differs from 440
    \1 But no meaningful zero that indicates absence of the thing being measured
    \1 Examples: Celsius and Farenheit temperature
    \1 Suitable ``average:'' the mean or the median
  \end{outline}

\end{frame}


\begin{frame}
  \frametitle{Ratio measures}

  \begin{outline}
    \1 Also sometimes called ``numeric'' or ``continuous''
    \1 Like interval measurements, but with a meaningful zero that represents the absence of the quantity being measured
    \1 Example: Kelvin temperature, height, blood pressure
    \1 Suitable ``average:'' the mean or the median
  \end{outline}

\end{frame}



%% --------------- BEGIN BREAK ------------------ %%

\begin{frame}

  \begin{center}

    {\huge Agency Statistical Consulting, LLC}

    {\large \color{blue} \emph{Helping those in public service get the most from their data}}

    \medskip

    {\large Christopher W. Ryan, MD, MS, MSPH, Pstat\textregistered}

    \bigskip

    \bigskip

    {\Large \color{darkred} Offering education and training in all things data-related}
      

    \bigskip

    \href{www.agencystatistical.com}{www.agencystatistical.com}

    \includegraphics[scale = 0.015]{/home/rcw/DATA/work/SemiRetirementStatisticalConsulting/ConsultingBusiness/qrcode}

\end{center}

\end{frame}


%% ----------------- END BREAK ------------------- %%


  

\section{Making effective graphs}




\begin{frame}[plain]

  \begin{alertblock}{Data visualization}

    {\Large
      Making effective graphs
    }

  \end{alertblock}

\end{frame}



\begin{frame}{Principles of good data visualization}

  \begin{outline}
    \1 Use a graph when it serves an important purpose
    \1 Show the data!
    \1 Maximize the information-to-ink ratio
    \1 Capitalize on human perception to make it easy on your viewers
    \1 Scatterplots are the workhorse of data analysis
    \1 Use dedicated statistical software
  \end{outline}
  
\end{frame}



\subsection{Use a graph when it serves an important purpose}



\begin{frame}
  \begin{alertblock}{Principle}
    Use a graph when it serves an important purpose
  \end{alertblock}
\end{frame}



\begin{frame}
  \frametitle{Why make graphs?}

  \begin{outline}
    \1 To understand your data and what it might mean (exploratory analysis phase)
        \2 Sometimes patterns can only be discerned from graphs
    \1 To convey that understanding to others clearly (presentation phase)
        \2 Often more efficient: ``A picture is worth a thousand words''
  \end{outline}
  

\note{Graphs are powerful tools for both understanding your data and conveying that understanding to others. A good graph should reveal the story that the data have to tell, and do so accurately, clearly, and compellingly. Here are some time-honored principles for accomplishing that goal. Others have written much more authoritatively and eloquently on this topic than I have. Among them are Edward Tufte, William Cleveland, and Albert Cairo. I highly recommend them.

  Graphs for analysis versus presentation. We will find it convenient today to elide that distinction, but keep it in the back of your mind.

  Univariate versus multivariate graphs}

\end{frame}




\begin{frame}
  \frametitle{Do you really need that graph?}

  \begin{figure}
    \includegraphics[scale = 0.4]{BadPieGraphVanguard}
        \caption{What does the pie add to our understanding? Does it convey any information?}
  \end{figure}

\end{frame}



\begin{frame}
  \frametitle{Do you really need that graph?}

   \begin{columns}

  \begin{column}{0.5\textwidth}

  \begin{figure}
    \includegraphics[scale = 0.4]{BadPieGraphVanguard}
    \caption{What does the artwork add?}
  \end{figure}

\end{column}

\begin{column}{0.5\textwidth}

  \begin{figure}
    \includegraphics[scale = 1.7]{erased_BadPieGraphVanguard}
    \caption{Do you know anything less if we remove the artwork?}
  \end{figure}

\end{column}

\end{columns}

\end{frame}




\begin{frame}
  \frametitle{Do you really need that graph?}
  
  \begin{figure}
    \includegraphics[scale = 0.3]{PieChartTableWithArt}
    \caption{What does the artwork add to understanding?}
  \end{figure}

\end{frame}


  
\begin{frame}
  \frametitle{Do you really need that graph?}

  \begin{columns}

  \begin{column}{0.5\textwidth}

  \begin{figure}
    \includegraphics[scale = 0.16]{PieChartTableWithArt}
    \caption{Does all that ink in the pie tell us anything that the numbers don't?}
  \end{figure}

\end{column}

\begin{column}{0.5\textwidth}

  \begin{table}
    \begin{tabular}{ccc}
      \toprule
      Manner & Number & Percent \\
      \midrule 
      suicide & 24292 & 54\% \\
      homicide & 19384 & 43\% \\
      other &   & 3\% \\
      \bottomrule
    \end{tabular}
     \caption{Wouldn't a simple table make it easier for the audience?}
  \end{table}

\end{column}

\end{columns}

\end{frame}




\note{Pie charts seem to invite this sort of ``graph as extraneous artwork'' pitfall. And I'll have a lot more to say about pie charts later---none of it good.  But other graphs can also be used unnecessarily}

\begin{frame}
  \frametitle{Do you really need that graph?}
  
  \begin{figure}
    \includegraphics[scale = 0.3]{BarGraphNoVerticalAxisButNumberLabels}
    \caption{A hard-to-read  vertical table with some colored bars}
  \end{figure}

\end{frame}



\subsection{Show the data!}


\begin{frame}
  \begin{alertblock}{Principle}
    Show the data!
  \end{alertblock}
\end{frame}



\note{Graphs can distill a lot of data into something easier for the human mind to comprehend, so that patterns are easier to recognize. But they can also obscure patterns. You will often be dealing with rather smaller datasets, in which case it may be more informative to just show the data---all of it, one blob of ink for each observation.}



\begin{frame}
  \frametitle{Show the data!}

      \begin{figure}
        \includegraphics[scale = 0.3]{DetonatorPlots}
        \caption{{\scriptsize Commonly-seen ``detonator plot.'' But where are the data?}}
      \end{figure}

\end{frame}
    

\begin{frame}[plain]
  \frametitle{Show the data!}

  \begin{columns}[t]

    \begin{column}{0.5\textwidth}

      \begin{figure}
        \includegraphics[scale = 0.3]{DetonatorPlots}
        \caption{{\scriptsize Commonly-seen ``detonator plot.'' But where are the data?}}
      \end{figure}

    \end{column}

    \begin{column}{0.5\textwidth}

      \begin{figure}
        \includegraphics[scale = 0.24]{annotated_StripPlots}
        \caption{{\scriptsize Often your datasets will be small. Just plot the points. This is more informative. Might there be something scientifically interesting to explore about that cluster of 5 observations in Group B? It was obscured in the detonator plot.}}
      \end{figure}

    \end{column}

  \end{columns}

\end{frame}


\begin{frame}
  \frametitle{Large datasets: boxplot}

  \begin{figure}\centering
    \includegraphics[scale = 0.17]{BasicBoxplot}
    \caption{Boxplots may be a good choice when you have too many data to plot individual points (a good problem to have!)}
  \end{figure}

\end{frame}



\begin{frame}
  \frametitle{Horizontal boxplot}

  \begin{figure}\centering
    \includegraphics[scale = 0.4]{HorizontalBoxplot}
    \caption{Humans are better at comparing horizontal differences than vertical ones. Horizontal boxplots deserve to be used more often}
  \end{figure}

\end{frame}



\begin{frame}
  \frametitle{Large datasets: violin plots are even better}

  \begin{columns}

    \begin{column}{0.5\textwidth}

      \begin{figure}
        \includegraphics[scale = 0.13]{BasicBoxplot}
        \caption{Basic boxplot obscures distribution shape}
      \end{figure}

    \end{column}

    \begin{column}{0.5\textwidth}

      \begin{figure}
        \includegraphics[scale = 0.13]{BasicViolinPlot}
        \caption{Violin plots of the very same data show distributional details}
      \end{figure}

    \end{column}

  \end{columns}

\end{frame}


\begin{frame}
  \frametitle{Medium-sized datasets: try violins \emph{and}  points!}

  \begin{figure}\centering
    \includegraphics[scale = 0.44]{ViolinPlotWithPoints}
  \end{figure}

\end{frame}

  




\subsection{Maximize the information-to-ink ratio}


\begin{frame}
  \begin{alertblock}{Principle}
    Maximize the information-to-ink ratio
  \end{alertblock}
\end{frame}



\note{I'm dating myself with the word, ``ink,'' but you know what I mean.}


\begin{frame}
  \frametitle{Information:ink ratio}

  \begin{center}

  information:ink ratio = $ \frac{\text{the amount of information conveyed}}{\text{the amount of ink used to convey it}} $

\end{center}

\end{frame}


\begin{frame}
  \frametitle{Information:ink ratio}
  
\begin{figure}
  \includegraphics[scale = 0.16]{BarGraphShouldBeLineGraph}
  \caption{Where is the information encoded?  In the \emph{tops} of the bars alone. This could easily be a simple line graph, with a line connecting the tops of the bars, \emph{but no bars}. This would use a lot less ink without sacrificing any information.}
\end{figure}

\end{frame}



\begin{frame}
  \frametitle{Maximizing the info:ink ratio}

  \note{A bar graph typical of what spreadsheets produce, often by default}

  \begin{figure}\centering
    \includegraphics<1>[scale = 0.34]{stock}
    \caption{A bar graph typical of what spreadsheets produce, often by default. (Data are fictional.)}
  \end{figure}

\end{frame}




\begin{frame}
  \frametitle{Maximizing the info:ink ratio}

  \begin{figure}\centering
    \includegraphics<1>[scale = 0.34]{narrower4}
    \caption{Shave the width of the bars---no information is lost}
  \end{figure}

\end{frame}



\begin{frame}
  \frametitle{Maximizing the info:ink ratio}

  \begin{figure}\centering
    \includegraphics<1>[scale = 0.34]{narrower2}
    \caption{Shave the width of the bars a little more---still no information lost.}
  \end{figure}

\end{frame}



\begin{frame}
  \frametitle{Maximizing the info:ink ratio}

  \begin{figure}\centering
    \includegraphics<1>[scale = 0.34]{justdotsv}
    \caption{Where does the information actually reside? Just in the \emph{tops} of the bars. So just plot those. But this is hard to interpret.}
  \end{figure}

\end{frame}




\begin{frame}
  \frametitle{Maximizing the info:ink ratio}

  \begin{figure}\centering
    \includegraphics<1>[scale = 0.34]{classiccleveland}
    \caption{Rotate the whole thing 90 degrees. Easier to compare location of dots. And easier to read the county labels. This is a ``Cleveland dot plot''}
  \end{figure}

\end{frame}



\begin{frame}
  \frametitle{Maximizing the info:ink ratio}

  \begin{figure}\centering
    \includegraphics<1>[scale = 0.34]{sortedcleveland}
    \caption{Rarely does alphabetical order have any scientific meaning. So reorder the counties by magnitude of the data. An even better Cleveland dot plot.}
  \end{figure}

\end{frame}




\begin{frame} \label{bup}
  \frametitle{Superfluous 3-D effects}
  
\begin{figure}
  \includegraphics[scale = 0.28]{BadBuprenorphine3DBarGraph}
  \caption{Would you know anything less without the 3-D effect?}
\end{figure}

%%%% \hfill\hyperlink{lom}{\beamergotobutton{Levels of measurement}}

\end{frame}


\begin{frame}
  \frametitle{Deceptive 3-D effects}
  
\begin{figure}
  \includegraphics{annotated_Horrible3DPairedBarGraph_LessThanZero}
  \caption{Percent less than zero?}
\end{figure}

\end{frame}


\begin{frame}
  \frametitle{A third dimension that actually adds to understanding}

  \begin{figure}
    \includegraphics[scale = 0.4]{Meaningful3DEffects}
  \end{figure}

\end{frame}




\subsection{Capitalize on human perception to make it easy on your viewers}


\begin{frame}
  \begin{alertblock}{Principle}
    Capitalize on human perception
  \end{alertblock}
\end{frame}



\note{Humans are good at judging and comparing two things that are different distances along a line. We are pretty good at comparing lengths of bars or lines, as long as they all start at the same place (preferably zero). We are also pretty good at comparing relative locations of things in two-dimensional space, as in a scatterplot.

  We are not very good at comparing angles, curves, or areas.  This leads us to the one thing that statisticians and graphic designers largely agree on: never use a pie chart! Pie charts also have a very low info:ink ratio. A pie chart is almost never a good solution for displaying data. The same goes for donut or ring charts.}


\begin{frame}
  \frametitle{Ease of perception\footnote{https://flowingdata.com/2010/03/20/graphical-perception-learn-the-fundamentals-first/}}

  \begin{outline}[enumerate]
    \1 Position along a scale or line
    \2 horizontal probably easier than vertical
    \1 Length
    \1 Angle
    \1 Area
    \1 Volume, density
    \1 Color saturation or hue
  \end{outline}

\end{frame}
  



\begin{frame}
  \frametitle{Pie charts rely on comparing arcs, angles, and areas}

  \begin{columns}

    \begin{column}{0.5\textwidth}

      \begin{figure}
        \includegraphics[scale = 0.26]{TwoCurvesMagicTrick}
      \end{figure}

    \end{column}

    \begin{column}{0.5\textwidth}

      \begin{figure}
        \includegraphics[scale = 0.26]{TwoCurvesMagicTrick2}
      \end{figure}

    \end{column}

  \end{columns}

  \medskip

\begin{center}
  Childhood magic trick: Which arc is longer, the red or the black? They are, of course, exactly the same length.
\end{center}

  \bigskip
  
  \begin{outline}
    \1 Pie charts:
    \2 rely on perception of curves, angles, and areas
    \2 use too much ink to convey too little information
    \2 often are simply decorations for what should be a table
    \1 Never use a pie chart
  \end{outline}

\end{frame}




\begin{frame}
  \frametitle{Place things to make your main comparison obvious}

  \begin{figure}\centering
    \includegraphics[scale = 0.36]{PoorComparisonPlacementBarGraph}
    \caption{What is the main intended comparison here? How age groups differ within any particular race? Or how the races differ within any particular age group?}
    \end{figure}

\end{frame}



\subsection{Scatterplots are the workhorse of data analysis}


\begin{frame}
  \begin{alertblock}{Principle}
  Scatterplots are the workhorse of statistics
  \end{alertblock}
\end{frame}


\note{A scatterplot reveals patterns in how two things relate to each other, patterns that may be impossible to discern from reading a long table of numbers.  They are most useful when both things (both variables) are numeric---what statisticians call interval/ratio data. Various trend lines can be added to highlight the relationship---but don't impose a straight line on a curved relationship just because your software offers that option. Never assume straight-line relationships. Notably, and sadly, the failure to use scatterplots and the failure to consider non-linear relationships likely contributed to the explosion of space shuttle Challenger in 1986.}



\begin{frame}
  \frametitle{Scatterplots: the workhorse of statistics}
  
  \begin{figure}
    \includegraphics[scale = 0.35]{BasicScatterplot}
    \caption{A basic scatterplot, N $=$ 200. Fictional data.}
  \end{figure}

\end{frame}



\begin{frame}
  \frametitle{Don't assume straight-line relationships}

  \begin{figure}\centering
    \includegraphics[scale = 0.4]{ParabolicScatterplot}
  \end{figure}

\end{frame}



\begin{frame}
  \frametitle{Don't assume straight-line relationships}

  \begin{figure}\centering
    \includegraphics[scale = 0.34]{FaultyLinearModelScatterplot}
    \caption{Spreadsheet software will fit a straight ``trend line'' just fine---but it does not accurately reflect the scientific reality of what is going on in these data.}
  \end{figure}

\end{frame}

  


\begin{frame}
  \frametitle{Don't let your software impose a straight line}

  \begin{columns}

    \begin{column}{0.6\textwidth}

      \includegraphics[scale = 0.24]{UN_Hallucinogens_Original}

    \end{column}

    \begin{column}{0.4\textwidth}<2->
      \includegraphics[scale = 0.28]{UN_Hallucinogens_Better}

    \end{column}

  \end{columns}

   \note{Presumably the purpose of the bar chart in panel (a) is to show the change over time in global seizures of hallucinogens. But the straight dotted line does not accurately reflect the nature of that change.  The scatterplot in panel (b) shows the data better, uses less ink, and displays a curved trend line, which is a better depiction of the situation: not much change from 1997 to around 2004, then an acceleration for about 15 years, then the hint of a levelling off.}

\end{frame}



\subsection{Summary of the principles of good data visualization}

\begin{frame}[shrink = 5]
  \frametitle{Summary}

  \begin{outline}
    \1 Use graphs to improve understanding, not simply as decorations
    \2 same goes for graphical elements: color, shape, size, etc
    \1 Whenever possible, show the data---all of it.
    \1 Maximize the info:ink ratio
    \2 avoid 3-D effects
    \1 Make it easy on your audience: capitalize on human perception abilities
    \2 easiest to perceive and compare: locations of points, lengths of lines
    \2 place the main comparison elements near each other
    \1 Don't assume or impose straight-line relationships
    \1 Never use pie charts
  \end{outline}

\end{frame}


% \section{Applying the principles}


% \begin{frame}
%   \frametitle{Your turn: improve this graph\footnote{Bijos A, et al.  Pediatr Radiol (2007) 37:1247-1252}}

%    \begin{columns}

%     \begin{column}{0.55\textwidth}

%       \begin{figure}
%         \includegraphics[scale = 0.26]{WrongBarsNextToEachOther}
%       \end{figure}

%     \end{column}

%     \begin{column}{0.45\textwidth}
      
%     \begin{table}\scriptsize
%       \begin{tabular}{llc}
%         \toprule 
%        impaction  &    segment & transit time \\
%        \midrule  
%    yes &        total  &         70 \\
%    yes  &       right   &        10  \\
%     yes  &        left   &        20  \\
%     yes &  rectosigmoid  &          32  \\
%  no  &        total   &        42  \\
%  no  &       right    &       10  \\
%  no  &        left    &       12  \\
%  no  & rectosigmoid   &        18  \\
%   \bottomrule
        
%       \end{tabular}
%     \end{table}
 
%     \end{column}

%   \end{columns}

% \end{frame}




% \begin{frame}
%   \frametitle{Your turn: improve this graph}

%    \begin{columns}

%     \begin{column}{0.45\textwidth}

%       \begin{figure}
%         \includegraphics[scale = 0.34]{DotplotBetterComparisonPlacement1}
%       \end{figure}

%     \end{column}

%     \begin{column}{0.45\textwidth}

%       \begin{figure}
%         \includegraphics[scale = 0.34]{DotplotBetterComparisonPlacement2}
%       \end{figure}

%     \end{column}

%   \end{columns}
  

%   \end{frame}
  


\begin{frame}
  \begin{alertblock}{Principle}
  Use dedicated statistical/graphics software
  \end{alertblock}
\end{frame}


\begin{frame}
  \frametitle{Software}

  \begin{outline}
    \1  Spreadsheets are sub-optimal
    \1  Use dedicated statistical or graphics software
    \2 Some (the better ones) require some typing of commands
    \2 Your institution may have one or more of these
    \1  High-quality free statistical graphics software
    \2 R 
    \3 Rstudio (now called ``Posit'')
    \2 Gnuplot 
    \1 Low-ish cost or free versions of commercial software
    \2 Sometimes use is time-limited
    \2 Mystat (version of Systat) 
    \2 Stata 
    \2 SigmaStat
  \end{outline}

\end{frame}



\begin{frame}
  \frametitle{Some good examples}

  \begin{center}
  
    \includegraphics<1>[scale = 0.4]{ViolinAndBoxPlotsCombined}
    \includegraphics<2>[scale = 0.2]{SplitViolinPlotsEarthquakeTsunami}
    \includegraphics<3>[scale = 0.16]{ColoredGroupedScatterplotWithLSfit_RgraphGallery}
    \includegraphics<4>[scale = 0.35]{TwoCloudScatterplotGeyser}
  \end{center}
  
\end{frame}


% \begin{frame}
%   \frametitle{Resources}

%   \begin{outline}
%     \1 Krause A and Rennie N, Presenting data the \emph{Significance} way, Part 2. Significance, September 2024, 21:4, p 32-36
%     \1 \href{https://www.edwardtufte.com/}{Edward Tufte, The Visual Display of Quantitative Information, Cheshire, CT: Graphics Press, LLC. 1983 and 2001}
%     \1 William Cleveland, The Elements of Graphing Data, Monterey, CA: Wadsworth. 1985
%     \1 \href{https://www.albertocairo.com/}{Albert Cairo, The Truthful Art: Data, Charts, and Maps for Communication, New Riders. 2016}
%     \1 \href{https://www.r-project.org/}{The R Project for Statistical Computing}
%     \1 \href{http://www.gnuplot.info/}{Gnuplot}
%   \end{outline}
  
% \end{frame}
  


% \begin{frame} \label{lom}
%   \frametitle{Levels of measurement}

%     \begin{table}
%       \begin{tabular}{lccc}
%         \toprule
%         Name & Species & Size & Height (cm) \\
%         \midrule
%         Frodo & hobbit & small & 120 \\
%         Gandalf & wizard & large & 220 \\
%         Aragorn & human & large & 200 \\
%         Gimli & dwarf & medium & 156 \\
%         Bilbo & hobbit & small & 116 \\
%         Boromir & human & small & 206 \\
%         \bottomrule
%       \end{tabular}
%     \end{table}

% \hfill\hyperlink{bup}{\beamerreturnbutton{Return}}

% \end{frame}
  



    
\end{document}

