aboutsummaryrefslogtreecommitdiff
path: root/dataprocessing.tex
blob: 9b946cc5ed1ec45d7caa99c2d54b9c5f6856175f (plain)
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
\documentclass[12pt,a4paper,twocolumn,landscape]{exam}

\usepackage{xparse}
\usepackage{tikz}
   \usetikzlibrary{arrows,calc,fit}
\usepackage{mathtools}
\usepackage{fullpage}
\usepackage{todonotes}
\usepackage{float}
\usepackage[compact,explicit]{titlesec}% http://ctan.org/pkg/titlesec
\usepackage[utf8]{inputenc}
\usepackage{titling}
\usepackage{pgfplots}
\usepackage{wrapfig}
\usepackage{boxedminipage}
\usepackage{parskip} % Don't indent paragraphs

\usepackage{fib}
\usepackage{common}

\newcommand{\slice}[4]{
  \pgfmathparse{0.5*#1+0.5*#2}
  \let\midangle\pgfmathresult

  % slice
  \draw[thick,fill=black!10] (0,0) -- (#1:1) arc (#1:#2:1) -- cycle;

  % outer label
  \node[label=\midangle:#4] at (\midangle:1) {};

  % inner label
  \pgfmathparse{min((#2-#1-10)/110*(-0.3),0)}
  \let\temp\pgfmathresult
  \pgfmathparse{max(\temp,-0.5) + 0.8}
  \let\innerpos\pgfmathresult
  \node at (\midangle:\innerpos) {#3};
}

\pagestyle{headandfoot}

\firstpageheadrule
\firstpageheader{Ratios}
                {Level 5-6}
                {\today}

\runningheadrule
\runningheader{Ratios}
              {Ratios, Page \thepage\ of \numpages}
              {\today}

\firstpagefooter{}{}{}
\runningfooter{}{}{}

\begin{document}
\section*{Data Processing - Level 5-6}

\begin{wrapfigure}{R}{0.25\linewidth}
    \centering
    \begin{boxedminipage}{\linewidth}
        Keywords:
        \begin{itemize}
            \item Chart
            \item Graph
            \item Data
            \item Stem
        \end{itemize}
    \end{boxedminipage}
\end{wrapfigure}

Data can be represented in many ways, one useful way is to represent it as a
graph or chart.

\subsection*{Stem and Leaf Diagrams}

Stem and leaf diagrams are useful for displaying small to medium amounts of
numerical data.

For example, in the stem and leaf diagram below, you can see some test
results. By looking at the length of the row of numbers, you can tell how many
results fall in to each range.

A very important part of the stem and leaf diagram is the key, this tells you
how to interpret the data in the diagram.

\begin{table}[htbp]
    \centering
    \caption{Stem Plot of test results Key: $1 | 1= 11$}
    \begin{tabular}{r|*{9}{l}}
        Stem & \multicolumn{9}{l}{Leaf} \\
        \hline
        1 & 1 &   &   &   &   &   &   &   &   \\
        2 & 0 & 3 &   &   &   &   &   &   &   \\
        3 & 5 & 6 & 6 & 6 & 7 & 7 & 7 & 8 & 9 \\
        4 & 5 & 7 & 7 & 8 &   &   &   &   &   \\
    \end{tabular}
    \label{tab:addlabel}
\end{table}

\subsection*{Bar Charts}

Bar charts are another way of representing data, here the chart below
represents the number of different colour cars that passed a point on a road
over a hour.

\begin{figure}[H]
    \centering
    \begin{tikzpicture}
        \begin{axis}[
            symbolic x coords={Red, Green, Blue},
            xtick=data
          ]
            \addplot[ybar,fill=black!10] coordinates {
                (Red,   42)
                (Green,  50)
                (Blue,   80)
            };
        \end{axis}
    \end{tikzpicture}
\end{figure}

\subsection*{Pie Charts}

\begin{figure}[H]
    \centering
    \begin{tikzpicture}[scale=3]
        \newcounter{a}
        \newcounter{b}
        \foreach \p/\t in {20/type A, 4/type B, 11/type C,
        49/type D, 16/other}
        {
            \setcounter{a}{\value{b}}
            \addtocounter{b}{\p}
            \slice{\thea/100*360}
            {\theb/100*360}
            {\p\%}{\t}
        }
    \end{tikzpicture}
\end{figure}

\subsection*{Questions}

TODO

\end{document}