text:
\documentclass[a4paper,11pt]{article}
\usepackage{geometry}
 \geometry{
 a4paper,
 total={170mm,257mm},
 left=20mm,
 top=20mm,
 }

 \usepackage{amsmath}
 \usepackage{siunitx}
 \usepackage{multirow}
\usepackage{colortbl}
 \usepackage{hhline}

 \usepackage{lipsum}  %%% Lorem ipsum

\setlength{\headheight}{30.0pt}
\setlength{\footskip}{20pt}

\usepackage{hyperref}
\hypersetup{
    colorlinks=True,
    linkcolor={blue!20!black},
    filecolor=magenta,
    urlcolor=cyan,
}

 \usepackage[export]{adjustbox}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{multicol}

\pagestyle{fancy}
\fancyhf{}
\rhead{\textit{Pul074BEX004}}
\lhead{\textit{Amrit Prasad Phuyal}}
\rfoot{\thepage}

\usepackage{mathpazo} % Palatino font
\usepackage{graphicx}
\usepackage{float}

\input{./AnsENV.tex} %% Answer environment
\input{./QueENV.tex} %% Question Environment
\input{./CoverPage.tex} %%% cover page
\include{./Matlab.tex} %%% Matlab code

\include{./Figure.tex} % include figures fo filter design LAB 1

%%%%%%%%%%%%%%%%%%%%%% for matlab observation   supply Figure scale(1), number(2) like "a,b,c,d..", gain (3), half power freq (4), bandwidth(5)
\newcommand{\mobs}[5]{
   % \subsubsection{MATLAB Observation Figure #2}
    \begin{figure}[H]
        \centering
        \includegraphics[width=\linewidth]{./FIG/Matlab/bode_Fig#2.pdf}
        \begin{tabular}[H]{| m{12em}| m{20em}|m{8em}|}
            \hline
            \rowcolor[rgb]{0.569,0.647,0.947} \textbf{Gain in passband} & \textbf{Half power frequency / frequencies} & \textbf{Bandwidth} \\ \hline
            #3 dB                                                       & (#4) KHz                                    & #5 KHz             \\  \hline
        \end{tabular}
        \caption{MATLAB Observation Figure #2}
    \end{figure}

}

%%%%%%%%%%%%%%%%%%%%%% for Proteus circuit  observation   supply Figure scale(1) for observation, number(2) like "a,b,c,d..", gain (3), half power freq (4), bandwidth(5)
\newcommand{\Porcirobs}[5]{
    %\subsubsection{Proteus Observation Figure #2}
    \begin{figure}[H] %%%%%%%%%%%proteus circuit
        \centering
        \includegraphics[width=\linewidth]{./FIG/Proteus/P_cir_fig#2.PDF}
        \caption{Proteus Circuit Figure #2}
    \end{figure}

    \begin{figure}[H]  %%%%%%%%%proteus plot and observation
        \centering
        \includegraphics[width=\linewidth]{./FIG/Proteus/plot_Fig#2.png}
        \begin{tabular}[H]{| m{12em}| m{20em}|m{8em}|}
            \hline
            \rowcolor[rgb]{0.569,0.647,0.947} \textbf{Gain in passband} & \textbf{Half power frequency / frequencies} & \textbf{Bandwidth} \\ \hline
            #3 dB                                                       & (#4) KHz                                    & #5 KHz             \\  \hline
        \end{tabular}
        \caption{Proteus Observation Figure #2}
    \end{figure}

}

%%%%%%%%%%  varyingg Figure

\newcommand{\varfig}[2]
{
\begin{figure}[H]
    \centering
    \includegraphics[width=\linewidth]{./FIG/Matlab/fig_#1_#2.pdf}
    \caption{Observation for varying #2 in Figure #1}
\end{figure}
}

\begin{document}

%%%%  COver page
\CP{Filter Design}{Lab \#1}{ANALYSIS OF FILTER NETWORKS}
{SHARAD KUMAR GHIMIRE}
%%%%%%%%%%%%%%%%%%%%

\pagenumbering{gobble}
\renewcommand{\contentsname}{Table of Contents}
\tableofcontents

%\pagebreak
%\listoffigures
% \pagebreak
% \listoftables
\vspace{5em}
\lstlistoflistings
\pagebreak
\listoffigures
\pagebreak
\pagenumbering{arabic}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Title} {\large ANALYSIS OF FILTER NETWORKS}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Objective}
\begin{itemize}
    \item To analyze the given Filter Networks.

\end{itemize}
%%%%%%%%%%%%%%%%%%%%%
\section{Requirement}

\subsection{MATLAB}

MATLAB stands for MATrix LABoratory. It is used to analyze and design systems and products.  Its built-in visuals make data visualization and analysis a breeze. Toolboxes are a type of application-specific solution available in MATLAB. Toolboxes are essential for most MATLAB users since they allow you to understand and use specific technologies.

\subsection{Proteus Design Suite}

Proteus is a simulation and design software tool developed by Labcenter Electronics for Electrical
and Electronic circuit design.It is used to create schematic  of a circuit and Visualization of its operation.

%%%%%%%%%%%%%%%%%%%

\section{Procedure}

With the help of MATLAB we plotted derived transfer function and using Proteus Design suite we simulate and plot the frequency response of the given circuit. Then we compared the two observation and also observed the effects of varying network components.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pagebreak

\section{Exercises:}

%%%%%%%%%%%%%%%%%%%%%%%%%1111111111111111111111111111111111111111

\begin{Q}
    {
        Derive the transfer function of each of the network and determine the nature of filter network; (i.e. whether it is lowpass, highpass, bandpass or bandstop) .
    }
\end{Q}

%%%%%%%%%%%%% 1A 1A 1A 1A 1A 1A 1A 1A 1A
\subsubsection{TF Derivation of Figure a}
\begin{figure}[H]
    \centering
    \figa \figas
    \caption{TF Derivation of Figure a}
\end{figure}

Using voltage divider rule,
\begin{equation*}
    \begin{aligned}
        V_2(s)                & =\frac{V_1(s).\frac{1}{sC}}{R+\frac{1}{sC}} \\
        \frac{V_2(s)}{V_1(s)} & =\frac{\frac{1}{sC}}{R+\frac{1}{sC}}        \\
        H(s)                  & =\frac{1}{sRC+1}
    \end{aligned}
\end{equation*}

The given circuit is \textbf{Low pass filter} as for lower frequency capacitor restricts currents flow through it because of high reactance, so voltage at $V_1$ is replicated $V_2$, but for higher frequency currents flows through capacitor due to low reactance, hence restricting the high frequency signal from $V_1$ to reach $V_2$.

%%%%%%%%%%%%% 1B 1B 1B 1B 1B 1B 1B 1B 1B 1B 1B
\subsubsection{TF Derivation of Figure b}
\begin{figure}[H]
    \centering
    \figb \figbs
    \caption{TF Derivation of Figure b}
\end{figure}

Using voltage divider rule,
\begin{equation*}
    \begin{aligned}
        V_2(s)                & =\frac{V_1(s).R}{R+\frac{1}{sC}} \\
        \frac{V_2(s)}{V_1(s)} & =\frac{sRC}{sRC+1}               \\
        H(s)                  & =\frac{sRC}{sRC+1}
    \end{aligned}
\end{equation*}

The given circuit is \textbf{High pass filter} as Capacitor allows higher frequency signal to pass through it, as it reduces the reactance, but blocks the low frequency signal because of high reactance.

%%%%%%%%%%%%% 1C% 1C% 1C% 1C% 1C% 1C% 1C% 1C% 1C% 1C% 1C% 1C% 1C% 1C
\subsubsection{TF Derivation of Figure c}
\begin{figure}[H]
    \centering
    \figc \figcs
    \caption{TF Derivation of Figure c}
\end{figure}

Using voltage divider rule,
\begin{equation*}
    \begin{aligned}
        V_2(s)                & =\frac{V_1(s).R}{R+\frac{1}{sC}+sL} \\
        \frac{V_2(s)}{V_1(s)} & =\frac{sRC}{s^2LC+sRC+1}            \\
        H(s)                  & =\frac{sRC}{s^2LC+sRC+1}
    \end{aligned}
\end{equation*}

The given circuit is \textbf{Band pass filter} as only limited range of frequency (Resonant frequency) is allowed. For other frequencies , due to high reactance of Inductor  at high frequency and Capacitor at low frequency,  is blocked.

%%%%%%%%%%%%% 1D  1D 1D 1D 1D 1D 1D 1D 1D 1D 1D 1D 1D
\subsubsection{TF Derivation of Figure d}
\begin{figure}[H]
    \centering
    \figd \figds
    \caption{TF Derivation of Figure d}
\end{figure}

Using voltage divider rule,
\begin{equation*}
    \begin{aligned}
        V_2(s)                & =\frac{V_1(s)\left(sL+\frac{1}{sC}\right)}{R+\frac{1}{sC}+sL} \\
        \frac{V_2(s)}{V_1(s)} & =\frac{s^2LC+1}{sC\left(R+\frac{1}{sC}+sL\right)}             \\
        H(s)                  & =\frac{s^2LC+1}{s^2LC+sRC+1}
    \end{aligned}
\end{equation*}

The given circuit is \textbf{Band stop filter} as it passes all other frequencies except the frequency in the resonant frequency range.

%%%%%%%%%%%%%  1E 1E 1E 1E 1E 1E 1E 1E 1E 1E 1E
\subsubsection{TF Derivation of Figure e}
\begin{figure}[H]
    \centering
    \fige \figes
    \caption{TF Derivation of Figure e}
\end{figure}

Using voltage divider rule,
\begin{equation*}
    \begin{aligned}
        V_2(s)                & =\frac{V_1(s)\left(\frac{1}{sC}\right)}{R+\frac{1}{sC}+sL} \\
        \frac{V_2(s)}{V_1(s)} & =\frac{1}{sC\left(R+\frac{1}{sC}+sL\right)}                \\
        H(s)                  & =\frac{1}{s^2LC+sRC+1}
    \end{aligned}
\end{equation*}

The given circuit is \textbf{Low pass filter} as for lower frequency inductor allows flow of current and  capacitor restricts currents flow through it because of high reactance  so voltage at $V_1$ is replicated at $V_2$, but for higher frequency currents flows through capacitor due to low reactance, restricting the high frequency signal from $V_1$ to reach $V_2$.

%%%%%%%%%%%%% 1F  1F 1F 1F 1F 1F 1F 1F 1F 1F 1F
\subsubsection{TF Derivation of Figure f}
\begin{figure}[H]
    \centering
    \figf \figfs
    \caption{TF Derivation of Figure f}
\end{figure}

Using voltage divider rule,
\begin{equation*}
    \begin{aligned}
        i_3                                  & =i_4                             \\
        \frac{V_a(s)-V_2(s)}{\frac{1}{sC_2}} & =\frac{V_2(s)}{R_2}              \\
        sR_2C_2V_a(s)                        & =V_2(s)(sR_2C_2+1)               \\
        V_a(s)                               & =V_2(s)\frac{sR_2C_2+1}{sR_2C_2}
    \end{aligned}
\end{equation*}

\begin{equation*}
    \begin{aligned}
        i_1=i_2+i_3 \Rightarrow \frac{V_1(s)-V_a(s)}{R_1} & =\frac{V_a(s)}{\frac{1}{sC_1}}+\frac{V_a(s)-V_2(s)}{\frac{1}{sC_2}} \\
        V_1(s)-V_a(s)                                     & =sR_1C_1V_a(s)+sR_1C_2V_a(s)-sR_1C_2V_2(s)                          \\
        V_1(s)                                            & =V_a(s)(sR_1C_1+sR_1C_2+1)-sR_1C_2V_2(s)
    \end{aligned}
\end{equation*}

Substituting value of $V_a(s)$,we get,

\begin{equation*}
    \begin{aligned}
        V_1(s)                & =V_2(s)\frac{sR_2C_2+1}{sR_2C_2}(sR_1C_1+sR_1C_2+1)-sR_1C_2V_2(s)   \\
        sR_2C_2V_1(s)         & =V_2(s)(s^2R_1R_2C_1C_2+s^2R_1R_2{C_2}^2+sR_2C_2+sR_1C_1+sR_1C_2+1) \\
                              & \quad \quad -s^2R_1R_2{C_2}^2V_2(s)                                 \\
        \frac{V_2(s)}{V_1(s)} & =\frac{sR_2C_2}{s^2R_1R_2C_1C_2+sR_1C_1+sR_1C_2+sR_2C_2+1}          \\
        H(s)                  & =\frac{sR_2C_2}{s^2R_1R_2C_1C_2+s(R_1C_1+R_1C_2+R_2C_2)+1}
    \end{aligned}
\end{equation*}

The given circuit is \textbf{Band pass filter} as the  circuit of Low pass and High Pass is combined as one. The low frequency signals from $V_1$ is allowed by Low pass circuit but is blocked by High pass. For high frequency signal Low pass circuit will block it.Thus only limited frequency colud pass through it.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagebreak
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%22222222222222222222222
\begin{Q}
    {
        Plot the magnitude and phase response of each network from the derived transfer function (using MATLAB or any tool) and note down the followings:
        \begin{itemize}
            \item Gain in passband
            \item Half power frequency/frequencies
            \item Bandwidth\\\\
                  Choose the element values as followings:
                  R = 1\si{\kilo\ohm}  , L = 1 \si{\milli\henry} ,
                  C = 0.1\si{\micro\farad} ,
                  R1 = 1 \si{\kilo\ohm} ,
                  C1 = 0.01\si{\micro\farad} ,
                  R2 = 10\si{\kilo\ohm} ,
                  C2 = 0.1\si{\micro\farad}.
        \end{itemize}}
\end{Q}

\subsubsection{MATLAB Codes}
\MAT{./CODES/bode_func.txt}{MATLAB Function for Bode Plot}
\MAT{./CODES/figa.txt}{MATLAB code to Bode Plot for Figure a}
\MAT{./CODES/figb.txt}{MATLAB code to Bode Plot for Figure b}
\MAT{./CODES/figc.txt}{MATLAB code to Bode Plot for Figure c}
\MAT{./CODES/figd.txt}{MATLAB code to Bode Plot for Figure d}
\MAT{./CODES/fige.txt}{MATLAB code to Bode Plot for Figure e}
\MAT{./CODES/figf.txt}{MATLAB code to Bode Plot for Figure f}

\subsubsection{MATLAB Observations}

\mobs{0.85}{a}{0}{1.59}{1.59}%%%%%%%%%%%%%%%%% Matlab observation Figure + table  aaaaaaaaa
\mobs{0.85}{b}{0}{1.59}{1.59}%%%%%%%%%%%%%%%%% Matlab observation Figure + table  bbbbbbbbbb
\mobs{0.85}{c}{0}{1.58 \& 160}{158.42}%%%%%%%%%%%%%%%%% Matlab observation Figure + table  cccccccccc
\mobs{0.85}{d}{0}{1.57 \& 161}{159.43}%%%%%%%%%%%%%%%%% Matlab observation Figure + table  ddddddddd
\mobs{0.85}{e}{0}{1.6}{1.6}%%%%%%%%%%%%%%%%% Matlab observation Figure + table  eeeeeee
\mobs{0.85}{f}{-0.907}{0.18 \& 14.1}{13.92}%%%%%%%%%%%%%%%%% Matlab observation Figure + table  fffffffffff

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%333333333333333333333333333
\begin{Q}
    {
        Observe the magnitude response of given filter networks by realizing the circuit using circuit simulation tools and note down the followings:
        \begin{itemize}
            \item Gain in passband
            \item Half power frequency/frequencies
            \item Bandwidth
        \end{itemize}
        Compare the result obtained in \textbf{activity 2}.\\\\
        Choose the element values as followings:
        R = 1\si{\kilo\ohm}  , L = 1 \si{\milli\henry} ,
        C = 0.1\si{\micro\farad} ,
        R1 = 1 \si{\kilo\ohm} ,
        C1 = 0.01\si{\micro\farad} ,
        R2 = 10\si{\kilo\ohm} ,
        C2 = 0.1\si{\micro\farad}.
    }
\end{Q}

\subsubsection{Proteus Observations}

The result obtained in both MATLAB and Proteus observations are almost similar.

\Porcirobs{0.85}{a}{0}{1.59}{1.59}%%%%%%%%%%%%%%%%% Proteus Circuit observation Figure + table  aaaaaaaaa
\Porcirobs{0.85}{b}{0}{1.60}{1.60}%%%%%%%%%%%%%%%%% Proteus Circuit observation Figure + table  bbbbbbbbbb
\Porcirobs{0.85}{c}{0}{1.58 \& 160}{158.42}%%%%%%%%%%%%%%%%% Proteus Circuit observation Figure + table  cccccccccc
\Porcirobs{0.85}{d}{0}{1.57 \& 161}{159.43}%%%%%%%%%%%%%%%%% Proteus Circuit observation Figure + table  ddddddddd
\Porcirobs{0.85}{e}{0}{1.6}{1.6}%%%%%%%%%%%%%%%%% Proteus Circuit observation Figure + table  eeeeeee
\Porcirobs{0.85}{f}{-0.907}{0.18 \& 14.1}{13.92}%%%%%%%%%%%%% Proteus Circuit observation Figure + table  ffffffff

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%44444444444444444444444444
\begin{Q}
    {
        Observe the effect in magnitude response of above networks by changing the element values as:
        \begin{itemize}
            \item When resistance is increased or decreased
            \item When inductance is increased or decreased
            \item When capacitance is increased or decreased
        \end{itemize}
        Comment on your results for each of the given filter network.
    }
\end{Q}

\subsubsection{Observation with varying component values}
Value of each component is varied to 25 and 75 percentage of original value  in both increasing and decreasing direction.

\varfig{a}{R}
\varfig{a}{C}

It is clear from the above plots that for decrease (25\%  \& 75\%) in value of resistance and capacitor in \textbf{figure a} has increased the half power frequency as well as bandwidth whereas for increase (25\% \& 75\%)  in value of resistance and capacitor both terms has decreased.Gain fot this \textbf{Low pass filter} remain constant i.e. zero  throughout the variation.

\varfig{b}{R}
\varfig{b}{C}

It is clear from the above plots that for decrease (25\%  \& 75\%) in value of resistance and capacitor in \textbf{figure b} has increased the half power frequency as well as bandwidth whereas for increase (25\% \& 75\%)  in value of resistance and capacitor both terms has decreased.Gain fot this \textbf{High pass filter} remain constant i.e. zero  throughout the variation.

\varfig{c}{R}

For decreasing values of Resistance, the first half power frequency has increased  but decreased the second half power frequency resulting in decreasing Bandwidth similarly, for increasing values of R the Bandwidth is also increasing.The gain remains constant i.e. zero  throughout the variation.

\varfig{c}{L}

For decreasing values of Inductance , the bandwidth is increasing as  second half power frequency keep on increasing but for increasing values ,the bandwidth is decreasing.The gain remains constant i.e. zero  throughout the variation.

\varfig{c}{C}
For decreasing values of Capacitance , the bandwidth is decreasing as first half power frequency keep on increasing , similarly for increasing values ,the bandwidth is increasing.The gain remains constant i.e. zero  throughout the variation.

\varfig{d}{R}
\varfig{d}{L}
\varfig{d}{C}

This \textbf{Band stop filter}  shows identical relationship  as in above \textbf{Band pass filter}.\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

For \textbf{figure e} i.e. \textbf{Low pass filter} variation in Resistance and Capacitance shows similar relation as shown by \textbf{Low pass filter} or \textbf{figure a} . For variation  in Inductance  almost no change is observed .\\

For \textbf{figure f} i.e. \textbf{Band pass filter} decrease in Resistance $R_1$ increase bandwidth but increasing it decreases the bandwidth, Similar result is obtained for capacitor $C_1$ and opposite result with $R_1$. For $C_2$ remain almost unchanged.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Conclusion}
In this Lab  we did Analysis of Filter Networks. We used MATLAB and Proteus  design suite to plot Transfer function  and design and plot frequency response for the circuit and also compared their observation. We also observe the effect of varying network component like resistor, capacitor and inductor in Gain, Half power frequency and Bandwidth.

\end {document}

max_stars_repo_path: Filter design/LAB3/old/Filter LAB 1 Amrit Prasad Phuyal.tex

max_stars_repo_name: amritphuyal/LATEX

max_issues_repo_path: Filter design/LAB1/Filter LAB 1 Amrit Prasad Phuyal.tex

max_issues_repo_name: amritphuyal/LATEX

max_forks_repo_name: amritphuyal/LATEX


text:
\chapter{{\tt IIheap}:
% \break (Integer Key, Integer Value) Heap}
(Key, Value) Heap}
\par
The {\tt IIheap} is a object that manages a heap of data.
Both the {\it key} and the {\it value} are of type {\tt int}.
The heap has fixed size, each item must be in {\tt [0,maxsize-1]},
where {\tt maxsize} is set on initialization.
The {\tt IIheap} object requires three vectors of size {\tt maxsize}.
Three methods are supported: {\it find\_min}, {\it insert} and {\it
delete} which take $O(1)$, $O(\log_2 n)$ and $O(\log_2 n)$ time,
respectively, where $n$ is the present size of the heap.

ext: tex

max_stars_repo_name: alleindrach/calculix-desktop

max_issues_repo_name: alleindrach/calculix-desktop

max_forks_repo_name: alleindrach/calculix-desktop


text:
\subsection{Covariance matrix}

With multiple events, covariance can be defined between each pair of events, including the event with itself.

The covariance between \(2\) variables is:

\(Cov(x_i,x_j):=E(x_ix_j)-E(x_i)E(x_j)\)

Which is equal to:

\(Cov(x_i,x_j)=E{[x_i-E(x_i)][x_j-E(x_j)]}\)

We can therefore generate a covariance matrix through:

\(\sum =E[(X-E[X])(X-E[X])^T]\)

max_stars_repo_name: adamdboult/nodeHomePage

max_issues_repo_name: adamdboult/nodeHomePage

max_forks_repo_name: adamdboult/nodeHomePage


text:
%-------------------------
% Resume in Latex
% Author : Sourabh Bajaj
% License : MIT
%------------------------

\documentclass[a4paper,11pt]{article}

\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage{upquote}
\usepackage[T1]{fontenc}

\pagestyle{fancy}
\fancyhf{} % clear all header and footer fields
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}

% Adjust margins
\addtolength{\oddsidemargin}{-0.375in}
\addtolength{\evensidemargin}{-0.375in}
\addtolength{\textwidth}{1in}
\addtolength{\topmargin}{-.5in}
\addtolength{\textheight}{1.0in}

\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}

% Sections formatting
\titleformat{\section}
{
  \vspace{-4pt}\scshape\raggedright\large
}
{}{0em}{}
[\titlerule \vspace{-5pt}]

%-------------------------
% Custom commands
\newcommand{\resumeItem}[1]{
  \item\small{#1 \vspace{-2pt}}
}

\newcommand{\resumeSubheading}[3]{
  \vspace{-1pt}\item
    \begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
      \textbf{#1} & #2
      \end{tabular*}
      \textit{\small#3}
}

\newcommand{\resumeMiniheading}[2]{
  \vspace{-1pt}\item
    \begin{tabular*}{0.97\textwidth}{l@{\extracolsep{\fill}}r}
      \textbf{#1} & #2
    \end{tabular*}
}

\newcommand{\resumeSubItem}[2]{\resumeItem{#1}{#2}\vspace{-4pt}}

\renewcommand{\labelitemii}{$\circ$}

\newcommand{\resumeSubHeadingListStart}{\begin{itemize}[leftmargin=*, itemsep=6pt]}
\newcommand{\resumeSubHeadingListEnd}{\end{itemize}}

\newcommand{\resumeItemListStart}{\begin{itemize}[leftmargin=*, topsep=0ex]}
\newcommand{\resumeItemListEnd}{\end{itemize}}

%-------------------------------------------
%%%%%%  CV STARTS HERE  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%----------HEADING-----------------
\begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}
  \textbf{\Large Weichen Ke} & Email: weichenzero@gmail.com\\
  http://darkforte.github.io & Mobile: +86 185-1184-1030 \\
\end{tabular*}

%-----------EDUCATION-----------------
\section{Education}
  \begin{itemize}[leftmargin=*, itemsep=-2pt]
    \resumeSubheading
      {Peking University, Ph.D. student}{2016.09 -- Present}
      {GPA: 3.85/4.0, TA of Algorithm Analysis and Complexity Theories}
    \resumeSubheading
      {Beijing University of Technology, Bachelor in Computer Science}{2012.09 -- 2016.07}
      {GPA: 3.93/4.0, Rank: 1/44, TOEFL: 112 (Speaking 26), GRE: 329+4.5 (Q 170)}
  \end{itemize}

  %\resumeSubHeadingListEnd

%-----------EXPERIENCE-----------------
\section{Experience}
  \resumeSubHeadingListStart

    \resumeSubheading
      {Didi Research}{2017.07 -- Present}
      {Research Intern at Big Data Strategy Group}
      \resumeItemListStart
        \resumeItem
        {Designed a strategy of order dispatching with reinforcement learning, which boosted \$20k in daily total driver income and 3\% in order finish rate in simulations.}
        \resumeItem
        {Designed and trained a DQN with Keras and learned a value function estimator for order-driver pairs.}
        \resumeItem
        {Constructed pipeline of spatiotemporal features using Hive on PySpark.}
        \resumeItem
        {Organized and presented several company-wide tutorials on deep RL topics like A3C, TRPO, and DDPG etc.}
      \resumeItemListEnd

    \resumeSubheading
      {Microsoft Research Asia}{2015.07 -- 2016.07}
      {Research Intern at Software Analytics Group}
      \resumeItemListStart
        \resumeItem
        {Leader of project BigIn4, the big data analyzing backend of Quick Insights in Microsoft Power BI.}
        \resumeItem
        {Proposed a novel algorithm for interactive approximate query processing on big data based on Tree Augmented Bayesian Network, and implemented it on Spark with Scala and Java.}
        \resumeItem
        {Deployed the platform to production cluster running on Hadoop, and analyzed more than 1TB data per day.}
        \resumeItem
        {Constructed preprocessing pipeline for complex structural data with SparkSQL.}
      \resumeItemListEnd
  \resumeSubHeadingListEnd

%-----------PUBLICATIONS-----------------
\section{Publication}
  \resumeItemListStart
    \resumeItem
    {Qingwei Lin, \textbf{Weichen Ke}, Jian-Guang Lou, Hongyu Zhang, Kaixin Sui, Yong Xu, Ziyi Zhou, Bo Qiao, Dongmei Zhang. "BigIN4: Instant, Interactive Insight Identification for Multi-Dimensional Big Data", In Proceedings of \textbf{SIGKDD} 2018 (Submitted) }
  \resumeItemListEnd

%-----------AWARDS-----------------
\section{Awards}
  \begin{itemize}[leftmargin=*, itemsep=-12pt]
    \resumeMiniheading{"Star of Tomorrow" Title {\normalfont(For MSRA interns with outstanding performance)}}{2016}
    \resumeMiniheading{Silver Medal of EC-Final Round of ACM-ICPC contest}{2015}
    \resumeMiniheading{IBM Scholarship and National Scholarship {\normalfont(For top 3 students in the dept.)}}{2013 -- 2014}
    \resumeMiniheading{Global Rank 18/1000\texttt{+}, China Rank 2/50\texttt{+} in IEEExtreme Programming Contest}{2013}
    \resumeMiniheading{Meritorious Winner of MCM}{2013}
  \end{itemize}

%-----------PROJECTS-----------------
\section{Projects}
  \resumeSubHeadingListStart
    \resumeMiniheading{Flappy Bird AI based on Deep Reinforcement Learning with Raw Pixels Input}{2017.06}
        \resumeItemListStart
            \resumeItem {Designed the network architecture (combined actor and value convolution network) with Tensorflow.}
            \resumeItem {Implemented A3C algorithm from scratch, with asynchronous exploration and model updating using Python.}
            \resumeItem {Applied frame stacking and background removal that leads to faster convergence and better results.}
        \resumeItemListEnd
        {\small The AI achieved human-level performance after self-playing for 4 hours on a single GPU.}

    \resumeMiniheading{Parameter Server based on C\texttt{++} and MPI}{2017.06}
        \resumeItemListStart
            \resumeItem {Designed the master-coordinator-worker architecture and the communication protocol with Protobuf.}
            \resumeItem {Implemented the architecture with MPI that supports adding/removing workers dynamically.}
            \resumeItem {Implemented sparse parameter transmission to reduce messaging overhead.}
        \resumeItemListEnd
        {\small The PS can train 1 million parameters with 2GB data in 20 seconds with 4 workers running on 4 machines.}

    \resumeMiniheading{Real-time Online Game: “Bomber Man Online” on C\texttt{++} and Direct2D}{2015.04}
        \resumeItemListStart
            \resumeItem {Designed messaging protocol under IOCP and managed development process with Git.}
            \resumeItem {Implemented the game core from scratch and efficient game data access using STL with Visual Studio.}
            \resumeItem {Implemented lockstep multiplayer synchronization model with a mutex based thread scheduler.}
        \resumeItemListEnd
        {\small The game runs steadily at 60 fps and achieved synchronized gameplay experience among players.}

  \resumeSubHeadingListEnd

%
%--------PROGRAMMING SKILLS------------
%\section{Programming Skills}
%  \resumeSubHeadingListStart
%    \item{
%      \textbf{Languages}{: Scala, Python, Javascript, C++, SQL, Java}
%      \hfill
%      \textbf{Technologies}{: AWS, Play, React, Kafka, GCE}
%    }
%  \resumeSubHeadingListEnd

%-------------------------------------------
\end{document}

max_stars_repo_name: DarkForte/Resume-Overleaf

max_issues_repo_name: DarkForte/Resume-Overleaf

max_forks_repo_name: DarkForte/Resume-Overleaf


text:
\documentclass[10pt,ignorenonframetext,,aspectratio=149]{beamer}
\usefonttheme{serif} % use mainfont rather than sansfont for slide text
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{caption label separator}{: }
\setbeamercolor{caption name}{fg=normal text.fg}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
\else % if luatex or xelatex
  \ifxetex
    \usepackage{mathspec}
  \else
    \usepackage{fontspec}
  \fi
  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
  \newcommand{\euro}{€}
    \setmainfont[]{Open Sans}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\usepackage{framed}
\definecolor{shadecolor}{RGB}{248,248,248}
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.94,0.16,0.16}{#1}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.77,0.63,0.00}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
\newcommand{\BuiltInTok}[1]{#1}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.64,0.00,0.00}{\textbf{#1}}}
\newcommand{\ExtensionTok}[1]{#1}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\ImportTok}[1]{#1}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{#1}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{#1}}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
\newcommand{\RegionMarkerTok}[1]{#1}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight0.8\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}

% Comment these out if you don't want a slide with just the
% part/section/subsection/subsubsection title:
\AtBeginPart{
  \let\insertpartnumber\relax
  \let\partname\relax
  \frame{\partpage}
}
\AtBeginSection{
  \let\insertsectionnumber\relax
  \let\sectionname\relax
  \frame{\sectionpage}
}
\AtBeginSubsection{
  \let\insertsubsectionnumber\relax
  \let\subsectionname\relax
  \frame{\subsectionpage}
}

\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}

\title{Visualisasi data menggunakan R}
\subtitle{(A Subtitle Would Go Here if This Were a Class)}
\author{Ujang Fahmi}
\date{}

%% Here's everything I added.
%%--------------------------

\usepackage{graphicx}
\usepackage{rotating}
%\setbeamertemplate{caption}[numbered]
\usepackage{hyperref}
\usepackage{caption}
\usepackage[normalem]{ulem}
%\mode<presentation>
\usepackage{wasysym}
%\usepackage{amsmath}

% Get rid of navigation symbols.
%-------------------------------
\setbeamertemplate{navigation symbols}{}

% Optional institute tags and titlegraphic.
% Do feel free to change the titlegraphic if you don't want it as a Markdown field.
%----------------------------------------------------------------------------------
\institute{Pelajaran ke-4}

% \titlegraphic{\includegraphics[width=0.3\paperwidth]{\string~/Dropbox/teaching/clemson-academic.png}} % <-- if you want to know what this looks like without it as a Markdown field.
% -----------------------------------------------------------------------------------------------------
\titlegraphic{\includegraphics[width=0.3\paperwidth]{styles/sadasa.png}}

% Some additional title page adjustments.
%----------------------------------------
\setbeamertemplate{title page}[empty]
%\date{}
\setbeamerfont{subtitle}{size=\small}

\setbeamercovered{transparent}

% Some optional colors. Change or add as you see fit.
%---------------------------------------------------
\definecolor{clemsonpurple}{HTML}{522D80}
 \definecolor{clemsonorange}{HTML}{F66733}
\definecolor{uiucblue}{HTML}{003C7D}
\definecolor{uiucorange}{HTML}{F47F24}

% Some optional color adjustments to Beamer. Change as you see fit.
%------------------------------------------------------------------
\setbeamercolor{frametitle}{fg=clemsonpurple,bg=white}
\setbeamercolor{title}{fg=clemsonpurple,bg=white}
\setbeamercolor{local structure}{fg=clemsonpurple}
\setbeamercolor{section in toc}{fg=clemsonpurple,bg=white}
% \setbeamercolor{subsection in toc}{fg=clemsonorange,bg=white}
\setbeamercolor{footline}{fg=clemsonpurple!50, bg=white}
\setbeamercolor{block title}{fg=clemsonorange,bg=white}

\let\Tiny=\tiny

% Sections and subsections should not get their own damn slide.
%--------------------------------------------------------------
\AtBeginPart{}
\AtBeginSection{}
\AtBeginSubsection{}
\AtBeginSubsubsection{}

% Suppress some of Markdown's weird default vertical spacing.
%------------------------------------------------------------
\setlength{\emergencystretch}{0em}  % prevent overfull lines
\setlength{\parskip}{0pt}

% Allow for those simple two-tone footlines I like.
% Edit the colors as you see fit.
%--------------------------------------------------
\defbeamertemplate*{footline}{my footline}{%
    \ifnum\insertpagenumber=1
    \hbox{%
        \begin{beamercolorbox}[wd=\paperwidth,ht=.8ex,dp=1ex,center]{}%
      % empty environment to raise height
        \end{beamercolorbox}%
    }%
    \vskip0pt%
    \else%
        \Tiny{%
            \hfill%
		\vspace*{1pt}%
            \insertframenumber/\inserttotalframenumber \hspace*{0.1cm}%
            \newline%
            \color{clemsonpurple}{\rule{\paperwidth}{0.4mm}}\newline%
            \color{clemsonorange}{\rule{\paperwidth}{.4mm}}%
        }%
    \fi%
}

% Various cosmetic things, though I must confess I forget what exactly these do and why I included them.
%-------------------------------------------------------------------------------------------------------
\setbeamercolor{structure}{fg=blue}
\setbeamercolor{local structure}{parent=structure}
\setbeamercolor{item projected}{parent=item,use=item,fg=clemsonpurple,bg=white}
\setbeamercolor{enumerate item}{parent=item}

% Adjust some item elements. More cosmetic things.
%-------------------------------------------------
\setbeamertemplate{itemize item}{\color{clemsonpurple}$\bullet$}
\setbeamertemplate{itemize subitem}{\color{clemsonpurple}\scriptsize{$\bullet$}}
\setbeamertemplate{itemize/enumerate body end}{\vspace{.6\baselineskip}} % So I'm less inclined to use \medskip and \bigskip in Markdown.

% Automatically center images
% ---------------------------
% Note: this is for ![](image.png) images
% Use "fig.align = "center" for R chunks

\usepackage{etoolbox}

\AtBeginDocument{%
  \letcs\oig{@orig\string\includegraphics}%
  \renewcommand<>\includegraphics[2][]{%
    \only#3{%
      {\centering\oig[{#1}]{#2}\par}%
    }%
  }%
}

% I think I've moved to xelatex now. Here's some stuff for that.
% --------------------------------------------------------------
% I could customize/generalize this more but the truth is it works for my circumstances.

\ifxetex
\setbeamerfont{title}{family=\fontspec{Titillium Web}}
\setbeamerfont{frametitle}{family=\fontspec{Titillium Web}}
\usepackage[font=small,skip=0pt]{caption}
 \else
 \fi

% Okay, and begin the actual document...

\begin{document}
\frame{\titlepage}

\begin{frame}
Salam kenal dan selamat datang.

Semoga kita semua bisa saling berbagi pengalaman dan pengetahuan. Saya
adalah Ujang Fahmi, Co-founder dan mentor Sadasa Academy.

\vspace{0.1in}

Jika anda berada dan sedang membaca tutorial ini, maka kemungkinan anda
adalah orang yang sedang ingin belajar data sains, atau mungkin
ditugaskan untuk mempelajari R oleh institusi atau organisasi anda. Sama
seperti saya dulu, dimana tanpa latar belakang enginering saya
didiharuskan untuk belajar R, demi menyelesaikan tugas akhir dan
akhirnya jadilah seperti saya sekarang ini.

\vspace{0.1in}

Satu hal yang pasti, ini adalah langkah pertama dari banyak langkah yang
harus dilalui, entah melalui lembaga resmi atau belajar secara mandiri.
Jadi selamat belajar!!!

\vspace{0.1in}

Ujang Fahmi,

Yogyakarta, 2021-09-23

\vspace{0.1in}

\emph{Materi yang disampaikan disimpan dan dokumentasikan}
\href{https://github.com/eppofahmi/belajaR/tree/master/upn-surabaya}{\textbf{disini}}
\end{frame}

\hypertarget{menggunakan-ggplot}{%
\section{\texorpdfstring{Menggunakan
\texttt{ggplot}}{Menggunakan ggplot}}\label{menggunakan-ggplot}}

\hypertarget{apa-gg-dalam-ggplot}{%
\subsection{\texorpdfstring{Apa \texttt{gg} dalam
\texttt{ggplot}?}{Apa gg dalam ggplot?}}\label{apa-gg-dalam-ggplot}}

\hypertarget{menyiapkan-data}{%
\subsection{Menyiapkan data}\label{menyiapkan-data}}

\hypertarget{menentukan-sumu-x-y-dan-z}{%
\subsection{Menentukan sumu x, y dan
z}\label{menentukan-sumu-x-y-dan-z}}

\hypertarget{memilih-jenis-plot}{%
\subsection{Memilih jenis plot}\label{memilih-jenis-plot}}

\hypertarget{menyimpan-plot}{%
\subsection{Menyimpan plot}\label{menyimpan-plot}}

\hypertarget{memperbaiki-tampilan-plot}{%
\subsection{Memperbaiki tampilan plot}\label{memperbaiki-tampilan-plot}}

\begin{frame}{Memilih tema}
\protect\hypertarget{memilih-tema}{}
\end{frame}

\begin{frame}{Menukar posisi x dan y}
\protect\hypertarget{menukar-posisi-x-dan-y}{}
\end{frame}

\begin{frame}{Mengatur warna kustom}
\protect\hypertarget{mengatur-warna-kustom}{}
\end{frame}

\begin{frame}{Menambahkan teks}
\protect\hypertarget{menambahkan-teks}{}
\end{frame}

\hypertarget{jenis-plot}{%
\section{Jenis Plot}\label{jenis-plot}}

\begin{frame}{Jenis Plot}
\begin{figure}
\centering
\includegraphics{images/data-chart-type.png}
\caption{Jenis polot yang umum digunakan}
\end{figure}
\end{frame}

\hypertarget{plot-distribusi}{%
\subsection{Plot Distribusi}\label{plot-distribusi}}

\begin{frame}{Plot Distribusi}
\begin{quote}
Plot distribusi biasanya dibuat menggunakan baris/line untuk menunjukkan
perubahan nilai dalam sebuah rentang data.
\end{quote}
\end{frame}

\begin{frame}[fragile]{Line Plot}
\protect\hypertarget{line-plot}{}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
\begin{Shaded}
\begin{Highlighting}[]
\FunctionTok{library}\NormalTok{(tidyverse)}

\NormalTok{df1 }\OtherTok{=} \FunctionTok{sample\_n}\NormalTok{(economics\_long, }\DecValTok{100}\NormalTok{)}
\NormalTok{df1 }\SpecialCharTok{\%\textgreater{}\%}
   \FunctionTok{ggplot}\NormalTok{(}\FunctionTok{aes}\NormalTok{(}\AttributeTok{x =}\NormalTok{ date, }
              \AttributeTok{y =}\NormalTok{ value, }
              \AttributeTok{color =}\NormalTok{ variable)) }\SpecialCharTok{+}
   \FunctionTok{geom\_line}\NormalTok{()}
\end{Highlighting}
\end{Shaded}
\end{column}

\begin{column}{0.5\textwidth}
Contoh plot line:

\includegraphics{figs/unnamed-chunk-2.pdf}
\end{column}
\end{columns}
\end{frame}

\begin{frame}[fragile]{Box-plot}
\protect\hypertarget{box-plot}{}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{mtcars }\SpecialCharTok{\%\textgreater{}\%}
   \FunctionTok{ggplot}\NormalTok{(}\FunctionTok{aes}\NormalTok{(}\AttributeTok{x=}\FunctionTok{as.factor}\NormalTok{(cyl), }
              \AttributeTok{y=}\NormalTok{mpg)) }\SpecialCharTok{+}
    \FunctionTok{geom\_boxplot}\NormalTok{(}\AttributeTok{fill=}\StringTok{"slateblue"}\NormalTok{, }
                 \AttributeTok{alpha=}\FloatTok{0.2}\NormalTok{) }\SpecialCharTok{+}
    \FunctionTok{xlab}\NormalTok{(}\StringTok{"cyl"}\NormalTok{)}
\end{Highlighting}
\end{Shaded}
\end{column}

\begin{column}{0.5\textwidth}
Contoh boxplot:

\includegraphics{figs/unnamed-chunk-4.pdf}
\end{column}
\end{columns}
\end{frame}

\begin{frame}[fragile]{Histogram}
\protect\hypertarget{histogram}{}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
\begin{Shaded}
\begin{Highlighting}[]
\FunctionTok{library}\NormalTok{(hrbrthemes)}

\NormalTok{data }\OtherTok{\textless{}{-}}\NormalTok{ mtcars}

\NormalTok{data }\SpecialCharTok{\%\textgreater{}\%}
  \FunctionTok{ggplot}\NormalTok{(}\FunctionTok{aes}\NormalTok{(}\AttributeTok{x=}\NormalTok{mpg)) }\SpecialCharTok{+}
    \FunctionTok{geom\_histogram}\NormalTok{(}\AttributeTok{binwidth=}\DecValTok{5}\NormalTok{, }
                   \AttributeTok{fill=}\StringTok{"\#69b3a2"}\NormalTok{, }
                   \AttributeTok{color=}\StringTok{"\#e9ecef"}\NormalTok{, }
                   \AttributeTok{alpha=}\FloatTok{0.9}\NormalTok{) }\SpecialCharTok{+}
    \FunctionTok{ggtitle}\NormalTok{(}\StringTok{"Bin size = 5"}\NormalTok{)}
\end{Highlighting}
\end{Shaded}
\end{column}

\begin{column}{0.5\textwidth}
Contoh histogram:

\includegraphics{figs/unnamed-chunk-6.pdf}
\end{column}
\end{columns}
\end{frame}

\hypertarget{plot-perbandingan}{%
\subsection{Plot Perbandingan}\label{plot-perbandingan}}

\begin{frame}[fragile]{Bar}
\protect\hypertarget{bar}{}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{df }\OtherTok{\textless{}{-}} \FunctionTok{data.frame}\NormalTok{(}
   \AttributeTok{dose=}\FunctionTok{c}\NormalTok{(}\StringTok{"D0.5"}\NormalTok{, }\StringTok{"D1"}\NormalTok{, }\StringTok{"D2"}\NormalTok{),}
   \AttributeTok{len=}\FunctionTok{c}\NormalTok{(}\FloatTok{4.2}\NormalTok{, }\DecValTok{10}\NormalTok{, }\FloatTok{29.5}\NormalTok{))}

\NormalTok{df }\SpecialCharTok{\%\textgreater{}\%}
   \FunctionTok{ggplot}\NormalTok{(}\FunctionTok{aes}\NormalTok{(}\AttributeTok{x=}\NormalTok{dose, }\AttributeTok{y=}\NormalTok{len)) }\SpecialCharTok{+}
   \FunctionTok{geom\_bar}\NormalTok{(}\AttributeTok{stat=}\StringTok{"identity"}\NormalTok{)}
\end{Highlighting}
\end{Shaded}
\end{column}

\begin{column}{0.5\textwidth}
Contoh bar:

\includegraphics{figs/unnamed-chunk-8.pdf}
\end{column}
\end{columns}
\end{frame}

\begin{frame}[fragile]{Column}
\protect\hypertarget{column}{}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{df2 }\OtherTok{\textless{}{-}} \FunctionTok{data.frame}\NormalTok{(}
   \AttributeTok{supp=}\FunctionTok{rep}\NormalTok{(}\FunctionTok{c}\NormalTok{(}\StringTok{"VC"}\NormalTok{, }\StringTok{"OJ"}\NormalTok{), }\AttributeTok{each=}\DecValTok{3}\NormalTok{),}
   \AttributeTok{dose=}\FunctionTok{rep}\NormalTok{(}\FunctionTok{c}\NormalTok{(}\StringTok{"D0.5"}\NormalTok{, }\StringTok{"D1"}\NormalTok{, }\StringTok{"D2"}\NormalTok{),}\DecValTok{2}\NormalTok{),}
   \AttributeTok{len=}\FunctionTok{c}\NormalTok{(}\FloatTok{6.8}\NormalTok{, }\DecValTok{15}\NormalTok{, }\DecValTok{33}\NormalTok{, }\FloatTok{4.2}\NormalTok{, }\DecValTok{10}\NormalTok{, }\FloatTok{29.5}\NormalTok{))}

\NormalTok{df2 }\SpecialCharTok{\%\textgreater{}\%}
   \FunctionTok{ggplot}\NormalTok{(}\FunctionTok{aes}\NormalTok{(}\AttributeTok{x=}\NormalTok{dose, }
              \AttributeTok{y=}\NormalTok{len, }
              \AttributeTok{fill=}\NormalTok{supp)) }\SpecialCharTok{+}
   \FunctionTok{geom\_col}\NormalTok{(}\AttributeTok{position=}\FunctionTok{position\_dodge}\NormalTok{())}\SpecialCharTok{+}
   \FunctionTok{geom\_text}\NormalTok{(}\FunctionTok{aes}\NormalTok{(}\AttributeTok{label=}\NormalTok{len), }
            \AttributeTok{vjust=}\FloatTok{1.6}\NormalTok{, }
            \AttributeTok{color=}\StringTok{"white"}\NormalTok{,}
            \AttributeTok{position =} \FunctionTok{position\_dodge}\NormalTok{(}\FloatTok{0.9}\NormalTok{),}
            \AttributeTok{size=}\FloatTok{3.5}\NormalTok{)}\SpecialCharTok{+}
   \FunctionTok{scale\_fill\_brewer}\NormalTok{(}\AttributeTok{palette=}\StringTok{"Paired"}\NormalTok{)}\SpecialCharTok{+}
   \FunctionTok{theme\_minimal}\NormalTok{()}
\end{Highlighting}
\end{Shaded}
\end{column}

\begin{column}{0.5\textwidth}
Contoh column:

\includegraphics{figs/unnamed-chunk-10.pdf}
\end{column}
\end{columns}
\end{frame}

\hypertarget{plot-hubungan}{%
\subsection{Plot Hubungan}\label{plot-hubungan}}

\begin{frame}[fragile]{Plot Hubungan}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{mtcars }\SpecialCharTok{\%\textgreater{}\%}
   \FunctionTok{ggplot}\NormalTok{(}\FunctionTok{aes}\NormalTok{(}\AttributeTok{x =}\NormalTok{ mpg, }
              \AttributeTok{y =}\NormalTok{ drat)) }\SpecialCharTok{+}
   \FunctionTok{geom\_point}\NormalTok{(}
      \FunctionTok{aes}\NormalTok{(}
         \AttributeTok{color =}
            \FunctionTok{factor}\NormalTok{(gear)}
\NormalTok{         )}
\NormalTok{      )}
\end{Highlighting}
\end{Shaded}
\end{column}

\begin{column}{0.5\textwidth}
Contoh plot hubungan:

\includegraphics{figs/unnamed-chunk-12.pdf}
\end{column}
\end{columns}
\end{frame}

\hypertarget{plot-komposisi}{%
\subsection{Plot Komposisi}\label{plot-komposisi}}

\begin{frame}[fragile]{Pie chart dasar}
\protect\hypertarget{pie-chart-dasar}{}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{data }\OtherTok{\textless{}{-}} \FunctionTok{data.frame}\NormalTok{(}
  \AttributeTok{group=}\NormalTok{LETTERS[}\DecValTok{1}\SpecialCharTok{:}\DecValTok{5}\NormalTok{],}
  \AttributeTok{value=}\FunctionTok{c}\NormalTok{(}\DecValTok{13}\NormalTok{,}\DecValTok{7}\NormalTok{,}\DecValTok{9}\NormalTok{,}\DecValTok{21}\NormalTok{,}\DecValTok{2}\NormalTok{)}
\NormalTok{)}

\CommentTok{\# Basic piechart}
\NormalTok{data }\SpecialCharTok{\%\textgreater{}\%}
   \FunctionTok{ggplot}\NormalTok{(}\FunctionTok{aes}\NormalTok{(}\AttributeTok{x=}\StringTok{""}\NormalTok{,}
              \AttributeTok{y=}\NormalTok{value,}
              \AttributeTok{fill=}\NormalTok{group)) }\SpecialCharTok{+}
   \FunctionTok{geom\_bar}\NormalTok{(}\AttributeTok{stat=}\StringTok{"identity"}\NormalTok{, }
            \AttributeTok{width=}\DecValTok{1}\NormalTok{) }\SpecialCharTok{+}
   \FunctionTok{coord\_polar}\NormalTok{(}\StringTok{"y"}\NormalTok{, }\AttributeTok{start=}\DecValTok{0}\NormalTok{)}
\end{Highlighting}
\end{Shaded}
\end{column}

\begin{column}{0.5\textwidth}
Contoh pie plot 1:

\includegraphics{figs/unnamed-chunk-14.pdf}
\end{column}
\end{columns}
\end{frame}

\begin{frame}[fragile]{Memperbaiki pie chart 1}
\protect\hypertarget{memperbaiki-pie-chart-1}{}
\begin{columns}[T]
\begin{column}{0.5\textwidth}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{data }\SpecialCharTok{\%\textgreater{}\%}
   \FunctionTok{ggplot}\NormalTok{(}\FunctionTok{aes}\NormalTok{(}\AttributeTok{x=}\StringTok{""}\NormalTok{, }
              \AttributeTok{y=}\NormalTok{value, }
              \AttributeTok{fill=}\NormalTok{group)) }\SpecialCharTok{+}
   \FunctionTok{geom\_bar}\NormalTok{(}\AttributeTok{stat=}\StringTok{"identity"}\NormalTok{, }
            \AttributeTok{width=}\DecValTok{1}\NormalTok{, }
            \AttributeTok{color=}\StringTok{"white"}\NormalTok{) }\SpecialCharTok{+}
   \FunctionTok{coord\_polar}\NormalTok{(}\StringTok{"y"}\NormalTok{, }\AttributeTok{start=}\DecValTok{0}\NormalTok{) }\SpecialCharTok{+}
   \FunctionTok{theme\_void}\NormalTok{()}
\end{Highlighting}
\end{Shaded}
\end{column}

\begin{column}{0.5\textwidth}
Contoh pie chart 2:

\includegraphics{figs/unnamed-chunk-16.pdf}
\end{column}
\end{columns}
\end{frame}

\begin{frame}{Memperbaiki pie chart 2}
\protect\hypertarget{memperbaiki-pie-chart-2}{}
\includegraphics{figs/unnamed-chunk-17.pdf}
\end{frame}

\hypertarget{your-turn}{%
\section{Your Turn}\label{your-turn}}

\begin{frame}{Your Turn}
\begin{enumerate}
\tightlist
\item
  Membuat plot perbandingan
\item
  Membuat plot komposisi
\item
  Membuat plot hubungan
\item
  Membuat plot distribusi
\end{enumerate}
\end{frame}

\section[]{}
\frame{\small \frametitle{Table of Contents}
\tableofcontents}
\end{document}

max_stars_repo_name: eppofahmi/belajaR

max_issues_repo_name: eppofahmi/belajaR

max_forks_repo_name: eppofahmi/belajaR