% dummy file seminar.con, if it does not exist.
\begin{filecontents}{seminar.con}
\end{filecontents}

\documentclass[slidesonly,landscape]{seminar}
\usepackage{slidesec}
\usepackage{times}
\usepackage{semlayer}  % This must be included
\usepackage{graphicx}
\usepackage{fancybox}
\usepackage{color}
\usepackage{crayola}
\usepackage{lastpage}
\usepackage{xspace}
\usepackage{makeidx}
\usepackage[pdfstartview={FitBH -32768},
            pdfpagemode=None,
            plainpages=false,
            colorlinks]{hyperref}
\hypersetup{pdfauthor=Vladimir Batagelj}
\hypersetup{pdftitle=First Steps to Network Visualization with Pajek}

\setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\makeindex

% --- uporabnikovi ukazi -----------------------------------

\newcommand{\keyw}[1]{\textcolor{Red}{\emph{#1}}}
\newtheorem{theorem}{Theorem}
\newcommand{\QED}{\hspace*{1mm}\hfill$\Box$\endgraf}
\newenvironment{proof}{\textbf{Proof:}}{\QED}
\newtheorem{corolary}{Corolary}
\newcommand{\pas}[1]{\tbf{\sf #1}}
\def\RR{\hbox{\sf I\kern-.14em\hbox{R}}}
\def\NN{\hbox{\sf I\kern-.13em\hbox{N}}}
\def\Min{\mathop{\rm Min}\nolimits}
\def\Max{\mathop{\rm Max}\nolimits}
\newcommand{\Pajek}{\texttt{\textbf{Pajek}}}

% --- prosojnice -----------------------------------

\slidewidth 220mm \slideheight 160mm  % maximal
\slidesmag{4}
\articlemag{0}
\raggedslides[2em]
\slideframe{Oval}
\renewcommand{\makeslideheading}[1]{%
  \begin{center}\Large\textbf{\textcolor{Plum}{#1}}\end{center}}

% --- krmilje -----------------------------------

\newcommand{\ozadje}{White}
\newcommand{\crnilo}{Blue}

\newcommand{\prejsnja}{\rotatebox{90}{\ding{115}}}
\newcommand{\naslednja}{\reflectbox{\rotatebox{90}{\ding{115}}}}
\newcommand{\nazaj}{\rotatebox{90}{\ding{115}}\kern -1ex\reflectbox{\rotatebox{90}{\ding{115}}}}
\newcommand{\zacetek}{\raisebox{1pt}{\ding{121}}\kern -1pt\rotatebox{90}{\ding{115}}}
\newcommand{\konec}{\reflectbox{\rotatebox{90}{\ding{115}}}\kern -1pt\raisebox{1pt}{\ding{121}}}
\newcommand{\prva}{\ding{108}}
\newcommand{\kazalo}{\ding{42}}
\newcommand{\koncaj}{\ding{54}}
\newcommand{\spomincica}{\normalsize\raisebox{3pt}{\textcolor{yellow}{\ding{108}}}\LARGE\kern -1.5ex%
\textcolor{cyan}{\ding{95}}}

\newcommand{\krmilje}{\colorbox{\ozadje}{\raisebox{-3pt}[0pt][0pt]{\normalsize%
 \Acrobatmenu{PrevPage}{\textcolor{\crnilo}{\prejsnja}} \
 \Acrobatmenu{NextPage}{\textcolor{\crnilo}{\naslednja}} \
 \Acrobatmenu{FirstPage}{\textcolor{\crnilo}{\zacetek}} \
 \hyperlink{prvastran}{\large\textcolor{\crnilo}{\prva}\normalsize} \
 \Acrobatmenu{LastPage}{\textcolor{\crnilo}{\konec}} \
 \Acrobatmenu{GoBack}{\textcolor{\crnilo}{\nazaj}} \
 \hyperlink{kazalo}{\large\textcolor{\crnilo}{\kazalo}\normalsize} \
 \Acrobatmenu{Quit}{\large\textcolor{\crnilo}{\koncaj}\normalsize}}}
}

% --- obrobje ----------------------------------

\newpagestyle{MH}%
  {\tiny V. Batagelj:
    First Steps to Network Visualization with Pajek \hfil \thepage}%
  {\tiny University of Konstanz, Analysis of Political and Managerial Networks, May 21, 2002
   \hfil}
\newpagestyle{MS}%
  {\tiny V. Batagelj:
   First Steps to Network Visualization with Pajek \hfil \thepage}%
  {\tiny University of Konstanz, Analysis of Political and Managerial Networks, May 21, 2002
   \hfil\krmilje }
\newpagestyle{MK}%
  {\tiny V. Batagelj:
   First Steps to Network Visualization with Pajek \hfil I-\thepage}%
  {\tiny University of Konstanz, Analysis of Political and Managerial Networks, May 21, 2002
   \hfil\krmilje }
\pagestyle{MH}
\slidepagestyle{MS}


% \special{landscape}
\def\SeminarColorVersion{y}
\def\SeminarPaperVersion{n}

\begin{document}


% === Naslovnica =============================================================

\begin{slide}

\slidepagestyle{empty}
\begin{center}

\begin{tabular}{cc}
% bb=0 0 105 70
%  \includegraphics[width=0.9\textwidth]{./pics/krizar.eps}
  \includegraphics[width=45mm,bb=10 5 70 70,clip=,angle=270]%
   {./pics/krizar.pdf}
&
\hyperlink{kazalo}{\parbox[t]{50mm}{
{\Large\textcolor{Plum}{\textbf{\strut ~\\
     First Steps to\\
     Network Visualization\\
     with Pajek}}}\\[5mm]
{\large\textcolor{BrickRed}{Vladimir Batagelj}}\\
{\large\textcolor{Red}{University of Ljubljana\\ Slovenia}}
}}\bigskip
\end{tabular}
University of Konstanz, Analysis of Political and Managerial Networks\\[2mm]
May 21, 2002, 16h, room C 424

\end{center}
\end{slide}

% *** Kazalo ******************************************************************

\begin{slide}
\setcounter{page}{1}
\setcounter{slide}{1}
\slidepagestyle{MK}
\hypertarget{kazalo}{}
\listofslides
\end{slide}

%******************************************************************************


\begin{slide}
\setcounter{page}{1}
\setcounter{slide}{1}
\slidepagestyle{MS}
\hypertarget{prvastran}{}
\slideheading{Pajek}\medskip
\parbox{41mm}{\includegraphics[width=41mm,bb=0 0 570 390,clip=]{pics/pajekP.pdf}} \hfill
\parbox{62mm}{
\Pajek\ (Slovene word for Spider) is a program,
for Windows (32 bit), for analysis of \emph{large networks}.
With Andrej Mrvar, we started to develop \Pajek\
in November 1996.
Some procedures were contributed by Matja\v{z}
Zaver\v{s}nik.} \bigskip

\Pajek\  is freely available, for noncommercial use, at its homepage:\\[1mm]
 \href{http://vlado.fmf.uni-lj.si/pub/networks/pajek/}%
      {\texttt{\textbf{http://vlado.fmf.uni-lj.si/pub/networks/pajek/}}}\\[1mm]
When you download its installation program you simply
run it and it will install \Pajek\  in the selected directory.

%******************************************************************************


\newslide
\slideheading{Input Data}

Besides its own input formats, \Pajek\
supports several other formats:
\texttt{UCINET DL}, genealogical \texttt{GED},
and some molecular formats: \texttt{BS} (Ball and Stick),
\texttt{MAC} (Mac Molecule) and \texttt{MOL} (MDL MOLfile).

Run \Pajek. You will get the \emph{main window} -- see
next slide. \Pajek\ is organized as a '\emph{calculator}'
for network data:
\begin{itemize}
  \item \keyw{network} -- main object (vertices and lines);
  \item \keyw{partition} --  to which cluster a vertex belongs;
  \item \keyw{vector} -- values of vertices;
  \item \keyw{permutation} -- reordering of vertices;
  \item \keyw{cluster} -- subset of vertices (e.g. a cluster from partition);
  \item \keyw{hierarchy} -- hierarchically ordered clusters and vertices.
\end{itemize}


%******************************************************************************


\newslide
\slideheading{Pajek's Main and Report Windows}

 \begin{center}
  \includegraphics[width=85mm,bb=0 0 695 530,clip=]{pics/PajekMain.pdf}
 \end{center}


%******************************************************************************


\newslide
\slideheading{Reading Data from a File}


The power of \Pajek\  is based on several transformations
which support different transitions among these data types.

Click on the first icon of the '\emph{Network register}'
and in the dialog box select the right file type. For example,
for Ucinet data, the type

  \texttt{UCINET DL files (*.dat)}

find your file on the disk, and request its reading by
click on \texttt{Open}.
If everything is OK, you will get a new network in the
Network register and report about the reading in the
\emph{report window}.

Now, you can draw the network using the
\texttt{Draw/Draw} option in the main window.
The \emph{draw window} appears with a picture of the
current network.


%******************************************************************************


\newslide
\slideheading{Pajek's Draw Window}

 \begin{center}
  \includegraphics[width=85mm,bb=0 0 695 530,clip=]{pics/PajekDraw.pdf}
 \end{center}

%******************************************************************************

\newslide
\slideheading{Pajek's Data / \texttt{NET}}

The network is described on the file \textit{file}\texttt{.net}
that has the following basic structure:
\begin{tabbing}
xxx\=xxxxxxxxxxxxxxxxxxxxxxx\=xxxx\kill
\>\texttt{*vertices} $n$ \> $n$ is the number of vertices \\
\>\strut\texttt{~~1 "}$name_1$\texttt{"} \>
  the label of vertex 1 is $name_1$\\
\>\ldots \\
\>\strut\texttt{~~}$n$\texttt{ "}$name_n$\texttt{"}\\
\>\texttt{*arcs}\\
\>\strut\texttt{~~}$i$ ~ $j$ ~ $v_{ij}$ \>
  the arc from $i$ to $j$ has value $v_{ij}$\\
\>\ldots \\
\>\texttt{*edges}\\
\>\strut\texttt{~~}$p$ ~ $q$ ~ $v_{pq}$\>
  the edge from $p$ to $q$ has value $v_{pq}$\\
\>\ldots \\
\end{tabbing}
The file can contain several additional elements --
see \texttt{Draweps.htm}.


%******************************************************************************

\newslide
\slideheading{Pajek's Data / \texttt{CLU}, \texttt{VEC}, \texttt{PER}}
All three types of files have the same structure:
\begin{tabbing}
xxx\=xxxxxxxxxxxxxxxxxxxxxxx\=xxxx\kill
\>\texttt{*vertices} $n$ \> $n$ is the number of vertices \\
\>\strut\texttt{~~}$v_1$ \>
  vertex 1 has value $v_1$\\
\>\ldots \\
\>\strut\texttt{~~}$v_n$
\end{tabbing}
\textbf{\texttt{CLU}}stering -- partition of vertices --
  \emph{nominal} or \emph{ordinal} data about vertices\\
  $v_i \in \NN$ : vertex $i$ belongs to the cluster $v_i$;

\textbf{\texttt{VEC}}tor -- \emph{numeric} data about vertices\\
  $v_i \in \RR$ : the property has value  $v_i$ on vertex $i$;

\textbf{\texttt{PER}}mutation -- \emph{ordering} of vertices\\
  $v_i \in \NN$ : vertex $i$ is at the $v_i$-th position.


%******************************************************************************


\newslide
\slideheading{Example: Wolfe Monkey Data}
\begin{center}\footnotesize
\begin{tabular}{|c|c|c|c|c|}
\hline
\texttt{inter.net} & \texttt{inter.net} &
\texttt{sex.clu} & \texttt{age.vec} & \texttt{rank.per} \\ \hline
\includegraphics[width=15mm,bb=50 530 135 810,clip=]{pics/inter.pdf}
&
\includegraphics[width=15mm,bb=50 250 135 523,clip=]{pics/inter.pdf}
&
\includegraphics[width=15mm,bb=50 530 135 810,clip=]{pics/sex.pdf}
&
\includegraphics[width=15mm,bb=50 530 135 810,clip=]{pics/age.pdf}
&
\includegraphics[width=15mm,bb=50 530 135 810,clip=]{pics/rank.pdf}\\
 & \ldots & & & \\
\hline
\end{tabular}\normalsize
\end{center}


%******************************************************************************

\newslide
\slideheading{Pajek's Data / \texttt{PAJ}}

All types of data can be combined into a single file --
Pajek's \emph{project} file \textit{file}\texttt{.paj}.

The easiest way to do this is:\\
read all data files in Pajek,\\
compute some additional data,\\
delete (dispose) some data,\\
save all as a project file with
\texttt{File/Project file/Save}.

Next time you can restore everything with a single\\
\texttt{File/Project file/Read}.

\Pajek\  supports also two-mode and temporal networks.


%******************************************************************************

\newslide
\slideheading{Visualization of Network Data}

You enter the draw window selecting some of the options
in the \texttt{Draw} menu in the main window.

If the vertices have no positions yet, they are displayed
on the circle. You can try to get better picture using automatic
layout methods from the \texttt{Layout} menu.

You can further improve the picture manually by moving
vertices with the mouse. The options
\texttt{Move/Fix}, \texttt{Move/Grid}, \texttt{Options/Transform/*}
can be useful.

Use also \texttt{Options/*} to determine what and how
is displayed.

\Pajek\  supports 2D and 3D layouts. Use \texttt{x},
\texttt{y}, \texttt{z} keys to rotate the picture in 3D.


%******************************************************************************

\newslide
\slideheading{Visualization of Partitions and Vectors}

Partitions can be visualized by colors of vertices.\\
\texttt{Draw/Draw Partition}.

Vectors by the size of vertices or by their position.\\
\texttt{Draw/Draw Vector}, \\
\texttt{Operations/Vector/Put Coordinate/*}.

Transformations on and between partitions and vectors
are available.

The value of lines can be displayed as number\\
\texttt{Options/Lines/Mark lines/with Values}\\
or as the width of lines\\
\texttt{Options/Lines/Different Widths}.

%******************************************************************************


\newslide
\slideheading{Sources}

The spider (\textit{Gartenkreuzspinne} / \textit{Araneus diadematus})
photo from the title page was made by Stefan Ernst \\
\href{http://www.naturfoto-online.de}{\texttt{http://www.naturfoto-online.de}}


%******************************************************************************


\end{slide}
\end{document}



%******************************************************************************

