forked from adamwight/ores-diagrams
-
Notifications
You must be signed in to change notification settings - Fork 0
/
level_1_dfd.tex
50 lines (45 loc) · 2.11 KB
/
level_1_dfd.tex
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
% Data flow diagram
% Template adapted from http://www.texample.net/tikz/examples/data-flow-diagram/ by David Fokkema
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
% Custom, should be provided in the same directory.
\usepackage{datastore}
\begin{document}
\begin{tikzpicture}[
font=\sffamily,
every matrix/.style={ampersand replacement=\&,column sep=1cm,row sep=1cm},
interface/.style={draw,thick,regular polygon,regular polygon sides=4,inner sep=0},
process/.style={draw,thick,rounded corners,inner sep=.3 cm},
datastore/.style={draw,thick,shape=datastore,inner sep=.3cm},
to/.style={->,>=stealth',shorten >=1pt,semithick,font=\sffamily\footnotesize},
every node/.style={scale=0.9,align=center}]
% Position the nodes using a matrix layout
\matrix{
\node[interface] (researcher) {Researcher};
\& \node[process] (wikilabels) {Wiki labels};
\& \node[interface] (labeler) {Labeler}; \\
\& \node[process] (train) {Train AI}; \\
\node[interface] (recentchanges) {Recent changes \\ feed};
\& \node[datastore] (models) {Models}; \\
\& \node[process] (ores) {ORES scoring};
\& \node[interface] (statsd) {statsd}; \\
\& \node[datastore] (scoredb) {Score cache}; \\
\& \node[process] (oresapi) {ORES API}; \\
\& \node[interface] (consumer) {ORES consumer}; \\
};
\node [below=2cm, align=flush center] at (consumer)
{\Large ORES: Overview, level 1 \\ \normalsize data flow diagram};
% Draw and label arrows between nodes.
\draw[to] (recentchanges) -- node[midway,left] {new revisions} (ores);
\draw[to] (researcher) -- node[midway,above] {experiments} (wikilabels);
\draw[to] (labeler) -- node[midway,above] {hand coding} (wikilabels);
\draw[to] (wikilabels) -- node[midway,left] {test and \\ training sets} (train);
\draw[to] (train) -- (models);
\draw[to] (models) -- (ores);
\draw[to] (ores) -- node[midway,right] {scores} (scoredb);
\draw[to] (scoredb) -- node[midway,right] {scores} (oresapi);
\draw[to] (ores) -- node[midway,above] {metrics} (statsd);
\draw[to] (oresapi) -- (consumer);
\end{tikzpicture}
\end{document}