<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>stesiam</title>
<link>https://stesiam.com/posts/</link>
<atom:link href="https://stesiam.com/posts/index.xml" rel="self" type="application/rss+xml"/>
<description>A collection of English notebooks. Everything that includes coding in R or in other data analysis programming language (such as Python or Julia) will be listed here. Articles that has a general purpose has also a place in here.</description>
<generator>quarto-1.8.26</generator>
<lastBuildDate>Sun, 23 Jul 2023 00:00:00 GMT</lastBuildDate>
<item>
  <title>Statistics of Statistics’ Graduates</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/eda-graduates-of-statistics/</link>
  <description><![CDATA[ <section id="introduction" class="level2"><h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>Frequent updates should be expected until this note be erased.</p>
</div>
</div>
<p>The recent study guide includes data about the graduates and their average grade of graduation over the years. First and foremost the data we are interested in are included in table form (which is good 😀) but it is part of a pdf file (which is not good 😢). Thankfully, <strong>tabulizer</strong> is the solution to this kind of problems, as it one of its various features is to extract tabular data from pdf files.</p>
</section><section id="load-packages" class="level2"><h2 class="anchored" data-anchor-id="load-packages">Load Packages</h2>
<p>As I will extract tables from a pdf file, I will definitely need <code>tabulizer</code> package. Unfortunately, I was not able to install the specific package, as I was getting an error similar to this <a href="https://github.com/ropensci/tabulizer/issues/157">one</a>. This issue seems to be related to rJava package and <a href="https://github.com/s-u/rJava/issues/255#issuecomment-794473988">this comment</a> solved the issue. After installing <code>rJava</code>, I was able to install successfully tabulizer as below:</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#remotes::install_github(c("ropensci/tabulizerjars", "ropensci/tabulizer"))</span></span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org">tidyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/">reactable</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="http://www.rforge.net/rJava/">rJava</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://docs.ropensci.org/tabulapdf/">tabulapdf</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://ropensci.r-universe.dev/pdftools">pdftools</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="extract-data" class="level2"><h2 class="anchored" data-anchor-id="extract-data">Extract Data</h2>
<p>The study guide gives a general description of the university, as well as the prerequisites for a degree and a detailed description of each course. In total, the guide is a little bit less than 200 pages! Of course we don’t need My main source of data is the Department’s study guide. The most recent one (2022) has data on admissions, graduations etc., since 2004. The study guide gives a general description of the university, as well as the prerequisites for a degree and a detailed description of each course. In total, the guide is a little bit less than 200 pages! Of course we don’t need everything in there. I am just interested on the tables of the last pages, so I will extract those pages first from the original pdf.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># url = "https://www.unipi.gr/faculty/mbouts/anak/OS_22_23.pdf"</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># download.file(url, </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#               destfile = "sg22.pdf",</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#               method = "wget",</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#               extra = "--no-check-certificate")</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://docs.ropensci.org/qpdf/reference/qpdf.html">pdf_subset</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'sg22.pdf'</span>,</span>
<span>  pages <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">186</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">190</span>,  output <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subset.pdf"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<p>So, we extracted the pages which we are interested in. Let’s take a look at them:</p>
<p>Thankfully, tabulizer comes with a very handy function to extract all the tables from a PDF file. Yeap, I know the original study guide is written in greek but don’t worry that’s just to take a basic understanding of how the pdf and the tables look. I will translate the column names when I will work with the data. But look at the bright side. At least we will get a notebook with ggplot2 visualizations as an alternative of those Excel graphs :)</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistics_tables</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://docs.ropensci.org/tabulapdf/reference/extract_tables.html">extract_tables</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    file   <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subset.pdf"</span>, </span>
<span>    method <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"decide"</span>, </span>
<span>    output <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"tibble"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output cell-output-stderr">
<pre><code>New names:
New names:
New names:
New names:
New names:
• `` -&gt; `...1`</code></pre>
</div>
</div>
<p>Extracting the tables from splitted PDF I get a list of 5 tables with my data. It’s amazing that in a matter of seconds I get all the information in a format ready for analysis. If I were to write them the traditional way (copy-paste) it would definitely take me an hour.</p>
</section><section id="admitted-students" class="level2"><h2 class="anchored" data-anchor-id="admitted-students">Admitted students</h2>
<p>So, in Greece there is 1 standard way to be admitted to a university. Although there are 3 more ways which require some certain conditions. I will try to explain them as simple as possible.</p>
<section id="main-exams" class="level3"><h3 class="anchored" data-anchor-id="main-exams">Main Exams</h3>
<p>Once a year, third-year high school students from all over Greece take exams on the same subjects at the same time. The exams are known as <strong>Panhellenic Exams</strong>. Until today, it’s one of the few things in Greece that as its integrity is not disputed, as the papers of students are getting graded by teachers from other areas. However, it has also faced considerable criticism for the pressure it places on students. In my opinion a fair one as everything in your life is depending on these exams… If you fail you should wait to retake them next year.</p>
<p>Typically the exams are being held between the second half of May and the first week of June. The students’ grades are getting published approximately either the end of June or the first days of July. Then you are completing a list on which you are declare which departments you are interested to. On the end of July the minimum grades to be admitted for each department are announced. Those can fluctuate significantly every year as they are depending on both students’ performance on the Exams and the difficulty of the exams.</p>
<p>In a nutchell, the departments from big cities like Attica (Athens, Piraeus) and Thessaloniki have the biggest demand and so the minimum grades for those are higher from the rest ones. For example, the Statistics Department in Piraeus had a minimum grade of 11700 in 2019 (for simplicity consider it like 11.7/20). The corresponding department of Statistics in University of Aegean the same year had a minimum grade of 5100 (5.1/20) (yes, that’s not a typo). Well there are many reasons behind that, as the continuance of austerity in Greece, but in general that’s the pattern.</p>
<p>Not so fun fact but when I made my list of preference for studies, Statistics in Piraeus was something like 15th place, so I guess my fate was that. Okay and a little bit of anxiety. :)</p>
</section><section id="transfer" class="level3"><h3 class="anchored" data-anchor-id="transfer">Transfer</h3>
<p>As I wrote earlier there are some exceptions. First of all the Admission by Transfer is referring to transfer your place in one department with one <strong>similar-study</strong> in other city. There are many criteria mainly based on your income. For example, a student admitted on Statistics on University of Aegean could be admitted on Statistics Department on Piraeus (i.e.&nbsp;in case his/her family hasn’t enough income).</p>
<p>These seats are limited.</p>
</section><section id="entry-exams" class="level3"><h3 class="anchored" data-anchor-id="entry-exams">Entry Exams</h3>
<p>In case you have already graduated a Bachelor programme then you are able to give Entry Exams on your department of choice, instead of the nightmare of Panhellenic Exams.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">admitted_students</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistics_tables</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/setNames.html">setNames</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Year"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Main_exams"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Transfer"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Entry_exams"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Total"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tidyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/drop_na.html">drop_na</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Transfer</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Total</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<p>I would like to examine the percentage of students who have been admitted by the other 3 ways over the years.</p>
</section></section><section id="student-population" class="level2"><h2 class="anchored" data-anchor-id="student-population">Student Population</h2>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">f</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistics_tables</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/setNames.html">setNames</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Year"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"BSc"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MSc_A"</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MSc_B"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PhD"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/drop_na.html">drop_na</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>MSc_B <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">stringr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://stringr.tidyverse.org/reference/str_replace.html">str_replace</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MSc_B</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"-"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/across.html">across</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span>, <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/integer.html">as.integer</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>MSc <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MSc_A</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MSc_B</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"area"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stacked Area Chart Example"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">f</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Population (millions)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>area <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"normal"</span>, marker <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bachelor"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">f</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">BSc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Master"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">f</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MSc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PhD"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">f</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">PhD</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-55cb5393c7336b2b7416" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-55cb5393c7336b2b7416">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"area"},"title":{"text":"Stacked Area Chart Example"},"yAxis":{"title":{"text":"Population (millions)"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"area":{"stacking":"normal","marker":{"enabled":false}}},"xAxis":{"categories":["2003-2004","2004-2005","2005-2006","2006-2007","2007-2008","2008-2009","2009-2010","2010-2011","2011-2012","2012-2013","2013-2014","2014-2015","2015-2016","2016-2017","2017-2018","2018-2019","2019-2020","2020-2021","2021-2022","2022-2023"]},"series":[{"data":[2135,2128,2225,2255,2360,2411,2429,2629,2528,2631,2707,2656,2742,2842,2953,3021,3091,3200,3159,3177],"name":"Bachelor"},{"data":[68,67,89,57,103,116,135,141,144,139,145,162,132,116,132,112,121,132,195,196],"name":"Master"},{"data":[11,16,20,24,24,20,13,13,16,15,16,14,14,18,21,21,19,19,18,15],"name":"PhD"}],"legend":{"enabled":true}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">latest_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">f</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"2022-2023"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tidyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/pivot_longer.html">pivot_longer</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>cols <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyselect.r-lib.org/reference/everything.html">everything</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, names_to <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"continent"</span>, values_to <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"population"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">continent</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/match.html">%in%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"BSc"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MSc"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PhD"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"treemap"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Interactive Population by Continent in 2017"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/list_parse.html">list_parse</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">latest_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">continent</span>,</span>
<span>          value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">population</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    layoutAlgorithm <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"squarified"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;{point.name}&lt;/b&gt;: {point.value}"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-6622b711d7a459d0afc6" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-6622b711d7a459d0afc6">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"treemap"},"title":{"text":"Interactive Population by Continent in 2017"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"series":[{"data":[{"continent":"BSc","population":3177,"name":"BSc","value":3177},{"continent":"PhD","population":15,"name":"PhD","value":15},{"continent":"MSc","population":196,"name":"MSc","value":196}],"layoutAlgorithm":"squarified"}],"tooltip":{"pointFormat":"<b>{point.name}<\/b>: {point.value}"}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="master-students" class="level2"><h2 class="anchored" data-anchor-id="master-students">Master Students</h2>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"area"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stude"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">f</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"# of students"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>area <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"normal"</span>, marker <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Applied Statistics"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">f</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MSc_A</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Actuarial Science"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">f</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MSc_B</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Total population of students"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"The total number of postgraduate students enrolled on the department's two programmes."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-47451b8aab176cfa80c3" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-47451b8aab176cfa80c3">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"area"},"title":{"text":"Total population of students"},"yAxis":{"title":{"text":"# of students"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"area":{"stacking":"normal","marker":{"enabled":false}}},"xAxis":{"categories":["2003-2004","2004-2005","2005-2006","2006-2007","2007-2008","2008-2009","2009-2010","2010-2011","2011-2012","2012-2013","2013-2014","2014-2015","2015-2016","2016-2017","2017-2018","2018-2019","2019-2020","2020-2021","2021-2022","2022-2023"]},"series":[{"data":[68,67,89,57,65,50,54,55,56,52,56,52,85,42,47,43,53,66,102,111],"name":"Applied Statistics"},{"data":[0,0,0,0,38,66,81,86,88,87,89,110,47,74,85,69,68,66,93,85],"name":"Actuarial Science"}],"legend":{"enabled":false},"subtitle":{"text":"The total number of postgraduate students enrolled on the department's two programmes."}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="phd-students-ratio" class="level2"><h2 class="anchored" data-anchor-id="phd-students-ratio">PhD Students Ratio</h2>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># statistics_tables[[3]] %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   setNames(c("Year", "MSc_AppliedStats", "MSc_Actuar")) %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   slice(-c(1:2))</span></span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ms_phd_students</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistics_tables</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/setNames.html">setNames</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"AcademicYear"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"BSc"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MSc (AppliedStat)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MSc (Actuar)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PhD"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/colnames.html">rownames</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ms_phd_students</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ms_phd_students</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output cell-output-stderr">
<pre><code>Warning: Setting row names on a tibble is deprecated.</code></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ms_phd_students</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ms_phd_students</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"BSc"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MSc (AppliedStat)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MSc (Actuar)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PhD"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">as.numeric</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">PhD</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">BSc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>AcademicYear <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">stringr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://stringr.tidyverse.org/reference/str_remove.html">str_remove</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">AcademicYear</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"-.*"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output cell-output-stderr">
<pre><code>Warning: There was 1 warning in `mutate()`.
ℹ In argument: `MSc (Actuar) = .Primitive("as.double")(`MSc (Actuar)`)`.
Caused by warning:
! NAs introduced by coercion</code></pre>
</div>
</div>
</section><section id="structure-of-students" class="level2"><h2 class="anchored" data-anchor-id="structure-of-students">Structure of Students</h2>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">B</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistics_tables</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/setNames.html">setNames</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Year"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"BSc_students"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MScStudentsA"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MScStudentsB"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PhD"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">as.integer</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>   MScStudentsB <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tidyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/replace_na.html">replace_na</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MScStudentsB</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>   MSc_Students <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MScStudentsA</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MScStudentsB</span></span>
<span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MScStudentsA"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"MScStudentsB"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/relocate.html">relocate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MSc_Students</span>, .after <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"BSc_students"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    total <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">BSc_students</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MSc_Students</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">PhD</span>,</span>
<span>    BSc_students <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">BSc_students</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">total</span>,</span>
<span>    MSc_Students <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">MSc_Students</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">total</span>,</span>
<span>    PhD <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">PhD</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">total</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">total</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">total</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tidyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/pivot_longer.html">pivot_longer</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>, cols <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, values_to <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Obs"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output cell-output-stderr">
<pre><code>Warning: There was 1 warning in `mutate()`.
ℹ In argument: `MScStudentsB = .Primitive("as.integer")(MScStudentsB)`.
Caused by warning:
! NAs introduced by coercion</code></pre>
</div>
</div>
</section><section id="graduation-rate" class="level2"><h2 class="anchored" data-anchor-id="graduation-rate">Graduation Rate</h2>
</section><section id="graduates-graduation-grade" class="level2"><h2 class="anchored" data-anchor-id="graduates-graduation-grade">Graduates &amp; Graduation Grade</h2>
<p>I hope you are still here because for the end I hold the best part. Finally, how did we perform? The study guide gives a distribution</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">extractGraduatesAndGrades</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistics_tables</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/setNames.html">setNames</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Year"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"[5.0 - 6)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"[6, 7)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"[7-8.5)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"[8.5-10]"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"AVG_Grade"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/slice.html">slice</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/across.html">across</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"AVG_Grade"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/separate.html">separate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">AVG_Grade</span>, into <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"AVG_Grade"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Graduates"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,sep <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"\\("</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Year"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"AVG_Grade"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Graduates"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Graduates"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">stringr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://stringr.tidyverse.org/reference/str_remove.html">str_remove_all</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Graduates</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"\\)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    AVG_Grade <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">stringr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://stringr.tidyverse.org/reference/str_replace.html">str_replace_all</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">AVG_Grade</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">","</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate_all.html">mutate_at</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/vars.html">vars</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"AVG_Grade"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Graduates"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">as.numeric</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="online-vs-on-campus-exams" class="level2"><h2 class="anchored" data-anchor-id="online-vs-on-campus-exams">Online vs On-campus Exams</h2>
<p>Due to pandemic COVID-19, Greek government suspended the operation of schools (elementary, high school, universities) on Tuesday 10 March 2020. Some days later imposed lockdown measures. That period our department organized online lectures and organized online exams for the majority of the courses on Spring Semester and on the September (retake exams). Long story short that lasted for at least 2 years.</p>
</section><section id="students-graduated-in-6-years" class="level2"><h2 class="anchored" data-anchor-id="students-graduated-in-6-years">Students Graduated in 6 Years</h2>
<p>Last but not least, maybe the most nervewrecking statistic is that one. Just for clarification, our studies have a duaration of four years. Although the majority will not successfully finish their degree even in 6 Years. This is important as currently has been voted the time-limit on BSc studies. We have 6 years to complete our studies otherwise we will not take the degree. In the next years, the best case scenario is that 60% of my collegeaus who were about to graduate will not get their degree.</p>
<p><img src="https://github.com/stesiam/30DayChartChallenge/blob/main/2024/day23/day23-2024-cc.png?raw=true" class="img-fluid"></p>
</section><div id="quarto-appendix" class="default"><section id="acknowledgements" class="level2 appendix unlisted"><h2 class="anchored quarto-appendix-heading">Acknowledgements</h2><div class="quarto-appendix-contents">
<p>Dataset based on recent study guide <a href="https://www.unipi.gr/faculty/mbouts/anak/OS_22_23.pdf">recent study guide</a> of Department of Statistics and Insurance Science of the University of Piraeus.</p>
<p>Image by <a href="https://pixabay.com/users/vloveland-4834409/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2148715">Victoria Loveland</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2148715">Pixabay</a></p>


</div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{2023,
  author = {, stesiam},
  title = {Statistics of {Statistics’} {Graduates}},
  date = {2023-07-23},
  url = {https://stesiam.com/posts/eda-graduates-of-statistics/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-2023" class="csl-entry quarto-appendix-citeas">
stesiam. (2023, July 23). Statistics of Statistics’ Graduates. Retrieved
from <a href="https://stesiam.com/posts/eda-graduates-of-statistics/">https://stesiam.com/posts/eda-graduates-of-statistics/</a>
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>EDA</category>
  <category>PDF</category>
  <category>tabulizer</category>
  <guid>https://stesiam.com/posts/eda-graduates-of-statistics/</guid>
  <pubDate>Sun, 23 Jul 2023 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/eda-graduates-of-statistics/graduation-cap.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Accessing API of data.gov.gr</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/tutorial-govgr-api/</link>
  <description><![CDATA[ <section id="introduction" class="level2"><h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>In traditional data analysis, the analyst is usually asked to “cleanse” the data, to give it a suitable format in order to be analysed. This process implies that the data exists in concentrated form in a file. However, this is not always the case. The problem with analysing a dataset is that it does not take into account any new values. In this case I have to re-download the new data and rerun the analysis through R or whatever tool I’m using. This workflow is not productive. Where it becomes apparent the inefficiency of the above process is when there is a constant flow of data. In these cases the usefulness of the API is shown since it gives us the new values with relatively little effort. At the same time the use of the API favours the integration of new data, so if we build a predictive model its accuracy will remain at a satisfactory level. Finally, another positive contribution is in Shiny Apps in order to automate data analysis and the information is reliable and up-to-date for the visitor.</p>
<p>In general there are many APIs from which we can get important information. For more details about the availability of free APIs you can see a relevant <a href="https://github.com/public-apis/public-apis">repository with a list of them</a>. In this article we will deal with Greek Government’sAPI available through <a href="data.gov.gr">data.gov.gr</a>.</p>
</section><section id="requesting-an-api-key" class="level2"><h2 class="anchored" data-anchor-id="requesting-an-api-key">Requesting an API Key</h2>
<p>However, like most APIs, this one requires us to register with the platform. We can do this on the relevant page by filling in our details. All the fields of the form must be completed, as shown below:</p>
<div class="quarto-figure quarto-figure-center" style="text-align:center; padding: 20px">
<figure class="figure"><p><img src="https://stesiam.com/posts/tutorial-govgr-api/images/datagovgr_api_request.png" class="white_bg img-fluid figure-img" width="500"></p>
<figcaption>Preview request page for access to the API</figcaption></figure>
</div>
<p>Next, you should check your e-mail because you will get a message with a Token through which the API will be used. Be sure to also check the spam folder. By the way, in case you lose the token and have deleted the mail and reapply (with the same mail) it will be resent to your email.</p>
</section><section id="using-api" class="level2"><h2 class="anchored" data-anchor-id="using-api">Using API</h2>
<p>Once we receive the Token, we need to somehow get the data. On the specific platform there are two ways.</p>
<ul>
<li>Using API from the website:</li>
<li>Using API with R</li>
</ul>
<p>One way (and probably the least efficient) is to request the data directly from the data.gov.gr website. This is on the one hand extremely simple, but on the other hand we are downloading a fixed version of the data and therefore if I want to update the data I have to download the data again.</p>
</section><section id="just-a-use-case" class="level2"><h2 class="anchored" data-anchor-id="just-a-use-case">Just a use-case</h2>
<p>Before completing this article, I decided it would be helpful to provide an example. At the time of writing, there are 49 databases to choose from. To demonstrate the usefulness of the API, I will select a database that is updated fairly frequently. One such dataset is that of <a href="https://www.data.gov.gr/datasets/sailing_traffic/">passengers travelling on ships</a>.</p>
<div class="cell" title="Import R libraries">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://httr.r-lib.org/">httr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jeroen.r-universe.dev/jsonlite">jsonlite</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<p>I set the base url of my data. Given the fact that I am interested on sailing traffic I will use the respective endpoint:</p>
<div class="cell" title="Setting base url of API">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">base</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://data.gov.gr/api/v1/query/sailing_traffic"</span></span></code></pre></div></div>
</div>
<p>As the documentation points out, we need to set the date range we are interested in. It is worth noting that you cannot retrieve a large range with a single API call. Returning to the previous example, ship passenger traffic data starts in 2017 and goes up to the present day (2023). Let’s assume that we don’t mind that, and we want the data from the first four days of July in 2023.</p>
<div class="cell" title="Call API to get some data">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">date_from</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"2023-07-01"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">date_to</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"2023-07-04"</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">API_URL</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">base</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"?date_from="</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">date_from</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&amp;"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"date_to="</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">date_to</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">call</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">httr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://httr.r-lib.org/reference/GET.html">GET</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>url <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">API_URL</span>,</span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://httr.r-lib.org/reference/add_headers.html">add_headers</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>`Authorization` <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'Token token_id'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<p>Where it refers to token_id, you should insert the token that was sent to you by data.gov.gr via email. So, after requesting the data through a GET request and waiting a bit, we receive a list with various pieces of information. What we are interested in is the data, so we look into the content category of the list. However, we notice that the information is in an unreadable format since it is in hexadecimal form.</p>
<div class="cell" title="Convert data to readable chars">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">base</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/rawConversion.html">rawToChar</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">call</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">content</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<p>Using rawToChar converts the response into readable characters but I still need to convert my data to tabular format in order to begin with my analysis.</p>
<div class="cell" title="Tabularize data">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#data = jsonlite::fromJSON(data, flatten = T)</span></span></code></pre></div></div>
</div>
<p>Finally, using the <code>jsonlite</code> package, I receive a data frame named as data which includes every destination, passenger/car count for the requested date.</p>
</section><div id="quarto-appendix" class="default"><section id="acknowledgements" class="level2 appendix unlisted"><h2 class="anchored quarto-appendix-heading">Acknowledgements</h2><div class="quarto-appendix-contents">
<p>Image by <a href="https://pixabay.com/users/kuszapro-369349/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=583537">Christopher Kuszajewski</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=583537">Pixabay</a></p>


</div></section></div> ]]></description>
  <category>R</category>
  <category>API</category>
  <guid>https://stesiam.com/posts/tutorial-govgr-api/</guid>
  <pubDate>Tue, 04 Jul 2023 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/tutorial-govgr-api/images/source_code.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Statistics Studies in Greece</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/statistics-studies-in-greece/</link>
  <description><![CDATA[ <section id="introduction" class="level2"><h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>Σε αυτό το άρθρο θα ήθελα να συγκεντρώσω όλες αυτές τις διάσπαρτες πληροφορίες που υπάρχουν για τα τμήματα Στατιστικής στη χώρα μας. Θα αναλύσω ως επί το πλείστον πληροφορίες που μπορούν να βρεθούν στο διαδίκτυο σαν να είχα να συμπληρώσω μηχανογραφικό. Ωστόσο, σε κάθε περίπτωση σας αποτρέπω από το να επιλέξετε σχολή βασίζοντας την επιλογή σας σε μόνο αυτό το άρθρο. Σε αυτή τη κατηγορία εντάσσω απλά όσες σχολές σχετίζονται με τη Στατιστική. Τα τμήματα που θα συγκρίνω είναι τα εξής:</p>
<ul>
<li>
<a href="https://www.dept.aueb.gr/el/stat/content/%CF%84%CE%BC%CE%AE%CE%BC%CE%B1-%CF%83%CF%84%CE%B1%CF%84%CE%B9%CF%83%CF%84%CE%B9%CE%BA%CE%AE%CF%82">Department of Statistics</a> of Athens University of Economics and Business</li>
<li>
<a href="https://www.unipi.gr/unipi/el/sta-home.html">Department of Statistics and Insurance Science</a> of University of Piraeus</li>
<li>
<a href="https://www.aegean.gr/departments/%CF%84%CE%BC%CE%AE%CE%BC%CE%B1-%CF%83%CF%84%CE%B1%CF%84%CE%B9%CF%83%CF%84%CE%B9%CE%BA%CE%AE%CF%82-%CE%BA%CE%B1%CE%B9-%CE%B1%CE%BD%CE%B1%CE%BB%CE%BF%CE%B3%CE%B9%CF%83%CF%84%CE%B9%CE%BA%CF%8E%CE%BD-%E2%80%93-%CF%87%CF%81%CE%B7%CE%BC%CE%B1%CF%84%CE%BF%CE%BF%CE%B9%CE%BA%CE%BF%CE%BD%CE%BF%CE%BC%CE%B9%CE%BA%CF%8E%CE%BD-%CE%BC%CE%B1%CE%B8%CE%B7%CE%BC%CE%B1%CF%84%CE%B9%CE%BA%CF%8E%CE%BD">Τμήμα Στατιστικής και Αναλογιστικών - Χρηματοοικονομικών Μαθηματικών</a> του Πανεπιστημίου Αιγαίου</li>
<li>
<a href="https://stat.uowm.gr/">Department of Statistics</a> of University of Western Macedonia</li>
</ul>
<div class="cell" title="Import R libraries">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://readxl.tidyverse.org">readxl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://stringr.tidyverse.org">stringr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/yixuan/sysfonts">sysfonts</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/">reactable</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/yixuan/showtext">showtext</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://kcuilla.github.io/reactablefmtr/">reactablefmtr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://here.r-lib.org/">here</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<div class="cell" title="Further settings - Add fonts">
<div class="cell-output cell-output-stdout">
<pre><code>[1] FALSE</code></pre>
</div>
</div>
</section><section id="minimum-admission-scores" class="level2"><h2 class="anchored" data-anchor-id="minimum-admission-scores">Minimum admission scores</h2>
<p>Ένα πρώτο κριτήριο για αρκετούς είναι η βάση εισαγωγής. Αν και κατά τη γνώμη μου αυτός ο δείκτης δείχνει κατά πόσο είναι επιθυμητή αυτή η σχολή και όχι το κατά πόσο καλή ή κακή είναι αυτή. Παρακάτω, συγκέντρωσα ιστορικά στοιχεία βάσεων (από το 2013 μέχρι το 2022) από τις τέσσερις σχολές Στατιστικής και έκανα ένα απλό διάγραμμα. Σε αυτό φαίνεται ότι ιστορικά το τμήμα με τη μεγαλύτερη βάση είναι του ΟΠΑ (με μόνη εξαίρεση το 2015). Δεύτερο σε προτίμηση έρχεται το τμήμα Στατιστικής του Πειραιά. Επιπλέον, τα υπόλοιπα δύο τμήματα Στατιστικής (Αιγαίου και Δυτικής Μακεδονίας) ταυτίζονται αρκετά ως προς τη βάση εισαγωγής τους.</p>
<div class="cell" title="Graph: Admission grades for Statistics Dept.">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">title_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;strong&gt;Βάσεις εισαγωγής σε τμήματα Στατιστικής&lt;/strong&gt;"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Η βάση εισαγωγής είναι ο μικρότερος αριθμός μορίων - βαθμολογίας που πρέπει να συγκεντρώσει κάποιος προκειμένου να εισαχθεί στη συγκεκριμένη σχολή. Διαχρονικά, οι σχολές με τη μεγαλύτερη βάση είναι του &lt;b&gt;Οικονομικού Πανεπιστημίου Αθηνών&lt;/b&gt; και του &lt;b&gt;Πανεπιστημίου Πειραιά&lt;/b&gt;. Τέλος, παρατηρούμε ότι όλες &lt;br&gt; οι  σχολές Στατιστικής έχουν σχετικά χαμηλή βάση εισαγωγής."</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">caption_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Πηγή:&lt;/b&gt;Βάσεις Πανελληνίων&lt;br&gt;&lt;span style='font-family:fb;'  &gt;&amp;#xf09b;&lt;/span&gt; &lt;b&gt;stesiam&lt;/b&gt;, 2024"</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hchart.html">hchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">tmimata_statistikis</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hcaes.html">hcaes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Vasi</span>, group <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">University</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">title_text</span>,</span>
<span>    align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"left"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Έτος"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Βάση εισαγωγής"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle_text</span>, align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"left"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div id="fig-min-adm-grades" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-min-adm-grades-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-01bc706ee17b07da2bd8" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-01bc706ee17b07da2bd8">{"x":{"hc_opts":{"chart":{"reflow":true},"title":{"text":"<strong>Βάσεις εισαγωγής σε τμήματα Στατιστικής<\/strong>","align":"left"},"yAxis":{"title":"Βάση εισαγωγής","type":"linear"},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0,"showInLegend":true},"treemap":{"layoutAlgorithm":"squarified"},"scatter":{"marker":{"symbol":"circle"}}},"series":[{"name":"AUEB","data":[{"Year":2013,"University":"AUEB","Theseis":99,"Vasi":12788,"img":"images/UniPi.png","x":2013,"y":12788},{"Year":2014,"University":"AUEB","Theseis":112,"Vasi":13277,"img":"images/UniPi.png","x":2014,"y":13277},{"Year":2015,"University":"AUEB","Theseis":103,"Vasi":13488,"img":"images/UniPi.png","x":2015,"y":13488},{"Year":2016,"University":"AUEB","Theseis":99,"Vasi":13158,"img":"images/UniPi.png","x":2016,"y":13158},{"Year":2017,"University":"AUEB","Theseis":103,"Vasi":13511,"img":"images/UniPi.png","x":2017,"y":13511},{"Year":2018,"University":"AUEB","Theseis":104,"Vasi":13354,"img":"images/UniPi.png","x":2018,"y":13354},{"Year":2019,"University":"AUEB","Theseis":113,"Vasi":13337,"img":"images/UniPi.png","x":2019,"y":13337},{"Year":2020,"University":"AUEB","Theseis":102,"Vasi":13425,"img":"images/UniPi.png","x":2020,"y":13425},{"Year":2021,"University":"AUEB","Theseis":103,"Vasi":13316,"img":"images/UniPi.png","x":2021,"y":13316},{"Year":2022,"University":"AUEB","Theseis":101,"Vasi":13828,"img":"images/UniPi.png","x":2022,"y":13828}],"type":"line"},{"name":"Aegean","data":[{"Year":2013,"University":"Aegean","Theseis":144,"Vasi":9618,"img":"images/UniPi.png","x":2013,"y":9618},{"Year":2014,"University":"Aegean","Theseis":137,"Vasi":10636,"img":"images/UniPi.png","x":2014,"y":10636},{"Year":2015,"University":"Aegean","Theseis":163,"Vasi":10574,"img":"images/UniPi.png","x":2015,"y":10574},{"Year":2016,"University":"Aegean","Theseis":156,"Vasi":10471,"img":"images/UniPi.png","x":2016,"y":10471},{"Year":2017,"University":"Aegean","Theseis":162,"Vasi":10692,"img":"images/UniPi.png","x":2017,"y":10692},{"Year":2018,"University":"Aegean","Theseis":178,"Vasi":8525,"img":"images/UniPi.png","x":2018,"y":8525},{"Year":2019,"University":"Aegean","Theseis":198,"Vasi":5148,"img":"images/UniPi.png","x":2019,"y":5148},{"Year":2020,"University":"Aegean","Theseis":171,"Vasi":3925,"img":"images/UniPi.png","x":2020,"y":3925},{"Year":2021,"University":"Aegean","Theseis":179,"Vasi":7797,"img":"images/UniPi.png","x":2021,"y":7797},{"Year":2022,"University":"Aegean","Theseis":165,"Vasi":8425,"img":"images/UniPi.png","x":2022,"y":8425}],"type":"line"},{"name":"UniPi","data":[{"Year":2013,"University":"UniPi","Theseis":189,"Vasi":12666,"img":"images/UniPi.png","x":2013,"y":12666},{"Year":2014,"University":"UniPi","Theseis":202,"Vasi":13270,"img":"images/UniPi.png","x":2014,"y":13270},{"Year":2015,"University":"UniPi","Theseis":198,"Vasi":13795,"img":"images/UniPi.png","x":2015,"y":13795},{"Year":2016,"University":"UniPi","Theseis":190,"Vasi":12703,"img":"images/UniPi.png","x":2016,"y":12703},{"Year":2017,"University":"UniPi","Theseis":198,"Vasi":12543,"img":"images/UniPi.png","x":2017,"y":12543},{"Year":2018,"University":"UniPi","Theseis":198,"Vasi":11967,"img":"images/UniPi.png","x":2018,"y":11967},{"Year":2019,"University":"UniPi","Theseis":216,"Vasi":11710,"img":"images/UniPi.png","x":2019,"y":11710},{"Year":2020,"University":"UniPi","Theseis":194,"Vasi":12100,"img":"images/UniPi.png","x":2020,"y":12100},{"Year":2021,"University":"UniPi","Theseis":154,"Vasi":11673,"img":"images/UniPi.png","x":2021,"y":11673},{"Year":2022,"University":"UniPi","Theseis":152,"Vasi":12460,"img":"images/UniPi.png","x":2022,"y":12460}],"type":"line"},{"name":"UoWM","data":[{"Year":2013,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2013,"y":null},{"Year":2014,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2014,"y":null},{"Year":2015,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2015,"y":null},{"Year":2016,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2016,"y":null},{"Year":2017,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2017,"y":null},{"Year":2018,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2018,"y":null},{"Year":2019,"University":"UoWM","Theseis":268,"Vasi":4846,"img":"images/UniPi.png","x":2019,"y":4846},{"Year":2020,"University":"UoWM","Theseis":225,"Vasi":3950,"img":"images/UniPi.png","x":2020,"y":3950},{"Year":2021,"University":"UoWM","Theseis":316,"Vasi":7867,"img":"images/UniPi.png","x":2021,"y":7867},{"Year":2022,"University":"UoWM","Theseis":256,"Vasi":7740,"img":"images/UniPi.png","x":2022,"y":7740}],"type":"line"}],"xAxis":{"type":"linear","title":"Έτος"},"subtitle":{"text":"Η βάση εισαγωγής είναι ο μικρότερος αριθμός μορίων - βαθμολογίας που πρέπει να συγκεντρώσει κάποιος προκειμένου να εισαχθεί στη συγκεκριμένη σχολή. Διαχρονικά, οι σχολές με τη μεγαλύτερη βάση είναι του <b>Οικονομικού Πανεπιστημίου Αθηνών<\/b> και του <b>Πανεπιστημίου Πειραιά<\/b>. Τέλος, παρατηρούμε ότι όλες <br> οι  σχολές Στατιστικής έχουν σχετικά χαμηλή βάση εισαγωγής.","align":"left"}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-min-adm-grades-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;1: Βάσεις εισαγωγής σχολών Στατιστικής (2013 - 2022)
</figcaption></figure>
</div>
</div>
</section><section id="θέσεις" class="level2"><h2 class="anchored" data-anchor-id="θέσεις">Θέσεις</h2>
<p>Κάθε χρόνο το Υπουργείο Παιδείας ανακοινώνει τις διαθέσιμες θέσεις για κάθε σχολή και για κάθε κατηγορία εξεταζόμενων. Σε αυτή την ανάλυση ασχολούμαι με τους υποψήφιους των Γενικών Λυκείων που αποτελούν και τη συντριπτική πλειοψηφία των συμμετεχόντων. Με μία πρώτη ματιά παρατηρώ μία αντιστροφή των αποτελεσμάτων σε σύγκριση με τη βάση εισαγωγής. Δηλαδή, στις σχολές με την σχετικά υψηλότερη βάση παρέχονται λιγότερες θέσεις, ενώ οι περισσότερες θέσεις διατίθενται στις σχολές χαμηλότερης βάσης.</p>
<div class="cell" title="Graph: Number of available admission seats">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">title_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;Θέσεις εισαγωγής σε τμήματα Στατιστικής (ΓΛ90)&lt;/b&gt;"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Oι θέσεις για όσους θέλουν να φοιτήσουν στο τμήμα &lt;b&gt;Στατιστικής του ΟΠΑ&lt;/b&gt; φαίνεται να είναι αρκετά περιορισμένες για τους υποψήφιους των Γενικών Λυκείων προσφέροντας λίγες παραπάνω από 100. Τα τμήματα &lt;b&gt;Αιγαίου&lt;/b&gt; και &lt;b&gt;Πειραιά&lt;/b&gt; τουλάχιστον τα τελευταία χρόνια ταυτίζονται ως προς τους πόσους θα δεχτούν (από τη κατηγορία ΓΛ90) με το τμήμα του Πειραιά να μειώνει σημαντικά τους εισακτέους του, σε σύγκριση με το 2013."</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">caption_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt; Πηγή:&lt;/b&gt; Βάσεις Πανελληνίων&lt;br&gt;&lt;span style='font-family:fb;'  &gt;&amp;#xf09b;&lt;/span&gt; &lt;b&gt;stesiam&lt;/b&gt;, 2024"</span></span>
<span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hchart.html">hchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">tmimata_statistikis</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hcaes.html">hcaes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Theseis</span>, group <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">University</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">title_text</span>,</span>
<span>    align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"left"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Έτος"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Θέσεις εισαγωγής"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle_text</span>, align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"left"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div id="fig-available-adm-seats" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-available-adm-seats-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-0d174ec4a4c3c2f738a5" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-0d174ec4a4c3c2f738a5">{"x":{"hc_opts":{"chart":{"reflow":true},"title":{"text":"<b>Θέσεις εισαγωγής σε τμήματα Στατιστικής (ΓΛ90)<\/b>","align":"left"},"yAxis":{"title":"Θέσεις εισαγωγής","type":"linear"},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0,"showInLegend":true},"treemap":{"layoutAlgorithm":"squarified"},"scatter":{"marker":{"symbol":"circle"}}},"series":[{"name":"AUEB","data":[{"Year":2013,"University":"AUEB","Theseis":99,"Vasi":12788,"img":"images/UniPi.png","x":2013,"y":99},{"Year":2014,"University":"AUEB","Theseis":112,"Vasi":13277,"img":"images/UniPi.png","x":2014,"y":112},{"Year":2015,"University":"AUEB","Theseis":103,"Vasi":13488,"img":"images/UniPi.png","x":2015,"y":103},{"Year":2016,"University":"AUEB","Theseis":99,"Vasi":13158,"img":"images/UniPi.png","x":2016,"y":99},{"Year":2017,"University":"AUEB","Theseis":103,"Vasi":13511,"img":"images/UniPi.png","x":2017,"y":103},{"Year":2018,"University":"AUEB","Theseis":104,"Vasi":13354,"img":"images/UniPi.png","x":2018,"y":104},{"Year":2019,"University":"AUEB","Theseis":113,"Vasi":13337,"img":"images/UniPi.png","x":2019,"y":113},{"Year":2020,"University":"AUEB","Theseis":102,"Vasi":13425,"img":"images/UniPi.png","x":2020,"y":102},{"Year":2021,"University":"AUEB","Theseis":103,"Vasi":13316,"img":"images/UniPi.png","x":2021,"y":103},{"Year":2022,"University":"AUEB","Theseis":101,"Vasi":13828,"img":"images/UniPi.png","x":2022,"y":101}],"type":"line"},{"name":"Aegean","data":[{"Year":2013,"University":"Aegean","Theseis":144,"Vasi":9618,"img":"images/UniPi.png","x":2013,"y":144},{"Year":2014,"University":"Aegean","Theseis":137,"Vasi":10636,"img":"images/UniPi.png","x":2014,"y":137},{"Year":2015,"University":"Aegean","Theseis":163,"Vasi":10574,"img":"images/UniPi.png","x":2015,"y":163},{"Year":2016,"University":"Aegean","Theseis":156,"Vasi":10471,"img":"images/UniPi.png","x":2016,"y":156},{"Year":2017,"University":"Aegean","Theseis":162,"Vasi":10692,"img":"images/UniPi.png","x":2017,"y":162},{"Year":2018,"University":"Aegean","Theseis":178,"Vasi":8525,"img":"images/UniPi.png","x":2018,"y":178},{"Year":2019,"University":"Aegean","Theseis":198,"Vasi":5148,"img":"images/UniPi.png","x":2019,"y":198},{"Year":2020,"University":"Aegean","Theseis":171,"Vasi":3925,"img":"images/UniPi.png","x":2020,"y":171},{"Year":2021,"University":"Aegean","Theseis":179,"Vasi":7797,"img":"images/UniPi.png","x":2021,"y":179},{"Year":2022,"University":"Aegean","Theseis":165,"Vasi":8425,"img":"images/UniPi.png","x":2022,"y":165}],"type":"line"},{"name":"UniPi","data":[{"Year":2013,"University":"UniPi","Theseis":189,"Vasi":12666,"img":"images/UniPi.png","x":2013,"y":189},{"Year":2014,"University":"UniPi","Theseis":202,"Vasi":13270,"img":"images/UniPi.png","x":2014,"y":202},{"Year":2015,"University":"UniPi","Theseis":198,"Vasi":13795,"img":"images/UniPi.png","x":2015,"y":198},{"Year":2016,"University":"UniPi","Theseis":190,"Vasi":12703,"img":"images/UniPi.png","x":2016,"y":190},{"Year":2017,"University":"UniPi","Theseis":198,"Vasi":12543,"img":"images/UniPi.png","x":2017,"y":198},{"Year":2018,"University":"UniPi","Theseis":198,"Vasi":11967,"img":"images/UniPi.png","x":2018,"y":198},{"Year":2019,"University":"UniPi","Theseis":216,"Vasi":11710,"img":"images/UniPi.png","x":2019,"y":216},{"Year":2020,"University":"UniPi","Theseis":194,"Vasi":12100,"img":"images/UniPi.png","x":2020,"y":194},{"Year":2021,"University":"UniPi","Theseis":154,"Vasi":11673,"img":"images/UniPi.png","x":2021,"y":154},{"Year":2022,"University":"UniPi","Theseis":152,"Vasi":12460,"img":"images/UniPi.png","x":2022,"y":152}],"type":"line"},{"name":"UoWM","data":[{"Year":2013,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2013,"y":null},{"Year":2014,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2014,"y":null},{"Year":2015,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2015,"y":null},{"Year":2016,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2016,"y":null},{"Year":2017,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2017,"y":null},{"Year":2018,"University":"UoWM","Theseis":null,"Vasi":null,"img":"images/UniPi.png","x":2018,"y":null},{"Year":2019,"University":"UoWM","Theseis":268,"Vasi":4846,"img":"images/UniPi.png","x":2019,"y":268},{"Year":2020,"University":"UoWM","Theseis":225,"Vasi":3950,"img":"images/UniPi.png","x":2020,"y":225},{"Year":2021,"University":"UoWM","Theseis":316,"Vasi":7867,"img":"images/UniPi.png","x":2021,"y":316},{"Year":2022,"University":"UoWM","Theseis":256,"Vasi":7740,"img":"images/UniPi.png","x":2022,"y":256}],"type":"line"}],"xAxis":{"type":"linear","title":"Έτος"},"subtitle":{"text":"Oι θέσεις για όσους θέλουν να φοιτήσουν στο τμήμα <b>Στατιστικής του ΟΠΑ<\/b> φαίνεται να είναι αρκετά περιορισμένες για τους υποψήφιους των Γενικών Λυκείων προσφέροντας λίγες παραπάνω από 100. Τα τμήματα <b>Αιγαίου<\/b> και <b>Πειραιά<\/b> τουλάχιστον τα τελευταία χρόνια ταυτίζονται ως προς τους πόσους θα δεχτούν (από τη κατηγορία ΓΛ90) με το τμήμα του Πειραιά να μειώνει σημαντικά τους εισακτέους του, σε σύγκριση με το 2013.","align":"left"}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-available-adm-seats-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;2: Availability of admission seats on Statistics Departments (2013 - 2022)
</figcaption></figure>
</div>
</div>
<p>Βέβαια, η παροχή των θέσεων δεν συνεπάγεται πάντοτε και πλήρωση αυτών. Πολλές από αυτές μπορεί να μείνουν αδιάθετες λόγω χαμηλής ζήτησης. Αυτό το φαινόμενο παρατηρείται σε σχολές εκτός των αστικών κέντρων. Τα τελευταία χρόνια υπάρχει και ένας επιπρόσθετος λόγος μιας και έχει θεσμοθετηθεί η ελάχιστη βάση εισαγωγής (ΕΒΕ), η οποία αποτρέπει την βάση μιας σχολής να πέσει κάτω από έναν συγκεκριμένο βαθμό (π.χ. κάτω από 7 ή 13) και για αυτό παρατηρείται στο πρώτο διάγραμμα των βάσεων μία απότομη αύξηση στις σχολές του Αιγαίου και της Δυτικής Μακεδονίας. από την εφαρμογή της να δούμε και άλλες αδιάθετες θέσεις. Έτσι, ο αριθμός των εισακτέων μπορεί πλέον να διαφέρει σημαντικά όχι απλώς μεταξύ τμημάτων εντός και μεγάλων αστικών κέντρων (π.χ. Πανεπιστήμιο Αιγαίου, Πανεπιστήμιο Δυτικής Μακεδονίας - Γρεβενά), αλλά και ως προς τον διαθέσιμο αριθμό εισακτέων και των εγγεγραμμένων φοιτητών.</p>
<div class="cell" title="Graph: Proportion of Statistics Seats">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">years</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/unique.html">unique</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">tmimata_statistikis</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Step 3: Prepare series data</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">series_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">tmimata_statistikis</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">University</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Theseis</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">University</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">name</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/list_parse.html">list_parse</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"area"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Distribution of available places by Department"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Το τμήμα Στατιστικής του Πειραιά είναι αυτό που προσέφερε περισσότερες θέσεις αναλογικά με τις συνολικά προσφερόμενες σε πανελλήνιο επίπεδο. Πλέον το νεοσύστατο τμήμα των Γρεβενών έχει τη μεγαλύτερη προσφορά θέσεων."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">years</span>, tickmarkPlacement <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"on"</span>, title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percent (%)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{value}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>shared <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>, pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;span style='color:{series.color}'&gt;{series.name}&lt;/span&gt;: &lt;b&gt;{point.percentage:.1f}%&lt;/b&gt; ({point.y:,.0f})&lt;br/&gt;"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>area <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"percent"</span>,</span>
<span>        lineColor <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#ffffff"</span>,</span>
<span>        lineWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,</span>
<span>        marker <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>lineWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, lineColor <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#ffffff"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series_list.html">hc_add_series_list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">series_data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div id="fig-proportion-seats" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-proportion-seats-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-aab6e1a56b60aa481cbe" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-aab6e1a56b60aa481cbe">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"area"},"title":{"text":"Distribution of available places by Department"},"yAxis":{"title":{"text":"Percent (%)"},"labels":{"format":"{value}%"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"area":{"stacking":"percent","lineColor":"#ffffff","lineWidth":1,"marker":{"lineWidth":1,"lineColor":"#ffffff"}}},"subtitle":{"text":"Το τμήμα Στατιστικής του Πειραιά είναι αυτό που προσέφερε περισσότερες θέσεις αναλογικά με τις συνολικά προσφερόμενες σε πανελλήνιο επίπεδο. Πλέον το νεοσύστατο τμήμα των Γρεβενών έχει τη μεγαλύτερη προσφορά θέσεων."},"xAxis":{"categories":[2013,2014,2015,2016,2017,2018,2019,2020,2021,2022],"tickmarkPlacement":"on","title":{"enabled":false}},"tooltip":{"shared":true,"pointFormat":"<span style='color:{series.color}'>{series.name}<\/span>: <b>{point.percentage:.1f}%<\/b> ({point.y:,.0f})<br/>"},"series":[{"name":"AUEB","data":[99,112,103,99,103,104,113,102,103,101]},{"name":"Aegean","data":[144,137,163,156,162,178,198,171,179,165]},{"name":"UniPi","data":[189,202,198,190,198,198,216,194,154,152]},{"name":"UoWM","data":[null,null,null,null,null,null,268,225,316,256]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-proportion-seats-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;3: Proportion of seats offered in Statistics departments(2013 - 2022)
</figcaption></figure>
</div>
</div>
</section><section id="requirements-to-graduate" class="level2 page-columns page-full"><h2 class="anchored" data-anchor-id="requirements-to-graduate">Requirements to Graduate</h2>
<p>Και τα τέσσερα τμήματα προσφέρουν 4ετή φοίτηση και κάποιος ορίζεται ως πτυχιούχος με την απόκτηση 240 ECTS. Οι διαφορές τους ανάγονται κυρίως στο πλήθος των μαθημάτων ή στο αν υπάρχει προϋπόθεση για πτυχιακή. Σημειώνεται ότι οι παραπάνω πληροφορίες βασίζονται στους πρόσφατους οδηγούς σπουδών των παραπάνω τμημάτων (2022-2023).</p>

<div class="no-row-height column-margin column-container"><div class="">
<p>Το UniPi2011 αναφέρεται στο πρόγραμμα σπουδών του τμήματος Στατιστικής του Πειραιά που ίσχυε για τους φοιτητές που μπήκαν στο τμήμα από το 2011 μέχρι το 2016. Οι εισακτέοι του τμήματος από το 2017 ακολουθούν το νέο πρόγραμμα σπουδών του 2017 (UniPI2017)</p>
</div></div><div class="cell" title="Graph: Courses to Graduate">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bar"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Course structure of Statistics departments"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"The number of courses required to obtain an undergraduate degree from public statistics departments in Greece. The composition of the programs is also analyzed based on the flexibility of the curriculum (number of electives as a percentage of required courses)."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stesiam, 2025"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>       categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">degree_requirements</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Images</span>,</span>
<span>         labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>useHTML <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>         title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>   <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Number of courses to graduate"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>series <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"normal"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Electives"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">degree_requirements</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Elective</span>, stack <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"courses"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Obligatory"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">degree_requirements</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Comp</span>, stack <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"courses"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div id="fig-courses-to-graduate" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-courses-to-graduate-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-f13cadfcc00f2484c861" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-f13cadfcc00f2484c861">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar"},"title":{"text":"Course structure of Statistics departments"},"yAxis":{"title":{"text":"Number of courses to graduate"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0,"stacking":"normal"},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"The number of courses required to obtain an undergraduate degree from public statistics departments in Greece. The composition of the programs is also analyzed based on the flexibility of the curriculum (number of electives as a percentage of required courses)."},"caption":{"text":"stesiam, 2025"},"xAxis":{"categories":["<img src='https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/UoWM.png/120px-UoWM.png' height='20'/>","<img src='https://upload.wikimedia.org/wikipedia/en/thumb/a/a4/UNIPI_Emblem.png/250px-UNIPI_Emblem.png' height='20'/>","<img src='https://upload.wikimedia.org/wikipedia/en/thumb/a/a4/UNIPI_Emblem.png/250px-UNIPI_Emblem.png' height='20'/>","<img src='https://upload.wikimedia.org/wikipedia/el/thumb/7/7d/%CE%A0%CE%B1%CE%BD%CE%B5%CF%80%CE%B9%CF%83%CF%84%CE%AE%CE%BC%CE%B9%CE%BF_%CE%91%CE%B9%CE%B3%CE%B1%CE%AF%CE%BF%CF%85_%28logo%29.svg/250px-%CE%A0%CE%B1%CE%BD%CE%B5%CF%80%CE%B9%CF%83%CF%84%CE%AE%CE%BC%CE%B9%CE%BF_%CE%91%CE%B9%CE%B3%CE%B1%CE%AF%CE%BF%CF%85_%28logo%29.svg.png' height='20'/>","<img src='https://upload.wikimedia.org/wikipedia/el/thumb/2/2c/AUEBEMBLEM.png/250px-AUEBEMBLEM.png' height='20'/>"],"labels":{"useHTML":true},"title":{"text":""}},"series":[{"data":[7,16,21,16,18],"name":"Electives","stack":"courses"},{"data":[41,31,19,18,14],"name":"Obligatory","stack":"courses"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-courses-to-graduate-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;4: Required courses for obtaining a degree per department
</figcaption></figure>
</div>
</div>
</section><section id="επιλεγόμενα-μαθήματα" class="level2"><h2 class="anchored" data-anchor-id="επιλεγόμενα-μαθήματα">Επιλεγόμενα μαθήματα</h2>
<p>Παραπάνω είδαμε σε πόσα μαθήματα θα πρέπει να εξεταστεί ένας σπουδαστής του αντίστοιχου τμήματος για να πάρει πτυχίο. Πόση ελευθερία υπάρχει σε κάθε τμήμα προκειμένου ο ίδιος ο φοιτητής να προσαρμόσει τις σπουδές του στις προτιμήσεις του και τα προσωπικά του ερευνητικά ενδιαφέροντα; Αυτό προσπάθησα να μελετήσω με την προσθήκη της μεταβλητής των ελεύθερων μαθημάτων και του ποσοστού που αποτελούν αυτά ως προς τα συνολικά μαθήματα.</p>
<div class="cell" title="Graph: Percentage of elective courses">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">degree_requirements</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">degree_requirements</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Electivepct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bar"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Flexibility of Study Guides"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ο αριθμός των επιλεγόμενων μαθημάτων ως ποσοστό των συνολικών μαθημάτων που απαιτούνται για το πτυχίο."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stesiam, 2025"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>       categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">degree_requirements</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Images</span>,</span>
<span>         labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>useHTML <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>         title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>   <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage of electives/total courses"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>series <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"normal"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Electives"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">degree_requirements</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Electivepct</span>, stack <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"courses"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div id="fig-elective-courses" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-elective-courses-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-443a01b7d4d0388c9570" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-443a01b7d4d0388c9570">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar"},"title":{"text":"Flexibility of Study Guides"},"yAxis":{"title":{"text":"Percentage of electives/total courses"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0,"stacking":"normal"},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Ο αριθμός των επιλεγόμενων μαθημάτων ως ποσοστό των συνολικών μαθημάτων που απαιτούνται για το πτυχίο."},"caption":{"text":"stesiam, 2025"},"xAxis":{"categories":["<img src='https://upload.wikimedia.org/wikipedia/el/thumb/2/2c/AUEBEMBLEM.png/250px-AUEBEMBLEM.png' height='20'/>","<img src='https://upload.wikimedia.org/wikipedia/en/thumb/a/a4/UNIPI_Emblem.png/250px-UNIPI_Emblem.png' height='20'/>","<img src='https://upload.wikimedia.org/wikipedia/el/thumb/7/7d/%CE%A0%CE%B1%CE%BD%CE%B5%CF%80%CE%B9%CF%83%CF%84%CE%AE%CE%BC%CE%B9%CE%BF_%CE%91%CE%B9%CE%B3%CE%B1%CE%AF%CE%BF%CF%85_%28logo%29.svg/250px-%CE%A0%CE%B1%CE%BD%CE%B5%CF%80%CE%B9%CF%83%CF%84%CE%AE%CE%BC%CE%B9%CE%BF_%CE%91%CE%B9%CE%B3%CE%B1%CE%AF%CE%BF%CF%85_%28logo%29.svg.png' height='20'/>","<img src='https://upload.wikimedia.org/wikipedia/en/thumb/a/a4/UNIPI_Emblem.png/250px-UNIPI_Emblem.png' height='20'/>","<img src='https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/UoWM.png/120px-UoWM.png' height='20'/>"],"labels":{"useHTML":true},"title":{"text":""}},"series":[{"data":[56.2,52.5,47.1,34,14.6],"name":"Electives","stack":"courses"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-elective-courses-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;5: The percentage of electives out of the total number of courses that are required to obtain a degree.
</figcaption></figure>
</div>
</div>
</section><section id="late-graduation" class="level2"><h2 class="anchored" data-anchor-id="late-graduation">Late graduation</h2>
<div class="cell" title="Filter number of students that have exceeded 6 years">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">undergrads_by_year</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://readxl.tidyverse.org/reference/read_excel.html">read_excel</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">here</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://here.r-lib.org/reference/here.html">here</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">work_dir</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"undergrads_by_year.xls"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">25</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/setNames.html">setNames</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dept"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"StudentsUnEq6"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"studentsOv6"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tidyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/drop_na.html">drop_na</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Dept</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/across.html">across</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">StudentsUnEq6</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">studentsOv6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/integer.html">as.integer</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>totalStudents <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">StudentsUnEq6</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">studentsOv6</span>,</span>
<span>         pctOv6 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">studentsOv6</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">totalStudents</span>,</span>
<span>         nonPctOv6 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pctOv6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pctOv6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://stringr.tidyverse.org/reference/str_detect.html">str_detect</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Dept</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΣΤΑΤΙΣΤΙΚΗ"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<div class="cell" title="Graph: Late graduation by Stats Dept.">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bar"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage of students that have exceeded n+2 years"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Το τμήμα του Πειραιά έχει το μεγαλύτερο ποσοστό καθυστερημένης αποφοίτησης με 7 στους 10 φοιτητές του τμήματος να αποτελούν φοιτητές 7ου ή μεγαλύτερου έτους. Με μεγάλη ποσοστιαία διαφορά ακολουθούν τα τμήματα της Αθήνας και της Σάμου. Το τμήμα των Γρεβενών είναι νεοσύστατο και δεν έχει φοιτητές ν+2."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">undergrads_by_year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Dept</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Value"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>series <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"normal"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Until 6 Years"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">undergrads_by_year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">nonPctOv6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Over 6 Years"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">undergrads_by_year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pctOv6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Value"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    plotLines <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"orange"</span>,</span>
<span>        width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>,</span>
<span>        value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>,</span>
<span>        dashStyle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ShortDash"</span>,</span>
<span>        label <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">200</span>,</span>
<span>          text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Average: "</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">50</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>          align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"left"</span>,</span>
<span>          style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"orange"</span>, fontWeight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bold"</span>, fontSize <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  valueDecimals <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div id="fig-late-graduation" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-late-graduation-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-2c6f63faf4cfe284a208" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-2c6f63faf4cfe284a208">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar"},"title":{"text":"Percentage of students that have exceeded n+2 years"},"yAxis":{"title":{"text":"Value"},"plotLines":[{"color":"orange","width":2,"value":0.5,"dashStyle":"ShortDash","label":{"y":200,"text":"Average: 50","align":"left","style":{"color":"orange","fontWeight":"bold","fontSize":10}}}]},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0,"stacking":"normal"},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Το τμήμα του Πειραιά έχει το μεγαλύτερο ποσοστό καθυστερημένης αποφοίτησης με 7 στους 10 φοιτητές του τμήματος να αποτελούν φοιτητές 7ου ή μεγαλύτερου έτους. Με μεγάλη ποσοστιαία διαφορά ακολουθούν τα τμήματα της Αθήνας και της Σάμου. Το τμήμα των Γρεβενών είναι νεοσύστατο και δεν έχει φοιτητές ν+2."},"xAxis":{"categories":["ΣΤΑΤΙΣΤΙΚΗΣ ΚΑΙ ΑΣΦΑΛΙΣΤΙΚΗΣ ΕΠΙΣΤΗΜΗΣ (ΠΕΙΡΑΙΑΣ)","ΣΤΑΤΙΣΤΙΚΗΣ (ΑΘΗΝΑ)","ΣΤΑΤΙΣΤΙΚΗΣ ΚΑΙ ΑΝΑΛΟΓΙΣΤΙΚΩΝ-ΧΡΗΜΑΤΟΟΙΚΟΝΟΜΙΚΩΝ ΜΑΘΗΜΑΤΙΚΩΝ (ΣΑΜΟΣ)","ΣΤΑΤΙΣΤΙΚΗΣ ΚΑΙ ΑΣΦΑΛΙΣΤΙΚΗΣ ΕΠΙΣΤΗΜΗΣ (ΓΡΕΒΕΝΑ)"]},"series":[{"data":[0.2956033676333022,0.3815461346633416,0.476328502415459,null],"name":"Until 6 Years"},{"data":[0.7043966323666978,0.6184538653366584,0.523671497584541,null],"name":"Over 6 Years"}],"tooltip":{"valueDecimals":2}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-late-graduation-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;6: Barplot of late graduation rates by department
</figcaption></figure>
</div>
</div>
</section><section id="other-information" class="level2"><h2 class="anchored" data-anchor-id="other-information">Other Information</h2>
<div class="cell" title="Table: Characteristics of study guides II">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">reactable</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/reactable.html">reactable</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">others</span>,</span>
<span>                     columns <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span></span>
<span>    Uni <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Πανεπιστήμιο"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    Diloseis <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Όριο δηλώσεων"</span>, </span>
<span>                      style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>      <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">value</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Όχι"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#008000"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span>  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#e00000"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">color</span>, fontWeight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bold"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    Alysides <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Αλυσίδες μαθημάτων"</span>,</span>
<span>                      style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>      <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">value</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Όχι"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#008000"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span>  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#e00000"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">color</span>, fontWeight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bold"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    Ptyxiaki <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Πτυχιακή"</span>,</span>
<span>                      style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>      <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">value</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Όχι"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#008000"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span>  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#e8c010"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">color</span>, fontWeight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bold"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    Vathmos <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Υπολογισμός βαθμού"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div id="tbl-basic-tables" class="cell quarto-float quarto-figure quarto-figure-center anchored" title="Table: Characteristics of study guides II">
<figure class="quarto-float quarto-float-tbl figure"><figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-basic-tables-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table&nbsp;1: Characteristics of study guides
</figcaption><div aria-describedby="tbl-basic-tables-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output-display">
<div class="reactable html-widget html-fill-item" id="htmlwidget-7378f6a17a82d48c29ba" style="width:auto;height:auto;"></div>
<script type="application/json" data-for="htmlwidget-7378f6a17a82d48c29ba">{"x":{"tag":{"name":"Reactable","attribs":{"data":{"Uni":["AUEB","UniPi2011","UniPi2017","Aegean","UoWM"],"Diloseis":["Ναι","Όχι","Όχι","Όχι","Όχι"],"Alysides":["Ναι","Όχι","Όχι","Όχι","Όχι"],"Ptyxiaki":["Προαιρετική","Όχι","Όχι","Προαιρετική","Όχι"],"Vathmos":["Αριθμητικός μέσος","Σταθμικός μέσος","Αριθμητικός μέσος","Σταθμικός μέσος","Αριθμητικός μέσος"]},"columns":[{"id":"Uni","name":"Πανεπιστήμιο","type":"character"},{"id":"Diloseis","name":"Όριο δηλώσεων","type":"character","style":[{"color":"#e00000","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"}]},{"id":"Alysides","name":"Αλυσίδες μαθημάτων","type":"character","style":[{"color":"#e00000","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"}]},{"id":"Ptyxiaki","name":"Πτυχιακή","type":"character","style":[{"color":"#e8c010","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"},{"color":"#e8c010","fontWeight":"bold"},{"color":"#008000","fontWeight":"bold"}]},{"id":"Vathmos","name":"Υπολογισμός βαθμού","type":"character"}],"dataKey":"237341ab6f93ec5492bc75f7256bcdb0"},"children":[]},"class":"reactR_markup"},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</figure>
</div>
</div>
</section><section id="mapping-departments" class="level2"><h2 class="anchored" data-anchor-id="mapping-departments">Mapping Departments</h2>
<p>Finally, it would be interesting to practice my skills in creating maps with R. I usually use Shapefiles to have a base map (in this case, the boundaries of Greece) or a package to define them, such as the <code>rnaturalearth</code> accompanied by the <code>rnaturalearthdata</code> και <code>rnaturalhires</code> packages. This was my approach in the first version of my article. Fortunately, in the past period, I have made a great effort to transform my static plots into interactive ones using highcharter. That’s what I am also trying to do with maps, as the aforemntioned library offers relevant mapping tools. On our specific example, we need Greece’s boundaries which are available from the library (as are the boundaries of other countries).</p>
<div class="cell" title="Number of Statistics Students">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">students_by_dept</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">undergrads_by_year</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">stringr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://stringr.tidyverse.org/reference/str_detect.html">str_detect</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Dept</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΣΤΑΤΙΣΤΙΚΗ"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Short <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"UniPi"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"AUEB"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Aegean"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Grevena"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<div class="cell" title="Mapping Stats Depts in Greece">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">uni_coord</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  uni <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"UniPi"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Aegean"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"AUEB"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"UoWM"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  unilong <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"University of Piraeus"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"University of Aegean"</span>,</span>
<span>              <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Athens University of Economics and Business"</span>,</span>
<span>              <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"University of Western Macedonia"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  dept <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Statistics and Insurance Science"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Statistics and Actuarial Science"</span>,</span>
<span>           <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Statistics"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Statistics"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  long <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">23.6529793</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">26.5664138</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">23.7300928</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">21.4565181</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  lat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">37.77</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">39.0851185</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">38.1940201</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">40.1197471</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  img <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://upload.wikimedia.org/wikipedia/en/thumb/a/a4/UNIPI_Emblem.png/250px-UNIPI_Emblem.png"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://upload.wikimedia.org/wikipedia/en/d/df/Aegean_University_logo.gif"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://upload.wikimedia.org/wikipedia/en/thumb/8/89/AUEB_EMBLEM.png/250px-AUEB_EMBLEM.png"</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/UoWM.png/120px-UoWM.png"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  established <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1938</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1984</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1920</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2003</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  dpt_est <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1977</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2000</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1989</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2019</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  town <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Piraeus"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Samos"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Athens"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Grevena"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">uni_coord</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">symbol</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"url(https://upload.wikimedia.org/wikipedia/commons/e/e4/Map_marker_icon_%E2%80%93_Nicolas_Mollet_%E2%80%93_Pin.svg)"</span>,</span>
<span>  <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"url(https://upload.wikimedia.org/wikipedia/commons/e/e4/Map_marker_icon_%E2%80%93_Nicolas_Mollet_%E2%80%93_Pin.svg)"</span>,</span>
<span>  <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"url(https://upload.wikimedia.org/wikipedia/commons/e/e4/Map_marker_icon_%E2%80%93_Nicolas_Mollet_%E2%80%93_Pin.svg)"</span>,</span>
<span>  <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"url(https://upload.wikimedia.org/wikipedia/commons/e/e4/Map_marker_icon_%E2%80%93_Nicolas_Mollet_%E2%80%93_Pin.svg)"</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Load Greece Map</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hcmap.html">hcmap</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"countries/gr/gr-all"</span>, name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SA"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">uni_coord</span>,</span>
<span>  type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"mappoint"</span>,</span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hcaes.html">hcaes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>lon <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">long</span>, lat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lat</span>, name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">uni</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Departments"</span>,</span>
<span>  color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"brown4"</span>,</span>
<span>  marker <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    symbol <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"url(https://cdn-icons-png.flaticon.com/512/5081/5081368.png)"</span>,  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># example map pin SVG</span></span>
<span>    width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span>,</span>
<span>    height <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;Statistics Departments of Greece&lt;/b&gt;"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"In Greece, there are a total of four public undergraduate statistics schools. The duration of study at these schools is four years. They are located in Athens, Piraeus, Samos, and Grevena."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stesiam, 2025"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  useHTML <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Enables HTML formatting</span></span>
<span>  formatter <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/htmlwidgets/man/JS.html">JS</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">    function() {</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">      return '&lt;div style=\"max-width: 300px; min-width: 150px; white-space: normal;\"&gt;' +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">      '&lt;div style=\"text-align: center; \"&gt;' + </span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;b&gt;' + this.point.unilong + '&lt;/b&gt;&lt;br&gt;(' + this.point.uni + ')&lt;/div&gt;' + </span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;br&gt;' +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;div style=\"text-align: center;\"&gt;&lt;em&gt;' + this.point.dept + '&lt;/em&gt;&lt;/div&gt;' +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">                '&lt;br&gt;' +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;img style=\"margin: auto; display:flex; justify-content: center;\" src=\"' + this.point.img + '\" width=\"40\" height=\"40\" style=\"border-radius:10px; margin-top:5px;\" /&gt;&lt;br&gt;' +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;b&gt;Town:&lt;/b&gt;' + this.point.town + '&lt;br&gt;' +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;b&gt;Est. University:&lt;/b&gt; ' + this.point.established + '&lt;br&gt;' + </span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;b&gt;Est. Dept.:&lt;/b&gt; ' + this.point.dpt_est + '&lt;br&gt;' + </span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;b&gt;Undergrads:&lt;/b&gt; ' + this.point.studs +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;/div&gt;';</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">    }</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">  "</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="επίλογος" class="level2"><h2 class="anchored" data-anchor-id="επίλογος">Επίλογος</h2>
<p>Η προσωπική μου άποψη είναι ότι το τμήμα Στατιστικής του Αιγαίου είναι μία πολύ δελεαστική επιλογή. Παρουσιάζεται (το τονίζω αυτό, παρουσιάζεται) ως ένα σοβαρό τμήμα με έναν σύγχρονο οδηγό σπουδών (λίγα μαθήματα που αντισταθμίζεται με τον ανάλογο φόρτο εργασίας). Το συγκεκριμένο τμήμα κατά τη γνώμη μου αδικείται από τη βάση που έχει. Αν είχα την επιλογή να διαλέξω δίχως να λάβω υπόψιν το οικονομικό κριτήριο (κόστος ενοικίου κτλ.) θα ήταν η πρώτη μου επιλογή. Βέβαια, αυτή η επιλογή όπως έγραψα και στην αρχή βασίζεται αποκλειστικά σε πράγματα που θα έβρισκα στο διαδίκτυο και απλά τα μάζεψα σε ένα άρθρο. Υπάρχουν και άλλα πράγματα που έχουν σημαντικότατο ρόλο, όπως οι διδάσκοντες, το επίπεδο μαθήματος, τήρηση κανονισμών, εγκαταστάσεις, προσβασιμότητα και άλλα που δυστυχώς θα τα μάθετε, όταν θα είναι πολύ αργά.</p>
</section><div id="quarto-appendix" class="default"><section id="acknowledgements" class="level2 appendix unlisted"><h2 class="anchored quarto-appendix-heading">Acknowledgements</h2><div class="quarto-appendix-contents">
<p>Image by <a href="https://pixabay.com/users/wokandapix-614097/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2093746">WOKANDAPIX</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2093746">Pixabay</a></p>


</div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{2023,
  author = {, stesiam},
  title = {Statistics {Studies} in {Greece}},
  date = {2023-06-20},
  url = {https://stesiam.com/posts/statistics-studies-in-greece/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-2023" class="csl-entry quarto-appendix-citeas">
stesiam. 2023. <span>“Statistics Studies in Greece.”</span> June 20,
2023. <a href="https://stesiam.com/posts/statistics-studies-in-greece/">https://stesiam.com/posts/statistics-studies-in-greece/</a>.
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>EDA</category>
  <guid>https://stesiam.com/posts/statistics-studies-in-greece/</guid>
  <pubDate>Tue, 20 Jun 2023 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/statistics-studies-in-greece/uni_class.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Kaggle’s Greek Community</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/kaggle-greek-community/</link>
  <description><![CDATA[ <section id="introduction" class="level1 page-columns page-full"><h1>Introduction</h1>
<p><a href="https://www.kaggle.com/">Kaggle</a> is one of the most well-known communities of data analysts/scientists with over 10 million active users <span class="citation" data-cites="headsortails2022">(Heads or Tails, 2020)</span>. Besides that, Kaggle offers an abundance of functionalities (Notebooks), information (through Discussions between users) and Competitions. It is worth noting that there are other similar communities but they cannot compare to the full functionality of Kaggle. For example, <a href="https://www.drivendata.org/">DrivenData</a> could be considered an alternative for participating in ML competitions, but it neither provides the possibility to create notebooks nor has a large number of users.</p>

<div class="no-row-height column-margin column-container"><div class="">
<center>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><img src="https://stesiam.com/posts/kaggle-greek-community/images/kaggle_logo.svg" height="100" class="figure-img"></p>
<figcaption>Kaggle’s logo</figcaption></figure>
</div>
</center>
</div></div><p><strong>Kaggle Machine Learning &amp; Data Science Survey</strong> is an annual survey conducted by Kaggle. The platform asks its users to analyze users’ data in the context of a competition. In this notebook, I conduct an analysis based on 2021’s survey in order to compare Greek data analysts with the rest of the world.</p>
</section><section id="prerequisites" class="level1"><h1>Prerequisites</h1>
<section id="import-libraries" class="level2"><h2 class="anchored" data-anchor-id="import-libraries">Import libraries</h2>
<p>This notebook will definitely make some charts, so the ggplot2 package is necessary. Also, having variables with too many values (e.g.&nbsp;country of each Kaggle user) is an indication of using tables, and for this the reactablefmtr package will help to get a nice result.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># General purpose R libraries</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://readr.tidyverse.org">readr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org">tidyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://forcats.tidyverse.org/">forcats</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">gridExtra</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://vincentarelbundock.github.io/countrycode/">countrycode</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Tables</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="http://haozhu233.github.io/kableExtra/">kableExtra</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://kcuilla.github.io/reactablefmtr/">reactablefmtr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Graphs</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org">ggplot2</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/">ggtext</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Add support for HTML/CSS on ggplot</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/yixuan/showtext">showtext</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/yixuan/sysfonts">sysfonts</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># System / Google fonts</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/jimjam-slam/ggflags">ggflags</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Other R packages</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/rstudio/fontawesome">fontawesome</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#library(htmltools) # for building div/links</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Other settings</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/options.html">options</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>digits<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># print only 4 decimals</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/options.html">options</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>warn <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">## Load fonts</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># font_families_google() ## see list with available Google fonts</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/sysfonts/man/font_add_google.html">font_add_google</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lilita One"</span>, family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"title"</span>, db_cache <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/sysfonts/man/font_add_google.html">font_add_google</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ysabeau Office"</span>, family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span>, db_cache <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/sysfonts/man/font_add_google.html">font_add_google</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Spline Sans"</span>, family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"text"</span>, db_cache <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/showtext/man/showtext_auto.html">showtext_auto</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">showtext</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/showtext/man/showtext_opts.html">showtext_opts</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>dpi <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">300</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="import-data" class="level2"><h2 class="anchored" data-anchor-id="import-data">Import data</h2>
<p>Using <code><a href="https://rdrr.io/r/utils/read.table.html">read.csv()</a></code> from readr package, I import my dataset and I name it as <code>kaggle_2021</code>. The dataset includes in the first line the question which is not required for my data analysis, so I exclude it from my dataset.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://readr.tidyverse.org/reference/read_delim.html">read_csv</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"data/kaggle_survey_2021.csv"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Delete second line</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span></code></pre></div></div>
</div>
</section><section id="prepare-data" class="level2"><h2 class="anchored" data-anchor-id="prepare-data">Prepare Data</h2>
<p>Since my analysis is based on Greek users, I split the dataset into two parts. One part includes exclusively Greek users and all the rest another. Thus, we can observe any differences or similarities with broader Kaggle’s userbase.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Recoding Q2 variable</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://forcats.tidyverse.org/reference/fct_recode.html">fct_recode</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Nonbinary"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Prefer not to say"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Prefer to self-describe"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">## Recoding kaggle_2021$Q3</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://forcats.tidyverse.org/reference/fct_recode.html">fct_recode</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Hong Kong"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Hong Kong (S.A.R.)"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"I do not wish to disclose my location"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Iran"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Iran, Islamic Republic of..."</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"UAE"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"United Arab Emirates"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"UK"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"United Kingdom of Great Britain and Northern Ireland"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"USA"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"United States of America"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Vietnam"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Viet Nam"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">## Recoding kaggle_2021$Q6</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q6</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q6</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://forcats.tidyverse.org/reference/fct_recode.html">fct_recode</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"0 years"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"I have never written code"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">## Recoding kaggle_2021$Q4</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q4</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q4</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://forcats.tidyverse.org/reference/fct_recode.html">fct_recode</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bachelor"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bachelor’s degree"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PhD"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Doctoral degree"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"I prefer not to answer"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Master"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Master’s degree"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"No"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"No formal education past high school"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ProfDoc"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Professional doctorate"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"UniNoDegree"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Some college/university study without earning a bachelor’s degree"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q4</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q4</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://forcats.tidyverse.org/reference/fct_relevel.html">fct_relevel</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"No"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"UniNoDegree"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bachelor"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Master"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PhD"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ProfDoc"</span>,</span>
<span>    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Q3 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/if_else.html">if_else</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Greece"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section></section><section id="kaggles-community" class="level1"><h1>Kaggle’s community</h1>
<p>One of the first thing I observed when I signed up on Kaggle was the vast majority of nationalities and the multicultural origin of the platform. Many people from many countries all in one platform gathered sharing the same passion for Data Science and Data Analytics. Something like Facebook but for Statistics :)</p>
<p>Nevermind, I decided to make a <code>reactable</code> to see from which nationalities the platform is comprised from. One out of four users are from India which makes them the most populous nation in platform. By the way, Greek users are way less making a 0.39% of Kaggle’s userbase.</p>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
<span class="screen-reader-only">Note</span>Assumptions Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>We should note that the results are from Kaggle’s Survey. That is to say from people that participated. An assumption has to be done that the distribution of the users that participated is the same with the ones who didn’t.</p>
</div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">a</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/desc.html">desc</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>            <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/reactable.html">reactable</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>,</span>
<span>              defaultPageSize <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span>,</span>
<span>              theme <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://kcuilla.github.io/reactablefmtr/reference/espn.html">espn</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>              columns <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>                Q3 <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Country"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Population"</span>, </span>
<span>                           defaultSortOrder <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"desc"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage (%)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>              defaultColDef <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>                cell <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://kcuilla.github.io/reactablefmtr/reference/data_bars.html">data_bars</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>, </span>
<span>                                 text_position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"outside-base"</span>,</span>
<span>                                 fill_opacity <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>, round_edges <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span></span>
<span>                <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>              <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://kcuilla.github.io/reactablefmtr/reference/add_title.html">add_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">reactablefmtr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://kcuilla.github.io/reactablefmtr/reference/html.html">html</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Kaggle's Community by Country &lt;img src='https://www.svgrepo.com/show/387896/laptop.svg' alt='' width='40' height='40'&gt;"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    margin <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">reactablefmtr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://kcuilla.github.io/reactablefmtr/reference/margin.html">margin</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>t<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,r<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,b<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>,l<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>            <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://kcuilla.github.io/reactablefmtr/reference/add_subtitle.html">add_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"India is the most represented country, followed by the United States."</span>, font_size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">14</span>, font_weight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"normal"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>            <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://kcuilla.github.io/reactablefmtr/reference/add_source.html">add_source</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stesiam | Data : Kaggle Survey 2021"</span>, font_size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>, align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"right"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">a</span></span></code></pre></div></div>
<div class="cell-output-display">
<h1 style="color:#000;background:#FFFFFF;text-align:left;font-size:32px;font-style:normal;font-weight:bold;text-decoration:;letter-spacing:px;word-spacing:px;text-transform:;text-shadow:;margin-top:0px;margin-right:0px;margin-bottom:3px;margin-left:0px">Kaggle's Community by Country <img src="https://www.svgrepo.com/show/387896/laptop.svg" alt="" width="40" height="40">
</h1>
<h2 style="color:#000;background:#FFFFFF;text-align:left;font-size:14px;font-style:normal;font-weight:normal;text-decoration:;letter-spacing:px;word-spacing:px;text-transform:;text-shadow:;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px" class="anchored" data-anchor-id="kaggles-community">India is the most represented country, followed by the United States.</h2>
<div class="reactable html-widget html-fill-item" id="htmlwidget-9fac0c6684b48cf65d1d" style="width:auto;height:auto;"></div>
<p style="color:#000;background:#FFFFFF;text-align:right;font-size:12px;font-style:normal;font-weight:normal;text-decoration:;letter-spacing:px;word-spacing:px;text-transform:;text-shadow:;margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">stesiam | Data : Kaggle Survey 2021</p>
<script type="application/json" data-for="htmlwidget-9fac0c6684b48cf65d1d">{"x":{"tag":{"name":"Reactable","attribs":{"data":{"Q3":["India","USA","Other","Japan","China","Brazil","Russia","Nigeria","UK","Pakistan","Egypt","Germany","Spain","Indonesia","Turkey","France","South Korea","Taiwan","Canada","Bangladesh","Italy","Mexico","Vietnam","Australia","Kenya","Colombia","Poland","Iran","Ukraine","Argentina","Singapore","Malaysia","Netherlands","South Africa","Morocco","Israel","Thailand","Portugal","Peru","UAE","Philippines","Tunisia","Sri Lanka","Chile","Greece","Ghana","Saudi Arabia","Ireland","Sweden","Hong Kong","Nepal","Switzerland","Belgium","Czech Republic","Romania","Austria","Belarus","Ecuador","Denmark","Uganda","Algeria","Ethiopia","Iraq","Kazakhstan","Norway"],"n":[7434,2650,1339,921,814,751,742,702,550,530,482,470,454,444,416,401,359,334,331,317,311,279,277,264,248,225,219,195,186,182,182,156,153,146,140,138,123,119,117,111,108,109,106,102,102,99,89,84,81,79,75,71,65,63,61,51,51,50,48,47,44,43,43,45,45],"pct":[28.62,10.2,5.16,3.55,3.13,2.89,2.86,2.7,2.12,2.04,1.86,1.81,1.75,1.71,1.6,1.54,1.38,1.29,1.27,1.22,1.2,1.07,1.07,1.02,0.95,0.87,0.84,0.75,0.72,0.7,0.7,0.6,0.59,0.56,0.54,0.53,0.47,0.46,0.45,0.43,0.42,0.42,0.41,0.39,0.39,0.38,0.34,0.32,0.31,0.3,0.29,0.27,0.25,0.24,0.23,0.2,0.2,0.19,0.18,0.18,0.17,0.17,0.17,0.17,0.17]},"columns":[{"id":"Q3","name":"Country","type":"factor","cell":["India","USA","Other","Japan","China","Brazil","Russia","Nigeria","UK","Pakistan","Egypt","Germany","Spain","Indonesia","Turkey","France","South Korea","Taiwan","Canada","Bangladesh","Italy","Mexico","Vietnam","Australia","Kenya","Colombia","Poland","Iran","Ukraine","Argentina","Singapore","Malaysia","Netherlands","South Africa","Morocco","Israel","Thailand","Portugal","Peru","UAE","Philippines","Tunisia","Sri Lanka","Chile","Greece","Ghana","Saudi Arabia","Ireland","Sweden","Hong Kong","Nepal","Switzerland","Belgium","Czech Republic","Romania","Austria","Belarus","Ecuador","Denmark","Uganda","Algeria","Ethiopia","Iraq","Kazakhstan","Norway"]},{"id":"n","name":"Population","type":"numeric","cell":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":[" 7434",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"100%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":[" 2650",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"35.6470271724509%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":[" 1339",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"18.0118375033629%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  921",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"12.3890234059726%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  814",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"10.9496906107076%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  751",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"10.1022329835889%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  742",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"9.98116760828625%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  702",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"9.44309927360775%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  550",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"7.39843960182943%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  530",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"7.12940543449018%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  482",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"6.48372343287597%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  470",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"6.32230293247242%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  454",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"6.10707559860102%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  444",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"5.9725585149314%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  416",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"5.59591068065644%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  401",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"5.394135055152%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  359",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.82916330373957%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  334",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.49287059456551%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  331",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.45251546946462%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  317",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.26419155232715%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  311",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.18348130212537%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  279",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.75302663438257%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  277",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.72612321764864%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  264",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.55125100887813%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  248",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.33602367500673%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  225",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.02663438256659%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  219",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.94592413236481%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  195",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.62308313155771%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  186",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.50201775625504%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  182",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.44821092278719%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  182",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.44821092278719%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  156",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.09846650524617%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  153",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.05811138014528%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  146",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.96394942157654%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  140",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.88323917137476%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  138",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.85633575464084%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  123",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.6545601291364%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  119",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.60075329566855%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  117",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.57384987893462%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  111",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.49313962873285%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  108",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.45278450363196%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  109",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.46623621199892%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  106",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.42588108689804%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  102",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.37207425343019%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  102",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.37207425343019%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   99",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.3317191283293%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   89",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.19720204465967%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   84",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.12994350282486%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   81",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.08958837772397%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   79",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.06268496099005%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   75",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.0088781275222%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   71",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.955071294054345%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   65",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.874361043852569%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   63",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.847457627118644%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   61",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.820554210384719%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   51",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.686037126715093%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   51",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.686037126715093%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   50",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.67258541834813%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   48",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.645682001614205%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   47",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.632230293247242%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   44",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.591875168146355%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   43",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.578423459779392%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   43",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.578423459779392%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   45",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.605326876513317%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   45",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.605326876513317%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]}],"defaultSortDesc":true},{"id":"pct","name":"Percentage (%)","type":"numeric","cell":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":[" 28.62",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"100%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  10.2",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"35.6394129979036%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  5.16",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"18.0293501048218%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  3.55",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"12.4039133473096%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  3.13",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"10.9364081062194%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  2.89",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"10.0978336827393%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  2.86",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"9.99301187980433%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   2.7",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"9.43396226415094%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  2.12",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"7.40740740740741%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  2.04",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"7.12788259958071%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.86",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"6.49895178197065%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.81",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"6.32424877707897%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.75",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"6.11460517120894%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.71",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"5.9748427672956%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   1.6",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"5.59049615653389%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.54",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"5.38085255066387%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.38",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.82180293501048%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.29",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.50733752620545%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.27",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.43745632424878%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.22",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.26275331935709%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   1.2",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"4.19287211740042%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.07",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.73864430468204%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.07",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.73864430468204%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  1.02",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.56394129979036%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.95",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.319357092942%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.87",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"3.0398322851153%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.84",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.93501048218029%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.75",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.62054507337526%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.72",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.51572327044025%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   0.7",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.44584206848358%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   0.7",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.44584206848358%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   0.6",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.09643605870021%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.59",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"2.06149545772187%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.56",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.95667365478686%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.54",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.88679245283019%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.53",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.85185185185185%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.47",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.64220824598183%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.46",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.60726764500349%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.45",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.57232704402516%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.43",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.50244584206848%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.42",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.46750524109015%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.42",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.46750524109015%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.41",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.43256464011181%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.39",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.36268343815514%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.39",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.36268343815514%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.38",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.3277428371768%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.34",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.18798043326345%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.32",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.11809923130678%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.31",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.08315863032844%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   0.3",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.0482180293501%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.29",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"1.01327742837177%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.27",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.943396226415094%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.25",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.873515024458421%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.24",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.838574423480084%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.23",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.803633822501747%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   0.2",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.698812019566737%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["   0.2",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.698812019566737%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.19",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.6638714185884%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.18",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.628930817610063%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.18",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.628930817610063%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.17",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.593990216631726%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.17",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.593990216631726%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.17",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.593990216631726%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.17",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.593990216631726%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]},{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center","color":"black","fontSize":null,"fontWeight":"normal"}},"children":["  0.17",{"name":"div","attribs":{"style":{"flexGrow":1,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"marginLeft":"6px","background":"#EEEEEE"}},"children":[{"name":"div","attribs":{"style":{"display":"flex","alignItems":"center"}},"children":[{"name":"div","attribs":{"style":{"boxShadow":null,"borderTopLeftRadius":9,"borderBottomLeftRadius":9,"borderTopRightRadius":9,"borderBottomRightRadius":9,"background":"#15607A80","backgroundImage":null,"border":"  ","color":"black","width":"0.593990216631726%","height":18,"transition":"width 1s ease","display":"flex","alignItems":"center"}},"children":[""]}]}]}]}]}],"defaultPageSize":6,"theme":{"color":"#6C6D6F","backgroundColor":"#ffffff","borderColor":"#ededed","borderWidth":"1px","stripedColor":"#fafafa","highlightColor":"#fafafa","cellPadding":7,"tableStyle":{"fontSize":12},"headerStyle":{"borderTop":"1px solid #e1e2e4","borderBottom":"1px solid #e1e2e4","padding":"4px","background":"#ffffff","borderColor":"#ffffff","color":"#48494a","textTransform":"uppercase","&:hover":{"color":"#004D9A"},"fontSize":11},"groupHeaderStyle":{"borderTop":"1px solid #e1e2e4","borderLeft":"1px solid #e1e2e4","borderRight":"1px solid #e1e2e4","backgroundColor":"#ffffff","textTransform":"uppercase","fontSize":"11px","color":"#6C6D6F","fontSize.1":11},"rowSelectedStyle":{"backgroundColor":"#48494a"},"inputStyle":{"backgroundColor":"#ffffff","color":"#6C6D6F"},"searchInputStyle":{"color":"#6C6D6F","fontSize":"13px"},"selectStyle":{"color":"#48494a"},"paginationStyle":{"color":"#48494a","fontSize":"13px"},"pageButtonStyle":{"color":"#48494a","fontSize":"13px"}},"dataKey":"66f633f8f6382264e2dd6a1d81c5eb86"},"children":[]},"class":"reactR_markup"},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="women-participation-in-ds" class="level1"><h1>Women participation in DS</h1>
<p>Generally, women are under-represented in labor market. According to the World Bank <span class="citation" data-cites="worldbank2023">(2023)</span>, only one in two women participates in the labor market, in contrast to men whose corresponding participation is 7 in 10. Does DS community follow the same pattern? As it seems, <strong>it varies</strong>.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>            Women <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/factor.html">factor</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Woman"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>            pct_women <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">iso2c</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://vincentarelbundock.github.io/countrycode/man/countrycode.html">countrycode</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"country.name"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"iso2c"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">iso2c</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/chartr.html">tolower</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">iso2c</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/get_theme.html">theme_set</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggtheme.html">theme_light</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_col</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/reorder.factor.html">reorder</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, fill <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/scale_gradient.html">scale_fill_gradient2</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>low<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"purple"</span>, high<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"purple4"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_label</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/subset.html">subset</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Extremes.html">max</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Greece"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Extremes.html">min</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1.5</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/reorder.factor.html">reorder</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, label <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"text"</span>, size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">ggflags</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/ggflags/man/geom_flag.html">geom_flag</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.3</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>,</span>
<span>                         country <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">iso2c</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, </span>
<span>                         size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_abline.html">geom_vline</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>xintercept <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/mean.html">mean</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, linetype <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"dashed"</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pink1"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/mean.html">mean</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, label<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Average: "</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/mean.html">mean</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" %"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Colombia"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, angle<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">270</span>,</span>
<span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"text"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/scale_continuous.html">scale_x_continuous</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>limits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">50</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;Women participation in DS community per country&lt;/b&gt;"</span>,</span>
<span>    subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Based on Kaggle's 2021 Survey women are underrepresented in DS. The country with the &lt;br&gt; highest women participation is Tunisia and Peru is one with the lowest. Last but not least,&lt;br&gt; **&lt;span style= 'color: #001489;'&gt;Greece&lt;/span&gt;** has a relatively disappointing rate of women participation holding 15th place with &lt;br&gt; 15.7\\%, given the fact that the average is {round(mean(data$pct_women),digits = 2)} %"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"**Data:** Kaggle Survey 2021&lt;br&gt;&lt;b&gt;stesiam&lt;/b&gt;, 2023"</span>,</span>
<span>    x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage (%) of Women"</span>,</span>
<span>    y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Countries"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/coord_cartesian.html">coord_cartesian</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>expand <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/kaggle-greek-community/index_files/figure-html/unnamed-chunk-5-1.png" class="img-fluid figure-img" width="2100"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://purrr.tidyverse.org/">purrr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Add emoji flags</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>flag <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://purrr.tidyverse.org/reference/map.html">map_chr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">iso2c</span>, <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">chars</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/utf8Conversion.html">utf8ToInt</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/chartr.html">toupper</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.x</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/utf8Conversion.html">intToUtf8</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">127397</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">chars</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>            <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/utf8Conversion.html">intToUtf8</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">127397</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">chars</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bar"</span>, inverted <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;Women participation in DS community per country&lt;/b&gt;"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Based on Kaggle's 2021 Survey women are underrepresented in DS. The country with the highest women participation is Tunisia and Peru is one with the lowest. Last but not least, &lt;b&gt;Greece&lt;/b&gt; has a relatively disappointing rate of women participation holding 15th place with 15.7%, given the fact that the average is {round(mean(data$pct_women),digits = 2)} %"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Data: Kaggle Survey 2021 | &lt;b&gt;stesiam&lt;/b&gt;, 2023"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">NULL</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percent (%)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Women %"</span>,</span>
<span>        data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://purrr.tidyverse.org/reference/map.html">map</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/seq.html">seq_len</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>            <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>                y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct_women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>                Women <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Women</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>                n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>                country <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>                flag <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data_decreasing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">flag</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span>            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        useHTML <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>        formatter <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/htmlwidgets/man/JS.html">JS</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">      function() {</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">        var point = this.point;</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">        return '&lt;span style=\"font-size:22px\"&gt;' + point.flag + '&lt;/span&gt; ' +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               '&lt;b&gt;' + point.country + '&lt;/b&gt;&lt;br&gt;' +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               'Percent: ' + Highcharts.numberFormat(this.y, 2) + '%&lt;br&gt;' +</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">               'Women: ' + point.Women + ' / ' + point.n;</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">      }</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">    "</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-1a3abf275ac55f996834" style="width:100%;height:1114px;"></div>
<script type="application/json" data-for="htmlwidget-1a3abf275ac55f996834">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar","inverted":true},"title":{"text":"<b>Women participation in DS community per country<\/b>"},"yAxis":{"title":{"text":"Percent (%)"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Based on Kaggle's 2021 Survey women are underrepresented in DS. The country with the highest women participation is Tunisia and Peru is one with the lowest. Last but not least, <b>Greece<\/b> has a relatively disappointing rate of women participation holding 15th place with 15.7%, given the fact that the average is 17.66 %"},"caption":{"text":"Data: Kaggle Survey 2021 | <b>stesiam<\/b>, 2023"},"xAxis":{"categories":["Tunisia","Sri Lanka","Saudi Arabia","Malaysia","Algeria","Iran","Egypt","Romania","UAE","Portugal","Taiwan","Philippines","USA","India","Norway","Indonesia","Kenya","Singapore","UK","South Korea","Thailand","Canada","Morocco","South Africa","Uganda","Turkey","Vietnam","Iraq","Switzerland","Hong Kong","Czech Republic","Israel","Germany","France","Netherlands","Ukraine","Ecuador","Austria","Greece","Kazakhstan","Pakistan","Nigeria","Australia","Russia","Poland","Sweden","Bangladesh","Argentina","China","Spain","Denmark","Belgium","Mexico","Belarus","Colombia","Brazil","Italy","Ireland","Nepal","Chile","Ghana","Japan","Ethiopia","Peru"],"title":{"text":null}},"legend":{"enabled":false},"series":[{"name":"Women %","data":[{"y":38.53211009174312,"Women":42,"n":109,"country":"Tunisia","flag":"🇹🇳"},{"y":33.9622641509434,"Women":36,"n":106,"country":"Sri Lanka","flag":"🇱🇰"},{"y":30.3370786516854,"Women":27,"n":89,"country":"Saudi Arabia","flag":"🇸🇦"},{"y":27.56410256410257,"Women":43,"n":156,"country":"Malaysia","flag":"🇲🇾"},{"y":27.27272727272727,"Women":12,"n":44,"country":"Algeria","flag":"🇩🇿"},{"y":26.66666666666667,"Women":52,"n":195,"country":"Iran","flag":"🇮🇷"},{"y":26.34854771784233,"Women":127,"n":482,"country":"Egypt","flag":"🇪🇬"},{"y":26.22950819672131,"Women":16,"n":61,"country":"Romania","flag":"🇷🇴"},{"y":25.22522522522522,"Women":28,"n":111,"country":"UAE","flag":"🇦🇪"},{"y":24.36974789915966,"Women":29,"n":119,"country":"Portugal","flag":"🇵🇹"},{"y":24.25149700598802,"Women":81,"n":334,"country":"Taiwan","flag":"🇹🇼"},{"y":24.07407407407407,"Women":26,"n":108,"country":"Philippines","flag":"🇵🇭"},{"y":22.86792452830188,"Women":606,"n":2650,"country":"USA","flag":"🇺🇸"},{"y":22.27602905569007,"Women":1656,"n":7434,"country":"India","flag":"🇮🇳"},{"y":22.22222222222222,"Women":10,"n":45,"country":"Norway","flag":"🇳🇴"},{"y":21.62162162162162,"Women":96,"n":444,"country":"Indonesia","flag":"🇮🇩"},{"y":21.37096774193548,"Women":53,"n":248,"country":"Kenya","flag":"🇰🇪"},{"y":20.87912087912088,"Women":38,"n":182,"country":"Singapore","flag":"🇸🇬"},{"y":20.54545454545454,"Women":113,"n":550,"country":"UK","flag":"🇬🇧"},{"y":20.05571030640668,"Women":72,"n":359,"country":"South Korea","flag":"🇰🇷"},{"y":19.51219512195122,"Women":24,"n":123,"country":"Thailand","flag":"🇹🇭"},{"y":19.33534743202417,"Women":64,"n":331,"country":"Canada","flag":"🇨🇦"},{"y":19.28571428571429,"Women":27,"n":140,"country":"Morocco","flag":"🇲🇦"},{"y":19.17808219178082,"Women":28,"n":146,"country":"South Africa","flag":"🇿🇦"},{"y":19.14893617021277,"Women":9,"n":47,"country":"Uganda","flag":"🇺🇬"},{"y":18.99038461538461,"Women":79,"n":416,"country":"Turkey","flag":"🇹🇷"},{"y":18.77256317689531,"Women":52,"n":277,"country":"Vietnam","flag":"🇻🇳"},{"y":18.6046511627907,"Women":8,"n":43,"country":"Iraq","flag":"🇮🇶"},{"y":18.30985915492958,"Women":13,"n":71,"country":"Switzerland","flag":"🇨🇭"},{"y":17.72151898734177,"Women":14,"n":79,"country":"Hong Kong","flag":"🇭🇰"},{"y":17.46031746031746,"Women":11,"n":63,"country":"Czech Republic","flag":"🇨🇿"},{"y":17.39130434782609,"Women":24,"n":138,"country":"Israel","flag":"🇮🇱"},{"y":17.23404255319149,"Women":81,"n":470,"country":"Germany","flag":"🇩🇪"},{"y":16.70822942643392,"Women":67,"n":401,"country":"France","flag":"🇫🇷"},{"y":16.33986928104575,"Women":25,"n":153,"country":"Netherlands","flag":"🇳🇱"},{"y":16.12903225806452,"Women":30,"n":186,"country":"Ukraine","flag":"🇺🇦"},{"y":16,"Women":8,"n":50,"country":"Ecuador","flag":"🇪🇨"},{"y":15.68627450980392,"Women":8,"n":51,"country":"Austria","flag":"🇦🇹"},{"y":15.68627450980392,"Women":16,"n":102,"country":"Greece","flag":"🇬🇷"},{"y":15.55555555555556,"Women":7,"n":45,"country":"Kazakhstan","flag":"🇰🇿"},{"y":15.28301886792453,"Women":81,"n":530,"country":"Pakistan","flag":"🇵🇰"},{"y":15.24216524216524,"Women":107,"n":702,"country":"Nigeria","flag":"🇳🇬"},{"y":14.39393939393939,"Women":38,"n":264,"country":"Australia","flag":"🇦🇺"},{"y":14.01617250673855,"Women":104,"n":742,"country":"Russia","flag":"🇷🇺"},{"y":13.6986301369863,"Women":30,"n":219,"country":"Poland","flag":"🇵🇱"},{"y":13.58024691358025,"Women":11,"n":81,"country":"Sweden","flag":"🇸🇪"},{"y":13.56466876971609,"Women":43,"n":317,"country":"Bangladesh","flag":"🇧🇩"},{"y":13.18681318681319,"Women":24,"n":182,"country":"Argentina","flag":"🇦🇷"},{"y":13.02211302211302,"Women":106,"n":814,"country":"China","flag":"🇨🇳"},{"y":12.55506607929516,"Women":57,"n":454,"country":"Spain","flag":"🇪🇸"},{"y":12.5,"Women":6,"n":48,"country":"Denmark","flag":"🇩🇰"},{"y":12.30769230769231,"Women":8,"n":65,"country":"Belgium","flag":"🇧🇪"},{"y":11.82795698924731,"Women":33,"n":279,"country":"Mexico","flag":"🇲🇽"},{"y":11.76470588235294,"Women":6,"n":51,"country":"Belarus","flag":"🇧🇾"},{"y":11.11111111111111,"Women":25,"n":225,"country":"Colombia","flag":"🇨🇴"},{"y":10.78561917443409,"Women":81,"n":751,"country":"Brazil","flag":"🇧🇷"},{"y":9.646302250803858,"Women":30,"n":311,"country":"Italy","flag":"🇮🇹"},{"y":9.523809523809524,"Women":8,"n":84,"country":"Ireland","flag":"🇮🇪"},{"y":9.333333333333334,"Women":7,"n":75,"country":"Nepal","flag":"🇳🇵"},{"y":8.823529411764707,"Women":9,"n":102,"country":"Chile","flag":"🇨🇱"},{"y":8.080808080808081,"Women":8,"n":99,"country":"Ghana","flag":"🇬🇭"},{"y":7.38327904451683,"Women":68,"n":921,"country":"Japan","flag":"🇯🇵"},{"y":4.651162790697675,"Women":2,"n":43,"country":"Ethiopia","flag":"🇪🇹"},{"y":4.273504273504273,"Women":5,"n":117,"country":"Peru","flag":"🇵🇪"}]}],"tooltip":{"useHTML":true,"formatter":"\n      function() {\n        var point = this.point;\n        return '<span style=\"font-size:22px\">' + point.flag + '<\/span> ' +\n               '<b>' + point.country + '<\/b><br>' +\n               'Percent: ' + Highcharts.numberFormat(this.y, 2) + '%<br>' +\n               'Women: ' + point.Women + ' / ' + point.n;\n      }\n    "}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":["hc_opts.tooltip.formatter"],"jsHooks":[]}</script>
</div>
</div>
</section><section id="age-distribution" class="level1"><h1>Age Distribution</h1>
<p>Greece’s Kaggle Community it is comprised from more elerly people comapred to the rest of Kaggle’s community. More specifically, Greece’s most prevalent age group is 25-29 and a sufficient proportion of users on their 40s. On the contrary, Kaggle’s community is quite youthy with most prevalent the three youngest age groups. Aggrevetating, those groups consist six out of ten userbase of Kaggle’s community.</p>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/get_theme.html">theme_set</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggtheme.html">theme_light</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>total <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>         pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">total</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q1</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output cell-output-stderr">
<pre><code>`summarise()` has grouped output by 'Q3'. You can override using the `.groups`
argument.</code></pre>
</div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"areaspline"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Age Distribution of Kaggle Community (🇬🇷 / 🌍)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/unique.html">unique</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Population (%)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>shared <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>, valueSuffix <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" units"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    areaspline <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      fillOpacity <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># match the Highcharts demo's fill</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    layout <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"vertical"</span>,</span>
<span>    align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"left"</span>,</span>
<span>    verticalAlign <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"top"</span>,</span>
<span>    x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">450</span>,</span>
<span>    y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span>    floating <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>    borderWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Greece"</span>,</span>
<span>    data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Greece"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Rest of the World"</span>,</span>
<span>    data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-3afd667b30163a6314e7" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-3afd667b30163a6314e7">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"areaspline"},"title":{"text":"Age Distribution of Kaggle Community (🇬🇷 / 🌍)"},"yAxis":{"title":{"text":"Population (%)"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"areaspline":{"fillOpacity":0.5}},"xAxis":{"categories":["18-21","22-24","25-29","30-34","35-39","40-44","45-49","50-54","55-59","60-69","70+"]},"tooltip":{"shared":true,"valueSuffix":" units"},"legend":{"layout":"vertical","align":"left","verticalAlign":"top","x":450,"y":100,"floating":true,"borderWidth":1},"series":[{"data":[4.9,13.7,24.5,14.7,10.8,8.800000000000001,12.7,4.9,4.9],"name":"Greece"},{"data":[18.9,18.1,19,13.2,9.6,7.3,5.3,3.7,2.3,2.1,0.5],"name":"Rest of the World"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="educational-background" class="level1"><h1>Educational Background</h1>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">ungroup</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output cell-output-stderr">
<pre><code>`summarise()` has grouped output by 'Q3'. You can override using the `.groups`
argument.</code></pre>
</div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">d</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q4</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/match.html">%in%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bachelor"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Master"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PhD"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bar"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Age Distribution of Kaggle Community (🇬🇷 / 🌍)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Greek Kagglers have attained higher studies."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stesiam, 2023"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">d</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q4</span>,</span>
<span>           title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">NULL</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span>           title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage (%) of total respondents by Country / Region"</span>, align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"high"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>           labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>overflow <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"justify"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>valueSuffix <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" units"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>bar <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_series.html">hc_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Greece"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">d</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Greece"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Rest World"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">d</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>,</span>
<span>    verticalAlign <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"top"</span>,</span>
<span>    layout <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"horizontal"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-8887f24028300b6c0096" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-8887f24028300b6c0096">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar"},"title":{"text":"Age Distribution of Kaggle Community (🇬🇷 / 🌍)"},"yAxis":{"title":{"text":"Percentage (%) of total respondents by Country / Region","align":"high"},"min":0,"labels":{"overflow":"justify"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"bar":{"dataLabels":{"enabled":true}}},"subtitle":{"text":"Greek Kagglers have attained higher studies."},"caption":{"text":"stesiam, 2023"},"xAxis":{"categories":["Bachelor","Master","PhD","Bachelor","Master","PhD"],"title":{"text":null}},"tooltip":{"valueSuffix":" units"},"series":[{"name":"Greece","data":[18.6,57.8,20.6]},{"name":"Rest World","data":[38.2,38.9,10.7]}],"legend":{"align":"center","verticalAlign":"top","layout":"horizontal"}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="programming-language" class="level1"><h1>Programming Language</h1>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">d1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q7_Part_1</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q7_Part_2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q7_Part_1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Python"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/na.fail.html">na.omit</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">d2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q7_Part_2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q7_Part_2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"R"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/na.fail.html">na.omit</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">d3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q7_Part_8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q7_Part_8</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Julia"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/na.fail.html">na.omit</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="common-stacks" class="level1"><h1>Common Stacks</h1>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyselect.r-lib.org/reference/starts_with.html">starts_with</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Q7"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/unite.html">unite</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyselect.r-lib.org/reference/starts_with.html">starts_with</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Q7"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, sep <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">","</span>, na.rm <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Greece"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_col</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/reorder.factor.html">reorder</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span>, <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, label <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"%"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" ("</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">")"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Popular Stacks in Greece"</span>,</span>
<span>    subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Python seems to be THE tool for a big portion of Greek Analysts."</span>,</span>
<span>    caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stesiam, 2023"</span>,</span>
<span>    x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stacks"</span>,</span>
<span>    y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggtheme.html">theme_classic</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/theme.html">theme</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    plot.title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_markdown.html">element_markdown</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"title"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    plot.subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_markdown.html">element_markdown</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span>, lineheight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    plot.caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_markdown.html">element_markdown</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">element_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyselect.r-lib.org/reference/starts_with.html">starts_with</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Q7"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/unite.html">unite</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyselect.r-lib.org/reference/starts_with.html">starts_with</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Q7"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, sep <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">","</span>, na.rm <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_col</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/reorder.factor.html">reorder</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span>, <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, label <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"%"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" ("</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">")"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Popular Stacks in Greece"</span>,</span>
<span>    subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Python seems to be THE tool for a big portion of Greek Analysts."</span>,</span>
<span>    caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stesiam, 2023"</span>,</span>
<span>    x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stacks"</span>,</span>
<span>    y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggtheme.html">theme_classic</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/theme.html">theme</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    plot.title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_markdown.html">element_markdown</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"title"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    plot.subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_markdown.html">element_markdown</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span>, lineheight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    plot.caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_markdown.html">element_markdown</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">element_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
<div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/kaggle-greek-community/index_files/figure-html/unnamed-chunk-13-1.png" class="img-fluid figure-img" width="2100"></p>
</figure>
</div>
</div>
</div>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyselect.r-lib.org/reference/starts_with.html">starts_with</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Q7"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyr.tidyverse.org/reference/unite.html">unite</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tidyselect.r-lib.org/reference/starts_with.html">starts_with</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Q7"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, sep <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">","</span>, na.rm <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_col</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/reorder.factor.html">reorder</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span>, <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Combined</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, label <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"%"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" ("</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">")"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Popular Stacks in Greece"</span>,</span>
<span>    subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Python seems to be THE tool for a big portion of Greek Analysts."</span>,</span>
<span>    caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stesiam, 2023"</span>,</span>
<span>    x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stacks"</span>,</span>
<span>    y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggtheme.html">theme_classic</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/theme.html">theme</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    plot.title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_markdown.html">element_markdown</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"title"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    plot.subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_markdown.html">element_markdown</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span>, lineheight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    plot.caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_markdown.html">element_markdown</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">element_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>family <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"subtitle"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="ides" class="level1"><h1>IDEs</h1>
<section id="python-users" class="level2"><h2 class="anchored" data-anchor-id="python-users">Python users</h2>
</section><section id="r-users" class="level2"><h2 class="anchored" data-anchor-id="r-users">R users</h2>
</section></section><section id="jobs" class="level1"><h1>Jobs</h1>
<div class="cell">
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">jobs1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Greece"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">jobs2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kaggle_2021_compare</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Other"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Q5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="conclusions" class="level1"><h1>Conclusions</h1>
</section><div id="quarto-appendix" class="default"><section id="acknowledgements" class="level1 appendix unlisted"><h2 class="anchored quarto-appendix-heading">Acknowledgements</h2><div class="quarto-appendix-contents">
<p>Dataset based on <a href="https://www.kaggle.com/competitions/kaggle-survey-2021/overview">2021 Kaggle Machine Learning &amp; Data Science Survey</a></p>
<p>Image by <a href="https://pixabay.com/users/graphicbunny-10705863/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4441595">Christina Smith</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4441595">Pixabay</a></p>
</div></section><section id="references" class="level1 appendix unlisted"><h2 class="quarto-appendix-heading"></h2><div class="quarto-appendix-contents">



</div></section><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0" data-line-spacing="2">
<div id="ref-R-countrycode" class="csl-entry">
Arel-Bundock, V. (2025). <em>Countrycode: Convert country names and country codes</em>. Retrieved from <a href="https://vincentarelbundock.github.io/countrycode/">https://vincentarelbundock.github.io/countrycode/</a>
</div>
<div id="ref-countrycode2018" class="csl-entry">
Arel-Bundock, V., Enevoldsen, N., &amp; Yetman, C. (2018). Countrycode: An r package to convert country names and country codes. <em>Journal of Open Source Software</em>, <em>3</em>(28), 848. Retrieved from <a href="https://doi.org/10.21105/joss.00848">https://doi.org/10.21105/joss.00848</a>
</div>
<div id="ref-R-gridExtra" class="csl-entry">
Auguie, B. (2017). <em>gridExtra: Miscellaneous functions for "grid" graphics</em>. <a href="https://doi.org/10.32614/CRAN.package.gridExtra">https://doi.org/10.32614/CRAN.package.gridExtra</a>
</div>
<div id="ref-R-ggflags" class="csl-entry">
Auguie, B., Goldie, J., &amp; Thériault, R. (2023). <em>Ggflags: Plot flags of the world in ggplot2</em>. Retrieved from <a href="https://github.com/jimjam-slam/ggflags">https://github.com/jimjam-slam/ggflags</a>
</div>
<div id="ref-R-reactablefmtr" class="csl-entry">
Cuilla, K. (2022). <em>Reactablefmtr: Streamlined table styling and formatting for reactable</em>. Retrieved from <a href="https://kcuilla.github.io/reactablefmtr/">https://kcuilla.github.io/reactablefmtr/</a>
</div>
<div id="ref-headsortails2022" class="csl-entry">
Heads or Tails. (2020). <em>Kaggle has 10 million registered users!</em> Retrieved from <a href="https://www.kaggle.com/discussions/general/332147">https://www.kaggle.com/discussions/general/332147</a>
</div>
<div id="ref-R-glue" class="csl-entry">
Hester, J., &amp; Bryan, J. (2024). <em>Glue: Interpreted string literals</em>. Retrieved from <a href="https://glue.tidyverse.org/">https://glue.tidyverse.org/</a>
</div>
<div id="ref-R-fontawesome" class="csl-entry">
Iannone, R. (2024). <em>Fontawesome: Easily work with font awesome icons</em>. Retrieved from <a href="https://github.com/rstudio/fontawesome">https://github.com/rstudio/fontawesome</a>
</div>
<div id="ref-R-highcharter" class="csl-entry">
Kunst, J. (2022). <em>Highcharter: A wrapper for the highcharts library</em>. Retrieved from <a href="https://jkunst.com/highcharter/">https://jkunst.com/highcharter/</a>
</div>
<div id="ref-R-reactable" class="csl-entry">
Lin, G. (2025). <em>Reactable: Interactive data tables for r</em>. Retrieved from <a href="https://glin.github.io/reactable/">https://glin.github.io/reactable/</a>
</div>
<div id="ref-o'hara-wild2018" class="csl-entry">
O’Hara-Wild, M. (2018, July 10). Arranging Hex Stickers in <span>R</span>. Retrieved from <a href="https://mitchelloharawild.github.io/mitchelloharawild.com//blog/hexwall">https://mitchelloharawild.github.io/mitchelloharawild.com//blog/hexwall</a>
</div>
<div id="ref-R-showtextdb" class="csl-entry">
Qiu, Y., &amp; See file AUTHORS for details., authors/contributors of the included fonts. (2020). <em>Showtextdb: Font files for the showtext package</em>. <a href="https://doi.org/10.32614/CRAN.package.showtextdb">https://doi.org/10.32614/CRAN.package.showtextdb</a>
</div>
<div id="ref-R-sysfonts" class="csl-entry">
Qiu, Y., &amp; See file AUTHORS for details., authors/contributors of the included fonts. (2024a). <em>Sysfonts: Loading fonts into r</em>. Retrieved from <a href="https://github.com/yixuan/sysfonts">https://github.com/yixuan/sysfonts</a>
</div>
<div id="ref-R-showtext" class="csl-entry">
Qiu, Y., &amp; See file AUTHORS for details., authors/contributors of the included software. (2024b). <em>Showtext: Using fonts more easily in r graphs</em>. Retrieved from <a href="https://github.com/yixuan/showtext">https://github.com/yixuan/showtext</a>
</div>
<div id="ref-R-base" class="csl-entry">
R Core Team. (2025). <em>R: A language and environment for statistical computing</em>. Vienna, Austria: R Foundation for Statistical Computing. Retrieved from <a href="https://www.R-project.org/">https://www.R-project.org/</a>
</div>
<div id="ref-worldbank2023" class="csl-entry">
The World Bank. (2023). <em>Labor force participation rate (</em>. Retrieved from <a href="https://genderdata.worldbank.org/indicators/sl-tlf-acti-zs/?geos=WLD&amp;view=trend">https://genderdata.worldbank.org/indicators/sl-tlf-acti-zs/?geos=WLD&amp;view=trend</a>
</div>
<div id="ref-ggplot22016" class="csl-entry">
Wickham, H. (2016). <em>ggplot2: Elegant graphics for data analysis</em>. Springer-Verlag New York. Retrieved from <a href="https://ggplot2.tidyverse.org">https://ggplot2.tidyverse.org</a>
</div>
<div id="ref-R-forcats" class="csl-entry">
Wickham, H. (2025). <em>Forcats: Tools for working with categorical variables (factors)</em>. Retrieved from <a href="https://forcats.tidyverse.org/">https://forcats.tidyverse.org/</a>
</div>
<div id="ref-R-ggplot2" class="csl-entry">
Wickham, H., Chang, W., Henry, L., Pedersen, T. L., Takahashi, K., Wilke, C., … van den Brand, T. (2025). <em>ggplot2: Create elegant data visualisations using the grammar of graphics</em>. Retrieved from <a href="https://ggplot2.tidyverse.org">https://ggplot2.tidyverse.org</a>
</div>
<div id="ref-R-dplyr" class="csl-entry">
Wickham, H., François, R., Henry, L., Müller, K., &amp; Vaughan, D. (2023). <em>Dplyr: A grammar of data manipulation</em>. Retrieved from <a href="https://dplyr.tidyverse.org">https://dplyr.tidyverse.org</a>
</div>
<div id="ref-R-readr" class="csl-entry">
Wickham, H., Hester, J., &amp; Bryan, J. (2025). <em>Readr: Read rectangular text data</em>. Retrieved from <a href="https://readr.tidyverse.org">https://readr.tidyverse.org</a>
</div>
<div id="ref-R-tidyr" class="csl-entry">
Wickham, H., Vaughan, D., &amp; Girlich, M. (2025). <em>Tidyr: Tidy messy data</em>. Retrieved from <a href="https://tidyr.tidyverse.org">https://tidyr.tidyverse.org</a>
</div>
<div id="ref-R-ggtext" class="csl-entry">
Wilke, C. O., &amp; Wiernik, B. M. (2022). <em>Ggtext: Improved text rendering support for ggplot2</em>. Retrieved from <a href="https://wilkelab.org/ggtext/">https://wilkelab.org/ggtext/</a>
</div>
<div id="ref-R-kableExtra" class="csl-entry">
Zhu, H. (2024). <em>kableExtra: Construct complex table with kable and pipe syntax</em>. Retrieved from <a href="http://haozhu233.github.io/kableExtra/">http://haozhu233.github.io/kableExtra/</a>
</div>
</div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{2023,
  author = {, stesiam},
  title = {Kaggle’s {Greek} {Community}},
  date = {2023-05-06},
  url = {https://stesiam.com/posts/kaggle-greek-community/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-2023" class="csl-entry quarto-appendix-citeas">
stesiam. (2023, May 6). Kaggle’s Greek Community. Retrieved from <a href="https://stesiam.com/posts/kaggle-greek-community/">https://stesiam.com/posts/kaggle-greek-community/</a>
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>EDA</category>
  <guid>https://stesiam.com/posts/kaggle-greek-community/</guid>
  <pubDate>Sat, 06 May 2023 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/kaggle-greek-community/survey.png" medium="image" type="image/png" height="97" width="144"/>
</item>
<item>
  <title>Predict Possible Interested Clients</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/predict-possible-clients/</link>
  <description><![CDATA[ <section id="introduction" class="level1"><h1>Introduction</h1>
<p>On this article, I will make a ML model, in order to predict the costumers of a bank that are interested on having a term deposit. To achieve this goal I will use some Boosting algorithms (XGBoost and LightGBM). The data is from UCI website <span class="citation" data-cites="Dua2019">(Dua &amp; Graff, 2017)</span> and the dataset that I worked with is “Bank Marketing” <span class="citation" data-cites="moro2014data">(Moro, Cortez, &amp; Rita, 2014)</span>.</p>
<p>But first let’s explain some things.</p>
<blockquote class="blockquote">
<p>What is a term deposit ?</p>
</blockquote>
<p>Generally, we are saving our money in a bank account but we are promising to not withdraw them for a specific amount of time.</p>
<blockquote class="blockquote">
<p>And why someone to do that ?</p>
</blockquote>
<p>It is apparent that term deposits have a major disadvantage over regular ones in terms of capital availability. Of course, people will not have motive to do that without anything in return. For that reason, the banks usually offer higher interest for that kind of accounts. For example, Piraeus Bank (a bank in Greece) offers double interest rate on term deposits compared to regular ones.</p>
<p>So, we can assume that there will be a serious interest for that product mostly on people with significant amount of savings (<img src="https://latex.codecogs.com/png.latex?%3E1000">) and do not have large, extraordinary expenses (loan, kids, etc.).</p>
</section><section id="prerequisites" class="level1"><h1>Prerequisites</h1>
<section id="import-libraries" class="level2"><h2 class="anchored" data-anchor-id="import-libraries">Import libraries</h2>
<p>For this analysis we will need standard libraries for importing and processing my data, such as readr <span class="citation" data-cites="R-readr">(Wickham, Hester, &amp; Bryan, 2025)</span> and dplyr <span class="citation" data-cites="R-dplyr">(Wickham, François, Henry, Müller, &amp; Vaughan, 2023)</span>. The kableExtra <span class="citation" data-cites="R-kableExtra">(Zhu, 2024)</span> package was used to print the results in table format. Concerning general purpose R libraries, I also used gridExtra in order to show ggplot items side to side.</p>
<p>On its basis this analysis is about to predict if someone is interested or not to have a term deposit. Thus, we need to build a ML model. The all-in-one solution package tidymodels is crucial to this. Although, there are some concerns about our data (imbalanced predicted value and our implementation of LightGBM. Thankfully, these are solved by bonsai and treesnip packages, respectively.</p>
<p>Finally, the ggplot2 <span class="citation" data-cites="R-ggplot2">(Wickham, Chang, et al., 2025)</span> package was used to create some visualizations, as well as an auxiliary package, ggtext <span class="citation" data-cites="R-ggtext">(<strong>R-ggtext?</strong>)</span>, for further formatting those.</p>
<div class="cell" title="Import R Libraries">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://readr.tidyverse.org">readr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://forcats.tidyverse.org/">forcats</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="http://haozhu233.github.io/kableExtra/">kableExtra</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/">reactable</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Build ML models</span></span>
<span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://tidymodels.tidymodels.org">tidymodels</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://bonsai.tidymodels.org/">bonsai</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/tidymodels/themis">themis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section><section id="import-dataset" class="level2"><h2 class="anchored" data-anchor-id="import-dataset">Import dataset</h2>
<p>After loading R libraries, then I will load my data. The initial source of my dataset has various versions of the same dataset. I will use the smaller one, as the fitting process on Boosting algorithms it is more time consuming in comparison with other methods (e.g.&nbsp;Logistic Regression, k-Nearest Neighbours etc.).</p>
<div class="cell" title="Import dataset">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://readr.tidyverse.org/reference/read_delim.html">read_delim</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bank_dataset_files/bank.csv"</span>,  delim <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">";"</span>, escape_double <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>, trim_ws <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tibble</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tibble.tidyverse.org/reference/rownames.html">rowid_to_column</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ID"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section><section id="preview-dataset" class="level2"><h2 class="anchored" data-anchor-id="preview-dataset">Preview dataset</h2>
<p>Here we can see a small chunk of my dataset (first 10 rows / observations) just to understand the dataset’s structure and type of variables.</p>
<div class="cell" title="Preview Data" data-tbl-cap-location="top">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">preview_bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/reactable.html">reactable</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">preview_bank_dataset</span>,</span>
<span>  bordered <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>,     <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># No borders (booktabs style)</span></span>
<span>  striped <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>,      <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># No stripes for a clean look</span></span>
<span>  highlight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>,    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># No hover highlighting</span></span>
<span>  defaultColDef <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/colDef.html">colDef</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>fontSize <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"14px"</span>, border <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"none"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  theme <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/reactableTheme.html">reactableTheme</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    borderColor <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"transparent"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Remove border</span></span>
<span>    cellStyle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      borderBottom <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"transparent"</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Subtle line between rows</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    headerStyle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      borderBottom <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"2px solid rgb(117, 117, 117)"</span>, <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Thick top rule</span></span>
<span>      borderTop <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"2px solid rgb(117, 117, 117)"</span>,</span>
<span>      fontWeight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bold"</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div id="tbl-preview-dataset" class="cell quarto-float quarto-figure quarto-figure-center anchored" data-tbl-cap-location="top" title="Preview Data">
<figure class="quarto-float quarto-float-tbl figure"><figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-preview-dataset-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table&nbsp;1: Preview dataset (first six rows)
</figcaption><div aria-describedby="tbl-preview-dataset-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output-display">
<div class="reactable html-widget html-fill-item" id="htmlwidget-153387273213793076b0" style="width:auto;height:auto;"></div>
<script type="application/json" data-for="htmlwidget-153387273213793076b0">{"x":{"tag":{"name":"Reactable","attribs":{"data":{"ID":[1,2,3,4,5,6],"age":[30,33,35,30,59,35],"job":["unemployed","services","management","management","blue-collar","management"],"marital":["married","married","single","married","married","single"],"education":["primary","secondary","tertiary","tertiary","secondary","tertiary"],"default":["no","no","no","no","no","no"],"balance":[1787,4789,1350,1476,0,747],"housing":["no","yes","yes","yes","yes","no"],"loan":["no","yes","no","yes","no","no"],"contact":["cellular","cellular","cellular","unknown","unknown","cellular"],"day":[19,11,16,3,5,23],"month":["oct","may","apr","jun","may","feb"],"duration":[79,220,185,199,226,141],"campaign":[1,1,1,4,1,2],"pdays":[-1,339,330,-1,-1,176],"previous":[0,4,1,0,0,3],"poutcome":["unknown","failure","failure","unknown","unknown","failure"],"y":["no","no","no","no","no","no"]},"columns":[{"id":"ID","name":"ID","type":"numeric","align":"center"},{"id":"age","name":"age","type":"numeric","align":"center"},{"id":"job","name":"job","type":"character","align":"center"},{"id":"marital","name":"marital","type":"character","align":"center"},{"id":"education","name":"education","type":"character","align":"center"},{"id":"default","name":"default","type":"character","align":"center"},{"id":"balance","name":"balance","type":"numeric","align":"center"},{"id":"housing","name":"housing","type":"character","align":"center"},{"id":"loan","name":"loan","type":"character","align":"center"},{"id":"contact","name":"contact","type":"character","align":"center"},{"id":"day","name":"day","type":"numeric","align":"center"},{"id":"month","name":"month","type":"character","align":"center"},{"id":"duration","name":"duration","type":"numeric","align":"center"},{"id":"campaign","name":"campaign","type":"numeric","align":"center"},{"id":"pdays","name":"pdays","type":"numeric","align":"center"},{"id":"previous","name":"previous","type":"numeric","align":"center"},{"id":"poutcome","name":"poutcome","type":"character","align":"center"},{"id":"y","name":"y","type":"character","align":"center"}],"style":{"fontSize":"14px","border":"none"},"theme":{"borderColor":"transparent","headerStyle":{"borderBottom":"2px solid rgb(117, 117, 117)","borderTop":"2px solid rgb(117, 117, 117)","fontWeight":"bold"},"cellStyle":{"borderBottom":"transparent"}},"dataKey":"bceea9c68cf64b8205a727b9da695c9f"},"children":[]},"class":"reactR_markup"},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</figure>
</div>
</div>
<p>Before we do any analysis we have to define what kind of data we have available. We can assess this type of information by looking on the values of each variable. Generally, we can classify our variables, depending their values, as follows :</p>
<center>
<div class="cell" title="Diagram about type of variables" data-layout-align="default">
<div class="cell-output-display">
<div id="fig-diagram-var-types" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-diagram-var-types-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div>
<pre class="mermaid mermaid-js" data-label="fig-diagram-var-types">graph TD;
  A(Type of variables) --&gt; B(Quantitative)
  A(Type of variables) --&gt; C(Qualitative)
  B --&gt; D(Discrete)
  B --&gt; E(Continuous)
  C --&gt; J(Nominal)
  C --&gt; G(Ordinal)
</pre>
</div>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-diagram-var-types-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;1: Type of variables based on its values
</figcaption></figure>
</div>
</div>
</div>
</center>
<p>Our dataset is consisted by 18 variables (columns) and 4521 observations (rows). More specifically, concerning my variables, are as follows :</p>
<table class="caption-top table">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<thead><tr class="header">
<th style="text-align: center;">Variable</th>
<th style="text-align: center;">Property</th>
<th style="text-align: center;">Description</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><code>Age</code></td>
<td style="text-align: center;">
<em>quantitative</em> <br> (continuous)</td>
<td style="text-align: center;">The age of the respondent</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>Job</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">The sector of employment of the respondent</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>Marital</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">The marital status of the respondent</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>Education</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (ordinal)</td>
<td style="text-align: center;">The higher education level that the respondent has ever reached</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>Default</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">has credit in default?</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>Balance</code></td>
<td style="text-align: center;">
<em>quantitative</em> <br> (continuous)</td>
<td style="text-align: center;">Average yearly balance, in euros</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>Housing</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">Has housing loan?</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>Loan</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">Has personal loan?</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>Contact</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">Contact communication type</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>Month</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (ordinal)</td>
<td style="text-align: center;">Last contact day of the month</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>Duration</code></td>
<td style="text-align: center;">
<em>quantitative</em> <br> (continuous)</td>
<td style="text-align: center;">Last contact duration, in seconds (numeric)</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>Campaign</code></td>
<td style="text-align: center;"><em>quantitative</em></td>
<td style="text-align: center;">Number of contacts performed during this campaign and for this client</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>pdays</code></td>
<td style="text-align: center;"><em>quantitative</em></td>
<td style="text-align: center;">Number of days that passed by after the client was last contacted from a previous campaign</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>pprevious</code></td>
<td style="text-align: center;"><em>quantitative</em></td>
<td style="text-align: center;">Number of contacts performed before this campaign and for this client</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>poutcome</code></td>
<td style="text-align: center;">
<em>qualitative</em> (nominal)</td>
<td style="text-align: center;">Outcome of the previous marketing campaign</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>Deposit</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">Has the client subscribed a term deposit?</td>
</tr>
</tbody>
</table>
<p>Thus, my sample has 18 variables, of which 7 are quantitative and 10 are quantitative properties, of which 8 are nominal and the rest ones (<code>Education</code>, <code>Month</code>) are ordinal.</p>
<div class="cell" title="Convert response variable to factor">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/factor.html">as.factor</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section><section id="custom-functions" class="level2"><h2 class="anchored" data-anchor-id="custom-functions">Custom functions</h2>
<blockquote class="blockquote">
<p>So, I have a basic idea about my data. Can we start analyzing our data?</p>
</blockquote>
<p>It depends. If you want to do a simple analysis then yes. Although most of the times this is not the case. Probably there is the need for repetitive actions. In order to not repeat ourselves we need to define some actions, prior to our analysis.</p>
<p>On this occasion, I found beneficial the definition of a function for qualitative data.</p>
<div class="cell" title="Function: Create single variable plots - Qualitative">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">column</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">title</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">chart_type</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bar"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Compute frequency table</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">freq_table</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">column</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span>, name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Frequency"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/desc.html">desc</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Frequency</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/rename.html">rename</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Variable <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">column</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Define common chart properties</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hc</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">title</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.name}: {point.y}"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">chart_type</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Enable legend only for pie chart</span></span>
<span></span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Choose chart type</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hc</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">chart_type</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bar"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hc</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bar"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">freq_table</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Variable</span>, title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Job Category"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Frequency"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_series.html">hc_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Frequency"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">freq_table</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Frequency</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">chart_type</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pie_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/lapply.html">lapply</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/nrow.html">nrow</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">freq_table</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">freq_table</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">freq_table</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Frequency</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">i</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    </span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hc</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_series.html">hc_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Frequency"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pie_data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/stop.html">stop</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Invalid chart type. Use 'bar' or 'pie'."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span></span>
<span>  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/function.html">return</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hc</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</details>
</div>
<p>I will do the same for univariate numeric data.</p>
<p>[EDITTING]</p>
</section></section><section id="eda-with-r" class="level1"><h1>EDA with R</h1>
<section id="missing-values" class="level2"><h2 class="anchored" data-anchor-id="missing-values">Missing Values</h2>
<div class="cell" title="How many NAs do I have">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">how_many_nas</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<p>On this dataset there are 0 missing values, in total. So, there is no need for imputation.</p>
</section><section id="univariate-analysis" class="level2"><h2 class="anchored" data-anchor-id="univariate-analysis">Univariate analysis</h2>
<section id="qualitative-variables" class="level3"><h3 class="anchored" data-anchor-id="qualitative-variables">Qualitative variables</h3>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-1-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-1" aria-controls="tabset-1-1" aria-selected="true" href="">Job</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-2" aria-controls="tabset-1-2" aria-selected="false" href="">Marital status</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-3" aria-controls="tabset-1-3" aria-selected="false" href="">Education</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-4" aria-controls="tabset-1-4" aria-selected="false" href="">Default</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-5-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-5" aria-controls="tabset-1-5" aria-selected="false" href="">Housing</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-6-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-6" aria-controls="tabset-1-6" aria-selected="false" href="">Loan</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-7-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-7" aria-controls="tabset-1-7" aria-selected="false" href="">Contact</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-8-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-8" aria-controls="tabset-1-8" aria-selected="false" href="">Month</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-9-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-9" aria-controls="tabset-1-9" aria-selected="false" href="">poutcome</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-10-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-10" aria-controls="tabset-1-10" aria-selected="false" href="">Deposit</a></li>
</ul>
<div class="tab-content">
<div id="tabset-1-1" class="tab-pane active" aria-labelledby="tabset-1-1-tab">
<div class="cell" title="Figure : Job">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">job</span>, </span>
<span>                          title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Sector of employment of the respondent?"</span>, </span>
<span>                          subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Number and (%) of total respondents"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div id="fig-job" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-job-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-e43f6123c98dd42f3aba" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-e43f6123c98dd42f3aba">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar"},"title":{"text":"Sector of employment of the respondent?"},"yAxis":{"title":{"text":"Frequency"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Number and (%) of total respondents"},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":false},"xAxis":{"categories":["management","blue-collar","technician","admin.","services","retired","self-employed","entrepreneur","unemployed","housemaid","student","unknown"],"title":{"text":"Job Category"}},"series":[{"name":"Frequency","data":[969,946,768,478,417,230,183,168,128,112,84,38]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-job-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;2: Figure: Job
</figcaption></figure>
</div>
</div>
</div>
<div id="tabset-1-2" class="tab-pane" aria-labelledby="tabset-1-2-tab">
<div class="cell" title="Figure : Marital Status">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">marital</span>, </span>
<span>                          title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"What is your marital status?"</span>, </span>
<span>                          subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Most of the participants are married."</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div id="fig-marital-status" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-marital-status-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-6a700ac2972483f2c9e7" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-6a700ac2972483f2c9e7">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"pie"},"title":{"text":"What is your marital status?"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Most of the participants are married."},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":true},"series":[{"name":"Frequency","data":[{"name":"married","y":2797},{"name":"single","y":1196},{"name":"divorced","y":528}]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-marital-status-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;3: Figure : Marital Status
</figcaption></figure>
</div>
</div>
</div>
<div id="tabset-1-3" class="tab-pane" aria-labelledby="tabset-1-3-tab">
<div class="cell" data-layout-align="center">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">education</span>, title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Type of your education"</span>, subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-79e493824d3c792d74f1" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-79e493824d3c792d74f1">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar"},"title":{"text":"Type of your education"},"yAxis":{"title":{"text":"Frequency"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":""},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":false},"xAxis":{"categories":["secondary","tertiary","primary","unknown"],"title":{"text":"Job Category"}},"series":[{"name":"Frequency","data":[2306,1350,678,187]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-4" class="tab-pane" aria-labelledby="tabset-1-4-tab">
<div class="cell" data-layout-align="center">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">default</span>, </span>
<span>                          title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Has credit in default?"</span>, </span>
<span>                          subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"(%) of respondents that have failed to meet their payment obligations"</span>,                            <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-2b7f420b8f2b98f9ea88" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-2b7f420b8f2b98f9ea88">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"pie"},"title":{"text":"Has credit in default?"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"(%) of respondents that have failed to meet their payment obligations"},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":true},"series":[{"name":"Frequency","data":[{"name":"no","y":4445},{"name":"yes","y":76}]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-5" class="tab-pane" aria-labelledby="tabset-1-5-tab">
<div class="cell" data-layout-align="center">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">housing</span>, </span>
<span>                          title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Has housing loan?"</span>, </span>
<span>                          subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"(%) of respondents who have acquired a housing loan"</span>,                            <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-ab8165f574e14b3f1346" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-ab8165f574e14b3f1346">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"pie"},"title":{"text":"Has housing loan?"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"(%) of respondents who have acquired a housing loan"},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":true},"series":[{"name":"Frequency","data":[{"name":"yes","y":2559},{"name":"no","y":1962}]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-6" class="tab-pane" aria-labelledby="tabset-1-6-tab">
<div class="cell" data-layout-align="center">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">loan</span>, </span>
<span>                          title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Has personal loan?"</span>, </span>
<span>                          subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"(%) of respondents who have acquired a personal loan"</span>,                            <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-34f26115ef365ccf978e" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-34f26115ef365ccf978e">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"pie"},"title":{"text":"Has personal loan?"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"(%) of respondents who have acquired a personal loan"},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":true},"series":[{"name":"Frequency","data":[{"name":"no","y":3830},{"name":"yes","y":691}]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-7" class="tab-pane" aria-labelledby="tabset-1-7-tab">
<div class="cell" data-layout-align="center">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">contact</span>, </span>
<span>                          title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Type of Contact"</span>, </span>
<span>                          subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Vast majority of apporaches are via cellular phones."</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-374836e66f208ac167d5" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-374836e66f208ac167d5">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"pie"},"title":{"text":"Type of Contact"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Vast majority of apporaches are via cellular phones."},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":true},"series":[{"name":"Frequency","data":[{"name":"cellular","y":2896},{"name":"unknown","y":1324},{"name":"telephone","y":301}]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-8" class="tab-pane" aria-labelledby="tabset-1-8-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">month</span>, </span>
<span>                          title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Μέσο επικοινωνίας"</span>, </span>
<span>                          subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Η προώθηση μέσω κινητού είναι πιο εκτεταμένη σε σχέση με το σταθερό"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div id="fig-last-month" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-last-month-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-6dfa3f845b6160ae963e" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-6dfa3f845b6160ae963e">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar"},"title":{"text":"Μέσο επικοινωνίας"},"yAxis":{"title":{"text":"Frequency"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Η προώθηση μέσω κινητού είναι πιο εκτεταμένη σε σχέση με το σταθερό"},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":false},"xAxis":{"categories":["may","jul","aug","jun","nov","apr","feb","jan","oct","sep","mar","dec"],"title":{"text":"Job Category"}},"series":[{"name":"Frequency","data":[1398,706,633,531,389,293,222,148,80,52,49,20]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-last-month-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;4: Κυκλικό διάγραμμα τρόπων προσέγγισης ατόμων - πελατών
</figcaption></figure>
</div>
</div>
</div>
<div id="tabset-1-9" class="tab-pane" aria-labelledby="tabset-1-9-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">poutcome</span>, </span>
<span>                          title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Which was the outcome of the previous approaches?"</span>, </span>
<span>                          subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"For every five failed approaches there was one succussful."</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-689034e28bcc6006a51d" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-689034e28bcc6006a51d">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"pie"},"title":{"text":"Which was the outcome of the previous approaches?"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"For every five failed approaches there was one succussful."},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":true},"series":[{"name":"Frequency","data":[{"name":"unknown","y":3705},{"name":"failure","y":490},{"name":"other","y":197},{"name":"success","y":129}]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-10" class="tab-pane" aria-labelledby="tabset-1-10-tab">
<div class="cell" data-layout-align="center">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">univariateQualitativePlot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span>, </span>
<span>                          title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"How many people made a deposit account?"</span>, </span>
<span>                          subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"(%) of respondents who have decided to open a deposit account</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">                                      as a result of the current approach"</span>,</span>
<span>                          <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-73f7bfaae3c84f7362a6" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-73f7bfaae3c84f7362a6">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"pie"},"title":{"text":"How many people made a deposit account?"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"(%) of respondents who have decided to open a deposit account\n                                      as a result of the current approach"},"tooltip":{"pointFormat":"{point.name}: {point.y}"},"legend":{"enabled":true},"series":[{"name":"Frequency","data":[{"name":"no","y":4000},{"name":"yes","y":521}]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
</div>
</div>
</section><section id="quantitative-variables" class="level3"><h3 class="anchored" data-anchor-id="quantitative-variables">Quantitative variables</h3>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-2-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-1" aria-controls="tabset-2-1" aria-selected="true" href="">Age</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-2" aria-controls="tabset-2-2" aria-selected="false" href="">Balance</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-3" aria-controls="tabset-2-3" aria-selected="false" href="">Διάρκεια κλήσης</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-4" aria-controls="tabset-2-4" aria-selected="false" href="">Campaign</a></li>
</ul>
<div class="tab-content">
<div id="tabset-2-1" class="tab-pane active" aria-labelledby="tabset-2-1-tab">
<div class="cell" data-layout-align="center">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"The meadian age is &lt;b&gt;{median(bank_dataset$age)}&lt;/b&gt;."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hchart.html">hchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">age</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Age Distribution"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle_text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bank Marketing Dataset from UCI"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.name}: {point.y}"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-5bae013077be14de337b" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-5bae013077be14de337b">{"x":{"hc_opts":{"chart":{"reflow":true,"zoomType":"x"},"title":{"text":"Age Distribution"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"tooltip":{"formatter":"function() { return  this.point.name + '<br/>' + this.y; }","pointFormat":"{point.name}: {point.y}"},"series":[{"data":[{"x":19,"y":7,"name":"(18, 20]"},{"x":21,"y":16,"name":"(20, 22]"},{"x":23,"y":44,"name":"(22, 24]"},{"x":25,"y":121,"name":"(24, 26]"},{"x":27,"y":197,"name":"(26, 28]"},{"x":29,"y":247,"name":"(28, 30]"},{"x":31,"y":423,"name":"(30, 32]"},{"x":33,"y":417,"name":"(32, 34]"},{"x":35,"y":368,"name":"(34, 36]"},{"x":37,"y":320,"name":"(36, 38]"},{"x":39,"y":272,"name":"(38, 40]"},{"x":41,"y":276,"name":"(40, 42]"},{"x":43,"y":220,"name":"(42, 44]"},{"x":45,"y":231,"name":"(44, 46]"},{"x":47,"y":222,"name":"(46, 48]"},{"x":49,"y":213,"name":"(48, 50]"},{"x":51,"y":177,"name":"(50, 52]"},{"x":53,"y":165,"name":"(52, 54]"},{"x":55,"y":164,"name":"(54, 56]"},{"x":57,"y":176,"name":"(56, 58]"},{"x":59,"y":118,"name":"(58, 60]"},{"x":61,"y":23,"name":"(60, 62]"},{"x":63,"y":15,"name":"(62, 64]"},{"x":65,"y":15,"name":"(64, 66]"},{"x":67,"y":7,"name":"(66, 68]"},{"x":69,"y":13,"name":"(68, 70]"},{"x":71,"y":10,"name":"(70, 72]"},{"x":73,"y":9,"name":"(72, 74]"},{"x":75,"y":8,"name":"(74, 76]"},{"x":77,"y":9,"name":"(76, 78]"},{"x":79,"y":10,"name":"(78, 80]"},{"x":81,"y":1,"name":"(80, 82]"},{"x":83,"y":5,"name":"(82, 84]"},{"x":85,"y":1,"name":"(84, 86]"},{"x":87,"y":1,"name":"(86, 88]"}],"type":"column","pointRange":2,"groupPadding":0,"pointPadding":0,"borderWidth":0}],"subtitle":{"text":"The meadian age is <b>39<\/b>."},"caption":{"text":"Bank Marketing Dataset from UCI"},"legend":{"enabled":false}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":["hc_opts.tooltip.formatter"],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-2-2" class="tab-pane" aria-labelledby="tabset-2-2-tab">
<div class="cell" data-layout-align="center">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hchart.html">hchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">balance</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Balance Distribution"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"The most prevalent group is the one with balance between 0$ and 200$. The median balance is {median(bank_dataset$balance)}"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bank Marketing Dataset from UCI"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.name}: {point.y}"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Balance in $"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10000</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-37431d1680ba451be461" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-37431d1680ba451be461">{"x":{"hc_opts":{"chart":{"reflow":true,"zoomType":"x"},"title":{"text":"Balance Distribution"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"tooltip":{"formatter":"function() { return  this.point.name + '<br/>' + this.y; }","pointFormat":"{point.name}: {point.y}"},"series":[{"data":[{"x":-3300,"y":1,"name":"(-3400, -3200]"},{"x":-3100,"y":0,"name":"(-3200, -3000]"},{"x":-2900,"y":0,"name":"(-3000, -2800]"},{"x":-2700,"y":0,"name":"(-2800, -2600]"},{"x":-2500,"y":0,"name":"(-2600, -2400]"},{"x":-2300,"y":0,"name":"(-2400, -2200]"},{"x":-2100,"y":1,"name":"(-2200, -2000]"},{"x":-1900,"y":0,"name":"(-2000, -1800]"},{"x":-1700,"y":2,"name":"(-1800, -1600]"},{"x":-1500,"y":1,"name":"(-1600, -1400]"},{"x":-1300,"y":6,"name":"(-1400, -1200]"},{"x":-1100,"y":3,"name":"(-1200, -1000]"},{"x":-900,"y":19,"name":"(-1000, -800]"},{"x":-700,"y":23,"name":"(-800, -600]"},{"x":-500,"y":53,"name":"(-600, -400]"},{"x":-300,"y":98,"name":"(-400, -200]"},{"x":-100,"y":516,"name":"(-200, 0]"},{"x":100,"y":884,"name":"(0, 200]"},{"x":300,"y":540,"name":"(200, 400]"},{"x":500,"y":381,"name":"(400, 600]"},{"x":700,"y":294,"name":"(600, 800]"},{"x":900,"y":218,"name":"(800, 1000]"},{"x":1100,"y":174,"name":"(1000, 1200]"},{"x":1300,"y":129,"name":"(1200, 1400]"},{"x":1500,"y":122,"name":"(1400, 1600]"},{"x":1700,"y":84,"name":"(1600, 1800]"},{"x":1900,"y":85,"name":"(1800, 2000]"},{"x":2100,"y":59,"name":"(2000, 2200]"},{"x":2300,"y":60,"name":"(2200, 2400]"},{"x":2500,"y":55,"name":"(2400, 2600]"},{"x":2700,"y":47,"name":"(2600, 2800]"},{"x":2900,"y":47,"name":"(2800, 3000]"},{"x":3100,"y":39,"name":"(3000, 3200]"},{"x":3300,"y":41,"name":"(3200, 3400]"},{"x":3500,"y":35,"name":"(3400, 3600]"},{"x":3700,"y":39,"name":"(3600, 3800]"},{"x":3900,"y":32,"name":"(3800, 4000]"},{"x":4100,"y":33,"name":"(4000, 4200]"},{"x":4300,"y":20,"name":"(4200, 4400]"},{"x":4500,"y":23,"name":"(4400, 4600]"},{"x":4700,"y":26,"name":"(4600, 4800]"},{"x":4900,"y":22,"name":"(4800, 5000]"},{"x":5100,"y":22,"name":"(5000, 5200]"},{"x":5300,"y":13,"name":"(5200, 5400]"},{"x":5500,"y":16,"name":"(5400, 5600]"},{"x":5700,"y":11,"name":"(5600, 5800]"},{"x":5900,"y":14,"name":"(5800, 6000]"},{"x":6100,"y":10,"name":"(6000, 6200]"},{"x":6300,"y":7,"name":"(6200, 6400]"},{"x":6500,"y":8,"name":"(6400, 6600]"},{"x":6700,"y":10,"name":"(6600, 6800]"},{"x":6900,"y":12,"name":"(6800, 7000]"},{"x":7100,"y":13,"name":"(7000, 7200]"},{"x":7300,"y":7,"name":"(7200, 7400]"},{"x":7500,"y":3,"name":"(7400, 7600]"},{"x":7700,"y":9,"name":"(7600, 7800]"},{"x":7900,"y":7,"name":"(7800, 8000]"},{"x":8100,"y":10,"name":"(8000, 8200]"},{"x":8300,"y":9,"name":"(8200, 8400]"},{"x":8500,"y":5,"name":"(8400, 8600]"},{"x":8700,"y":5,"name":"(8600, 8800]"},{"x":8900,"y":5,"name":"(8800, 9000]"},{"x":9100,"y":5,"name":"(9000, 9200]"},{"x":9300,"y":10,"name":"(9200, 9400]"},{"x":9500,"y":1,"name":"(9400, 9600]"},{"x":9700,"y":3,"name":"(9600, 9800]"},{"x":9900,"y":2,"name":"(9800, 10000]"},{"x":10100,"y":1,"name":"(10000, 10200]"},{"x":10300,"y":3,"name":"(10200, 10400]"},{"x":10500,"y":0,"name":"(10400, 10600]"},{"x":10700,"y":5,"name":"(10600, 10800]"},{"x":10900,"y":4,"name":"(10800, 11000]"},{"x":11100,"y":1,"name":"(11000, 11200]"},{"x":11300,"y":5,"name":"(11200, 11400]"},{"x":11500,"y":3,"name":"(11400, 11600]"},{"x":11700,"y":1,"name":"(11600, 11800]"},{"x":11900,"y":1,"name":"(11800, 12000]"},{"x":12100,"y":1,"name":"(12000, 12200]"},{"x":12300,"y":1,"name":"(12200, 12400]"},{"x":12500,"y":4,"name":"(12400, 12600]"},{"x":12700,"y":1,"name":"(12600, 12800]"},{"x":12900,"y":1,"name":"(12800, 13000]"},{"x":13100,"y":3,"name":"(13000, 13200]"},{"x":13300,"y":3,"name":"(13200, 13400]"},{"x":13500,"y":1,"name":"(13400, 13600]"},{"x":13700,"y":4,"name":"(13600, 13800]"},{"x":13900,"y":1,"name":"(13800, 14000]"},{"x":14100,"y":2,"name":"(14000, 14200]"},{"x":14300,"y":2,"name":"(14200, 14400]"},{"x":14500,"y":3,"name":"(14400, 14600]"},{"x":14700,"y":1,"name":"(14600, 14800]"},{"x":14900,"y":0,"name":"(14800, 15000]"},{"x":15100,"y":1,"name":"(15000, 15200]"},{"x":15300,"y":1,"name":"(15200, 15400]"},{"x":15500,"y":2,"name":"(15400, 15600]"},{"x":15700,"y":0,"name":"(15600, 15800]"},{"x":15900,"y":1,"name":"(15800, 16000]"},{"x":16100,"y":2,"name":"(16000, 16200]"},{"x":16300,"y":2,"name":"(16200, 16400]"},{"x":16500,"y":1,"name":"(16400, 16600]"},{"x":16700,"y":0,"name":"(16600, 16800]"},{"x":16900,"y":4,"name":"(16800, 17000]"},{"x":17100,"y":0,"name":"(17000, 17200]"},{"x":17300,"y":1,"name":"(17200, 17400]"},{"x":17500,"y":1,"name":"(17400, 17600]"},{"x":17700,"y":0,"name":"(17600, 17800]"},{"x":17900,"y":0,"name":"(17800, 18000]"},{"x":18100,"y":0,"name":"(18000, 18200]"},{"x":18300,"y":1,"name":"(18200, 18400]"},{"x":18500,"y":0,"name":"(18400, 18600]"},{"x":18700,"y":0,"name":"(18600, 18800]"},{"x":18900,"y":0,"name":"(18800, 19000]"},{"x":19100,"y":0,"name":"(19000, 19200]"},{"x":19300,"y":2,"name":"(19200, 19400]"},{"x":19500,"y":1,"name":"(19400, 19600]"},{"x":19700,"y":0,"name":"(19600, 19800]"},{"x":19900,"y":0,"name":"(19800, 20000]"},{"x":20100,"y":0,"name":"(20000, 20200]"},{"x":20300,"y":0,"name":"(20200, 20400]"},{"x":20500,"y":1,"name":"(20400, 20600]"},{"x":20700,"y":0,"name":"(20600, 20800]"},{"x":20900,"y":0,"name":"(20800, 21000]"},{"x":21100,"y":0,"name":"(21000, 21200]"},{"x":21300,"y":1,"name":"(21200, 21400]"},{"x":21500,"y":1,"name":"(21400, 21600]"},{"x":21700,"y":1,"name":"(21600, 21800]"},{"x":21900,"y":0,"name":"(21800, 22000]"},{"x":22100,"y":2,"name":"(22000, 22200]"},{"x":22300,"y":1,"name":"(22200, 22400]"},{"x":22500,"y":1,"name":"(22400, 22600]"},{"x":22700,"y":0,"name":"(22600, 22800]"},{"x":22900,"y":1,"name":"(22800, 23000]"},{"x":23100,"y":0,"name":"(23000, 23200]"},{"x":23300,"y":0,"name":"(23200, 23400]"},{"x":23500,"y":0,"name":"(23400, 23600]"},{"x":23700,"y":1,"name":"(23600, 23800]"},{"x":23900,"y":0,"name":"(23800, 24000]"},{"x":24100,"y":0,"name":"(24000, 24200]"},{"x":24300,"y":0,"name":"(24200, 24400]"},{"x":24500,"y":0,"name":"(24400, 24600]"},{"x":24700,"y":0,"name":"(24600, 24800]"},{"x":24900,"y":0,"name":"(24800, 25000]"},{"x":25100,"y":0,"name":"(25000, 25200]"},{"x":25300,"y":0,"name":"(25200, 25400]"},{"x":25500,"y":0,"name":"(25400, 25600]"},{"x":25700,"y":0,"name":"(25600, 25800]"},{"x":25900,"y":1,"name":"(25800, 26000]"},{"x":26100,"y":0,"name":"(26000, 26200]"},{"x":26300,"y":2,"name":"(26200, 26400]"},{"x":26500,"y":1,"name":"(26400, 26600]"},{"x":26700,"y":0,"name":"(26600, 26800]"},{"x":26900,"y":1,"name":"(26800, 27000]"},{"x":27100,"y":1,"name":"(27000, 27200]"},{"x":27300,"y":1,"name":"(27200, 27400]"},{"x":27500,"y":0,"name":"(27400, 27600]"},{"x":27700,"y":1,"name":"(27600, 27800]"},{"x":27900,"y":0,"name":"(27800, 28000]"},{"x":28100,"y":0,"name":"(28000, 28200]"},{"x":28300,"y":0,"name":"(28200, 28400]"},{"x":28500,"y":0,"name":"(28400, 28600]"},{"x":28700,"y":0,"name":"(28600, 28800]"},{"x":28900,"y":0,"name":"(28800, 29000]"},{"x":29100,"y":0,"name":"(29000, 29200]"},{"x":29300,"y":0,"name":"(29200, 29400]"},{"x":29500,"y":0,"name":"(29400, 29600]"},{"x":29700,"y":0,"name":"(29600, 29800]"},{"x":29900,"y":0,"name":"(29800, 30000]"},{"x":30100,"y":0,"name":"(30000, 30200]"},{"x":30300,"y":0,"name":"(30200, 30400]"},{"x":30500,"y":0,"name":"(30400, 30600]"},{"x":30700,"y":0,"name":"(30600, 30800]"},{"x":30900,"y":0,"name":"(30800, 31000]"},{"x":31100,"y":0,"name":"(31000, 31200]"},{"x":31300,"y":0,"name":"(31200, 31400]"},{"x":31500,"y":0,"name":"(31400, 31600]"},{"x":31700,"y":0,"name":"(31600, 31800]"},{"x":31900,"y":0,"name":"(31800, 32000]"},{"x":32100,"y":0,"name":"(32000, 32200]"},{"x":32300,"y":0,"name":"(32200, 32400]"},{"x":32500,"y":0,"name":"(32400, 32600]"},{"x":32700,"y":0,"name":"(32600, 32800]"},{"x":32900,"y":0,"name":"(32800, 33000]"},{"x":33100,"y":0,"name":"(33000, 33200]"},{"x":33300,"y":0,"name":"(33200, 33400]"},{"x":33500,"y":0,"name":"(33400, 33600]"},{"x":33700,"y":0,"name":"(33600, 33800]"},{"x":33900,"y":0,"name":"(33800, 34000]"},{"x":34100,"y":0,"name":"(34000, 34200]"},{"x":34300,"y":0,"name":"(34200, 34400]"},{"x":34500,"y":0,"name":"(34400, 34600]"},{"x":34700,"y":0,"name":"(34600, 34800]"},{"x":34900,"y":0,"name":"(34800, 35000]"},{"x":35100,"y":0,"name":"(35000, 35200]"},{"x":35300,"y":0,"name":"(35200, 35400]"},{"x":35500,"y":0,"name":"(35400, 35600]"},{"x":35700,"y":0,"name":"(35600, 35800]"},{"x":35900,"y":0,"name":"(35800, 36000]"},{"x":36100,"y":0,"name":"(36000, 36200]"},{"x":36300,"y":0,"name":"(36200, 36400]"},{"x":36500,"y":0,"name":"(36400, 36600]"},{"x":36700,"y":0,"name":"(36600, 36800]"},{"x":36900,"y":0,"name":"(36800, 37000]"},{"x":37100,"y":0,"name":"(37000, 37200]"},{"x":37300,"y":0,"name":"(37200, 37400]"},{"x":37500,"y":0,"name":"(37400, 37600]"},{"x":37700,"y":0,"name":"(37600, 37800]"},{"x":37900,"y":0,"name":"(37800, 38000]"},{"x":38100,"y":0,"name":"(38000, 38200]"},{"x":38300,"y":0,"name":"(38200, 38400]"},{"x":38500,"y":0,"name":"(38400, 38600]"},{"x":38700,"y":0,"name":"(38600, 38800]"},{"x":38900,"y":0,"name":"(38800, 39000]"},{"x":39100,"y":0,"name":"(39000, 39200]"},{"x":39300,"y":0,"name":"(39200, 39400]"},{"x":39500,"y":0,"name":"(39400, 39600]"},{"x":39700,"y":0,"name":"(39600, 39800]"},{"x":39900,"y":0,"name":"(39800, 40000]"},{"x":40100,"y":0,"name":"(40000, 40200]"},{"x":40300,"y":0,"name":"(40200, 40400]"},{"x":40500,"y":0,"name":"(40400, 40600]"},{"x":40700,"y":0,"name":"(40600, 40800]"},{"x":40900,"y":0,"name":"(40800, 41000]"},{"x":41100,"y":0,"name":"(41000, 41200]"},{"x":41300,"y":0,"name":"(41200, 41400]"},{"x":41500,"y":0,"name":"(41400, 41600]"},{"x":41700,"y":0,"name":"(41600, 41800]"},{"x":41900,"y":0,"name":"(41800, 42000]"},{"x":42100,"y":1,"name":"(42000, 42200]"},{"x":42300,"y":0,"name":"(42200, 42400]"},{"x":42500,"y":0,"name":"(42400, 42600]"},{"x":42700,"y":0,"name":"(42600, 42800]"},{"x":42900,"y":0,"name":"(42800, 43000]"},{"x":43100,"y":0,"name":"(43000, 43200]"},{"x":43300,"y":0,"name":"(43200, 43400]"},{"x":43500,"y":0,"name":"(43400, 43600]"},{"x":43700,"y":0,"name":"(43600, 43800]"},{"x":43900,"y":0,"name":"(43800, 44000]"},{"x":44100,"y":0,"name":"(44000, 44200]"},{"x":44300,"y":0,"name":"(44200, 44400]"},{"x":44500,"y":0,"name":"(44400, 44600]"},{"x":44700,"y":0,"name":"(44600, 44800]"},{"x":44900,"y":0,"name":"(44800, 45000]"},{"x":45100,"y":0,"name":"(45000, 45200]"},{"x":45300,"y":0,"name":"(45200, 45400]"},{"x":45500,"y":0,"name":"(45400, 45600]"},{"x":45700,"y":0,"name":"(45600, 45800]"},{"x":45900,"y":0,"name":"(45800, 46000]"},{"x":46100,"y":0,"name":"(46000, 46200]"},{"x":46300,"y":0,"name":"(46200, 46400]"},{"x":46500,"y":0,"name":"(46400, 46600]"},{"x":46700,"y":0,"name":"(46600, 46800]"},{"x":46900,"y":0,"name":"(46800, 47000]"},{"x":47100,"y":0,"name":"(47000, 47200]"},{"x":47300,"y":0,"name":"(47200, 47400]"},{"x":47500,"y":0,"name":"(47400, 47600]"},{"x":47700,"y":0,"name":"(47600, 47800]"},{"x":47900,"y":0,"name":"(47800, 48000]"},{"x":48100,"y":0,"name":"(48000, 48200]"},{"x":48300,"y":0,"name":"(48200, 48400]"},{"x":48500,"y":0,"name":"(48400, 48600]"},{"x":48700,"y":0,"name":"(48600, 48800]"},{"x":48900,"y":0,"name":"(48800, 49000]"},{"x":49100,"y":0,"name":"(49000, 49200]"},{"x":49300,"y":0,"name":"(49200, 49400]"},{"x":49500,"y":0,"name":"(49400, 49600]"},{"x":49700,"y":0,"name":"(49600, 49800]"},{"x":49900,"y":0,"name":"(49800, 50000]"},{"x":50100,"y":0,"name":"(50000, 50200]"},{"x":50300,"y":0,"name":"(50200, 50400]"},{"x":50500,"y":0,"name":"(50400, 50600]"},{"x":50700,"y":0,"name":"(50600, 50800]"},{"x":50900,"y":0,"name":"(50800, 51000]"},{"x":51100,"y":0,"name":"(51000, 51200]"},{"x":51300,"y":0,"name":"(51200, 51400]"},{"x":51500,"y":0,"name":"(51400, 51600]"},{"x":51700,"y":0,"name":"(51600, 51800]"},{"x":51900,"y":0,"name":"(51800, 52000]"},{"x":52100,"y":0,"name":"(52000, 52200]"},{"x":52300,"y":0,"name":"(52200, 52400]"},{"x":52500,"y":0,"name":"(52400, 52600]"},{"x":52700,"y":0,"name":"(52600, 52800]"},{"x":52900,"y":0,"name":"(52800, 53000]"},{"x":53100,"y":0,"name":"(53000, 53200]"},{"x":53300,"y":0,"name":"(53200, 53400]"},{"x":53500,"y":0,"name":"(53400, 53600]"},{"x":53700,"y":0,"name":"(53600, 53800]"},{"x":53900,"y":0,"name":"(53800, 54000]"},{"x":54100,"y":0,"name":"(54000, 54200]"},{"x":54300,"y":0,"name":"(54200, 54400]"},{"x":54500,"y":0,"name":"(54400, 54600]"},{"x":54700,"y":0,"name":"(54600, 54800]"},{"x":54900,"y":0,"name":"(54800, 55000]"},{"x":55100,"y":0,"name":"(55000, 55200]"},{"x":55300,"y":0,"name":"(55200, 55400]"},{"x":55500,"y":0,"name":"(55400, 55600]"},{"x":55700,"y":0,"name":"(55600, 55800]"},{"x":55900,"y":0,"name":"(55800, 56000]"},{"x":56100,"y":0,"name":"(56000, 56200]"},{"x":56300,"y":0,"name":"(56200, 56400]"},{"x":56500,"y":0,"name":"(56400, 56600]"},{"x":56700,"y":0,"name":"(56600, 56800]"},{"x":56900,"y":0,"name":"(56800, 57000]"},{"x":57100,"y":0,"name":"(57000, 57200]"},{"x":57300,"y":0,"name":"(57200, 57400]"},{"x":57500,"y":0,"name":"(57400, 57600]"},{"x":57700,"y":0,"name":"(57600, 57800]"},{"x":57900,"y":0,"name":"(57800, 58000]"},{"x":58100,"y":0,"name":"(58000, 58200]"},{"x":58300,"y":0,"name":"(58200, 58400]"},{"x":58500,"y":0,"name":"(58400, 58600]"},{"x":58700,"y":0,"name":"(58600, 58800]"},{"x":58900,"y":0,"name":"(58800, 59000]"},{"x":59100,"y":0,"name":"(59000, 59200]"},{"x":59300,"y":0,"name":"(59200, 59400]"},{"x":59500,"y":0,"name":"(59400, 59600]"},{"x":59700,"y":0,"name":"(59600, 59800]"},{"x":59900,"y":0,"name":"(59800, 60000]"},{"x":60100,"y":0,"name":"(60000, 60200]"},{"x":60300,"y":0,"name":"(60200, 60400]"},{"x":60500,"y":0,"name":"(60400, 60600]"},{"x":60700,"y":0,"name":"(60600, 60800]"},{"x":60900,"y":0,"name":"(60800, 61000]"},{"x":61100,"y":0,"name":"(61000, 61200]"},{"x":61300,"y":0,"name":"(61200, 61400]"},{"x":61500,"y":0,"name":"(61400, 61600]"},{"x":61700,"y":0,"name":"(61600, 61800]"},{"x":61900,"y":0,"name":"(61800, 62000]"},{"x":62100,"y":0,"name":"(62000, 62200]"},{"x":62300,"y":0,"name":"(62200, 62400]"},{"x":62500,"y":0,"name":"(62400, 62600]"},{"x":62700,"y":0,"name":"(62600, 62800]"},{"x":62900,"y":0,"name":"(62800, 63000]"},{"x":63100,"y":0,"name":"(63000, 63200]"},{"x":63300,"y":0,"name":"(63200, 63400]"},{"x":63500,"y":0,"name":"(63400, 63600]"},{"x":63700,"y":0,"name":"(63600, 63800]"},{"x":63900,"y":0,"name":"(63800, 64000]"},{"x":64100,"y":0,"name":"(64000, 64200]"},{"x":64300,"y":0,"name":"(64200, 64400]"},{"x":64500,"y":0,"name":"(64400, 64600]"},{"x":64700,"y":0,"name":"(64600, 64800]"},{"x":64900,"y":0,"name":"(64800, 65000]"},{"x":65100,"y":0,"name":"(65000, 65200]"},{"x":65300,"y":0,"name":"(65200, 65400]"},{"x":65500,"y":0,"name":"(65400, 65600]"},{"x":65700,"y":0,"name":"(65600, 65800]"},{"x":65900,"y":0,"name":"(65800, 66000]"},{"x":66100,"y":0,"name":"(66000, 66200]"},{"x":66300,"y":0,"name":"(66200, 66400]"},{"x":66500,"y":0,"name":"(66400, 66600]"},{"x":66700,"y":0,"name":"(66600, 66800]"},{"x":66900,"y":0,"name":"(66800, 67000]"},{"x":67100,"y":0,"name":"(67000, 67200]"},{"x":67300,"y":0,"name":"(67200, 67400]"},{"x":67500,"y":0,"name":"(67400, 67600]"},{"x":67700,"y":0,"name":"(67600, 67800]"},{"x":67900,"y":0,"name":"(67800, 68000]"},{"x":68100,"y":0,"name":"(68000, 68200]"},{"x":68300,"y":0,"name":"(68200, 68400]"},{"x":68500,"y":0,"name":"(68400, 68600]"},{"x":68700,"y":0,"name":"(68600, 68800]"},{"x":68900,"y":0,"name":"(68800, 69000]"},{"x":69100,"y":0,"name":"(69000, 69200]"},{"x":69300,"y":0,"name":"(69200, 69400]"},{"x":69500,"y":0,"name":"(69400, 69600]"},{"x":69700,"y":0,"name":"(69600, 69800]"},{"x":69900,"y":0,"name":"(69800, 70000]"},{"x":70100,"y":0,"name":"(70000, 70200]"},{"x":70300,"y":0,"name":"(70200, 70400]"},{"x":70500,"y":0,"name":"(70400, 70600]"},{"x":70700,"y":0,"name":"(70600, 70800]"},{"x":70900,"y":0,"name":"(70800, 71000]"},{"x":71100,"y":1,"name":"(71000, 71200]"}],"type":"column","pointRange":200,"groupPadding":0,"pointPadding":0,"borderWidth":0}],"subtitle":{"text":"The most prevalent group is the one with balance between 0$ and 200$. The median balance is 444"},"caption":{"text":"Bank Marketing Dataset from UCI"},"legend":{"enabled":false},"xAxis":{"title":{"text":"Balance in $"},"max":10000}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":["hc_opts.tooltip.formatter"],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-2-3" class="tab-pane" aria-labelledby="tabset-2-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hchart.html">hchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">duration</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Διάρκεια κλήσης"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Οι περισσότερες καταθέσεις κυμαίνονται μεταξύ των 0$ και 200$ δολαρίων. Το διάμεσο υπόλοιπο λογαριασμού είναι {median(bank_dataset$balance)} $. Το 75ο τεταρτημόριο είναι τα 1480$, άρα το ένα τέταρτο των πελατών έχει καταθέσεις υψηλότερες αυτού του ποσού. Τα ύψη των λογαριασμών κυμαίνονται από {min(bank_dataset$balance)} μέχρι και τα {max(bank_dataset$balance)} $"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bank Marketing Dataset from UCI"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.name}: {point.y}"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Διάρκεια κλήσης (σε δευτερόλεπτα)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1000</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-56d4548db9c8a09b4705" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-56d4548db9c8a09b4705">{"x":{"hc_opts":{"chart":{"reflow":true,"zoomType":"x"},"title":{"text":"Διάρκεια κλήσης"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"tooltip":{"formatter":"function() { return  this.point.name + '<br/>' + this.y; }","pointFormat":"{point.name}: {point.y}"},"series":[{"data":[{"x":10,"y":129,"name":"(0, 20]"},{"x":30,"y":164,"name":"(20, 40]"},{"x":50,"y":199,"name":"(40, 60]"},{"x":70,"y":285,"name":"(60, 80]"},{"x":90,"y":293,"name":"(80, 100]"},{"x":110,"y":309,"name":"(100, 120]"},{"x":130,"y":301,"name":"(120, 140]"},{"x":150,"y":291,"name":"(140, 160]"},{"x":170,"y":241,"name":"(160, 180]"},{"x":190,"y":218,"name":"(180, 200]"},{"x":210,"y":222,"name":"(200, 220]"},{"x":230,"y":184,"name":"(220, 240]"},{"x":250,"y":171,"name":"(240, 260]"},{"x":270,"y":131,"name":"(260, 280]"},{"x":290,"y":120,"name":"(280, 300]"},{"x":310,"y":87,"name":"(300, 320]"},{"x":330,"y":106,"name":"(320, 340]"},{"x":350,"y":90,"name":"(340, 360]"},{"x":370,"y":67,"name":"(360, 380]"},{"x":390,"y":78,"name":"(380, 400]"},{"x":410,"y":67,"name":"(400, 420]"},{"x":430,"y":51,"name":"(420, 440]"},{"x":450,"y":42,"name":"(440, 460]"},{"x":470,"y":44,"name":"(460, 480]"},{"x":490,"y":37,"name":"(480, 500]"},{"x":510,"y":39,"name":"(500, 520]"},{"x":530,"y":37,"name":"(520, 540]"},{"x":550,"y":38,"name":"(540, 560]"},{"x":570,"y":30,"name":"(560, 580]"},{"x":590,"y":28,"name":"(580, 600]"},{"x":610,"y":31,"name":"(600, 620]"},{"x":630,"y":26,"name":"(620, 640]"},{"x":650,"y":28,"name":"(640, 660]"},{"x":670,"y":28,"name":"(660, 680]"},{"x":690,"y":21,"name":"(680, 700]"},{"x":710,"y":16,"name":"(700, 720]"},{"x":730,"y":20,"name":"(720, 740]"},{"x":750,"y":22,"name":"(740, 760]"},{"x":770,"y":20,"name":"(760, 780]"},{"x":790,"y":13,"name":"(780, 800]"},{"x":810,"y":15,"name":"(800, 820]"},{"x":830,"y":8,"name":"(820, 840]"},{"x":850,"y":7,"name":"(840, 860]"},{"x":870,"y":9,"name":"(860, 880]"},{"x":890,"y":8,"name":"(880, 900]"},{"x":910,"y":8,"name":"(900, 920]"},{"x":930,"y":8,"name":"(920, 940]"},{"x":950,"y":9,"name":"(940, 960]"},{"x":970,"y":9,"name":"(960, 980]"},{"x":990,"y":9,"name":"(980, 1000]"},{"x":1010,"y":10,"name":"(1000, 1020]"},{"x":1030,"y":9,"name":"(1020, 1040]"},{"x":1050,"y":3,"name":"(1040, 1060]"},{"x":1070,"y":3,"name":"(1060, 1080]"},{"x":1090,"y":4,"name":"(1080, 1100]"},{"x":1110,"y":2,"name":"(1100, 1120]"},{"x":1130,"y":7,"name":"(1120, 1140]"},{"x":1150,"y":4,"name":"(1140, 1160]"},{"x":1170,"y":6,"name":"(1160, 1180]"},{"x":1190,"y":4,"name":"(1180, 1200]"},{"x":1210,"y":2,"name":"(1200, 1220]"},{"x":1230,"y":5,"name":"(1220, 1240]"},{"x":1250,"y":3,"name":"(1240, 1260]"},{"x":1270,"y":2,"name":"(1260, 1280]"},{"x":1290,"y":1,"name":"(1280, 1300]"},{"x":1310,"y":1,"name":"(1300, 1320]"},{"x":1330,"y":1,"name":"(1320, 1340]"},{"x":1350,"y":0,"name":"(1340, 1360]"},{"x":1370,"y":2,"name":"(1360, 1380]"},{"x":1390,"y":1,"name":"(1380, 1400]"},{"x":1410,"y":1,"name":"(1400, 1420]"},{"x":1430,"y":1,"name":"(1420, 1440]"},{"x":1450,"y":4,"name":"(1440, 1460]"},{"x":1470,"y":5,"name":"(1460, 1480]"},{"x":1490,"y":1,"name":"(1480, 1500]"},{"x":1510,"y":3,"name":"(1500, 1520]"},{"x":1530,"y":4,"name":"(1520, 1540]"},{"x":1550,"y":1,"name":"(1540, 1560]"},{"x":1570,"y":1,"name":"(1560, 1580]"},{"x":1590,"y":0,"name":"(1580, 1600]"},{"x":1610,"y":1,"name":"(1600, 1620]"},{"x":1630,"y":0,"name":"(1620, 1640]"},{"x":1650,"y":0,"name":"(1640, 1660]"},{"x":1670,"y":1,"name":"(1660, 1680]"},{"x":1690,"y":1,"name":"(1680, 1700]"},{"x":1710,"y":1,"name":"(1700, 1720]"},{"x":1730,"y":3,"name":"(1720, 1740]"},{"x":1750,"y":0,"name":"(1740, 1760]"},{"x":1770,"y":0,"name":"(1760, 1780]"},{"x":1790,"y":0,"name":"(1780, 1800]"},{"x":1810,"y":1,"name":"(1800, 1820]"},{"x":1830,"y":0,"name":"(1820, 1840]"},{"x":1850,"y":0,"name":"(1840, 1860]"},{"x":1870,"y":1,"name":"(1860, 1880]"},{"x":1890,"y":0,"name":"(1880, 1900]"},{"x":1910,"y":0,"name":"(1900, 1920]"},{"x":1930,"y":0,"name":"(1920, 1940]"},{"x":1950,"y":0,"name":"(1940, 1960]"},{"x":1970,"y":1,"name":"(1960, 1980]"},{"x":1990,"y":1,"name":"(1980, 2000]"},{"x":2010,"y":0,"name":"(2000, 2020]"},{"x":2030,"y":1,"name":"(2020, 2040]"},{"x":2050,"y":0,"name":"(2040, 2060]"},{"x":2070,"y":0,"name":"(2060, 2080]"},{"x":2090,"y":1,"name":"(2080, 2100]"},{"x":2110,"y":0,"name":"(2100, 2120]"},{"x":2130,"y":0,"name":"(2120, 2140]"},{"x":2150,"y":0,"name":"(2140, 2160]"},{"x":2170,"y":0,"name":"(2160, 2180]"},{"x":2190,"y":0,"name":"(2180, 2200]"},{"x":2210,"y":0,"name":"(2200, 2220]"},{"x":2230,"y":0,"name":"(2220, 2240]"},{"x":2250,"y":0,"name":"(2240, 2260]"},{"x":2270,"y":0,"name":"(2260, 2280]"},{"x":2290,"y":0,"name":"(2280, 2300]"},{"x":2310,"y":0,"name":"(2300, 2320]"},{"x":2330,"y":0,"name":"(2320, 2340]"},{"x":2350,"y":0,"name":"(2340, 2360]"},{"x":2370,"y":0,"name":"(2360, 2380]"},{"x":2390,"y":0,"name":"(2380, 2400]"},{"x":2410,"y":0,"name":"(2400, 2420]"},{"x":2430,"y":0,"name":"(2420, 2440]"},{"x":2450,"y":1,"name":"(2440, 2460]"},{"x":2470,"y":0,"name":"(2460, 2480]"},{"x":2490,"y":0,"name":"(2480, 2500]"},{"x":2510,"y":0,"name":"(2500, 2520]"},{"x":2530,"y":0,"name":"(2520, 2540]"},{"x":2550,"y":0,"name":"(2540, 2560]"},{"x":2570,"y":0,"name":"(2560, 2580]"},{"x":2590,"y":0,"name":"(2580, 2600]"},{"x":2610,"y":0,"name":"(2600, 2620]"},{"x":2630,"y":0,"name":"(2620, 2640]"},{"x":2650,"y":0,"name":"(2640, 2660]"},{"x":2670,"y":0,"name":"(2660, 2680]"},{"x":2690,"y":0,"name":"(2680, 2700]"},{"x":2710,"y":0,"name":"(2700, 2720]"},{"x":2730,"y":0,"name":"(2720, 2740]"},{"x":2750,"y":0,"name":"(2740, 2760]"},{"x":2770,"y":1,"name":"(2760, 2780]"},{"x":2790,"y":0,"name":"(2780, 2800]"},{"x":2810,"y":0,"name":"(2800, 2820]"},{"x":2830,"y":0,"name":"(2820, 2840]"},{"x":2850,"y":0,"name":"(2840, 2860]"},{"x":2870,"y":0,"name":"(2860, 2880]"},{"x":2890,"y":0,"name":"(2880, 2900]"},{"x":2910,"y":0,"name":"(2900, 2920]"},{"x":2930,"y":0,"name":"(2920, 2940]"},{"x":2950,"y":0,"name":"(2940, 2960]"},{"x":2970,"y":0,"name":"(2960, 2980]"},{"x":2990,"y":0,"name":"(2980, 3000]"},{"x":3010,"y":0,"name":"(3000, 3020]"},{"x":3030,"y":1,"name":"(3020, 3040]"}],"type":"column","pointRange":20,"groupPadding":0,"pointPadding":0,"borderWidth":0}],"subtitle":{"text":"Οι περισσότερες καταθέσεις κυμαίνονται μεταξύ των 0$ και 200$ δολαρίων. Το διάμεσο υπόλοιπο λογαριασμού είναι 444 $. Το 75ο τεταρτημόριο είναι τα 1480$, άρα το ένα τέταρτο των πελατών έχει καταθέσεις υψηλότερες αυτού του ποσού. Τα ύψη των λογαριασμών κυμαίνονται από -3313 μέχρι και τα 71188 $"},"caption":{"text":"Bank Marketing Dataset from UCI"},"legend":{"enabled":false},"xAxis":{"title":{"text":"Διάρκεια κλήσης (σε δευτερόλεπτα)"},"max":1000}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":["hc_opts.tooltip.formatter"],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-2-4" class="tab-pane" aria-labelledby="tabset-2-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>category <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/case_when.html">case_when</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">campaign</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&amp;</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">campaign</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">7</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/character.html">as.character</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">campaign</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">campaign</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">7</span>              <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"8+"</span>,</span>
<span>    <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>                   <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">NA_character_</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>category <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/factor.html">factor</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">category</span>, levels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/character.html">as.character</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">:</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">7</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"8+"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, ordered <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<div class="cell" data-layout-align="center">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb21" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hchart.html">hchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">category</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Αριθμός προσεγγίσεων"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Οι περισσότερες καταθέσεις κυμαίνονται μεταξύ των 0€ και 200€ ευρώ. Το διάμεσο υπόλοιπο λογαριασμού είναι {median(bank_dataset$balance)} €. Το 75ο τεταρτημόριο είναι τα 1480€, άρα το ένα τέταρτο των πελατών έχει καταθέσεις υψηλότερες αυτού του ποσού. Τα ύψη των λογαριασμών κυμαίνονται από {min(bank_dataset$balance)} μέχρι και τα {max(bank_dataset$balance)} $"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Bank Marketing Dataset from UCI"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ύψος καταθέσεων σε ευρώ €"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-0f2a2202f9720df9c8eb" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-0f2a2202f9720df9c8eb">{"x":{"hc_opts":{"chart":{"reflow":true},"title":{"text":"Αριθμός προσεγγίσεων"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"type":"category","title":{"text":"Ύψος καταθέσεων σε ευρώ €"}},"series":[{"data":[{"name":"1","y":1734},{"name":"2","y":1264},{"name":"3","y":558},{"name":"4","y":325},{"name":"5","y":167},{"name":"6","y":155},{"name":"7","y":75},{"name":"8+","y":243}],"type":"column"}],"subtitle":{"text":"Οι περισσότερες καταθέσεις κυμαίνονται μεταξύ των 0€ και 200€ ευρώ. Το διάμεσο υπόλοιπο λογαριασμού είναι 444 €. Το 75ο τεταρτημόριο είναι τα 1480€, άρα το ένα τέταρτο των πελατών έχει καταθέσεις υψηλότερες αυτού του ποσού. Τα ύψη των λογαριασμών κυμαίνονται από -3313 μέχρι και τα 71188 $"},"caption":{"text":"Bank Marketing Dataset from UCI"},"legend":{"enabled":false}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
</div>
</div>
</section></section><section id="bivariate-analysis" class="level2"><h2 class="anchored" data-anchor-id="bivariate-analysis">Bivariate analysis</h2>
<p>On the previous section I learned a lot about my dataset. Now, I have to reveal relationships between my variables. Visualizing those relationships will make it even easier to explain our results. In order to make the right plots on the right occasions I used the book “Datavis with R” (<a href="https://rkabacoff.github.io/datavis/Bivariate.html">Chapter 4 : Bivariate Graphs</a>).</p>
<section id="qualitative-variables-1" class="level3"><h3 class="anchored" data-anchor-id="qualitative-variables-1">Qualitative variables</h3>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-3-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-1" aria-controls="tabset-3-1" aria-selected="true" href="">Job</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-2" aria-controls="tabset-3-2" aria-selected="false" href="">Marital status</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-3" aria-controls="tabset-3-3" aria-selected="false" href="">Education</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-4" aria-controls="tabset-3-4" aria-selected="false" href="">Housing</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-5-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-5" aria-controls="tabset-3-5" aria-selected="false" href="">Loan</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-6-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-6" aria-controls="tabset-3-6" aria-selected="false" href="">Contact</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-7-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-7" aria-controls="tabset-3-7" aria-selected="false" href="">Month</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-8-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-8" aria-controls="tabset-3-8" aria-selected="false" href="">poutcome</a></li>
</ul>
<div class="tab-content">
<div id="tabset-3-1" class="tab-pane active" aria-labelledby="tabset-3-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb22" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotjob</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">job</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarize</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>         lbl <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">scales</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://scales.r-lib.org/reference/percent_format.html">percent</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/desc.html">desc</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#categories &lt;- unique(plotjob$job)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># series_data &lt;- plotjob %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     group_by(y) %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     summarise(series = list(list(name = first(y), data = pct))) %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     pull(series)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"column"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotjob</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">job</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span>    max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{value}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"percent"</span>,</span>
<span>      dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>        format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.y:.0f}%"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_series.html">hc_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"No"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotjob</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotjob</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"no"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF5733"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Yes"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sort.html">sort</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotjob</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotjob</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"yes"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#33FF57"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;{series.name}&lt;/b&gt;: {point.y}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Job of Respondent by Interest to Term Deposit"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Students and retirees are the population groups with a proportionally lower interest in term deposits compared to other groups."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_responsive.html">hc_responsive</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    rules <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        condition <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          maxWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Hide labels when screen width is ≤500px</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        chartOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          plotOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>              dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Disable labels</span></span>
<span>            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>          <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-169c628eaca5b95a3a45" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-169c628eaca5b95a3a45">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Job of Respondent by Interest to Term Deposit"},"yAxis":{"title":{"text":"Percentage"},"min":0,"max":100,"labels":{"format":"{value}%"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"column":{"stacking":"percent","dataLabels":{"enabled":true,"format":"{point.y:.0f}%"}}},"xAxis":{"categories":["blue-collar","entrepreneur","services","unemployed","technician","self-employed","admin.","housemaid","management","unknown","student","retired","retired","student","unknown","management","housemaid","admin.","self-employed","technician","unemployed","services","entrepreneur","blue-collar"]},"series":[{"name":"No","data":[92.7,91.09999999999999,90.90000000000001,89.8,89.2,89.09999999999999,87.90000000000001,87.5,86.5,81.59999999999999,77.40000000000001,76.5],"color":"#FF5733"},{"name":"Yes","data":[7.3,8.9,9.1,10.2,10.8,10.9,12.1,12.5,13.5,18.4,22.6,23.5],"color":"#33FF57"}],"tooltip":{"pointFormat":"<b>{series.name}<\/b>: {point.y}%"},"subtitle":{"text":"Students and retirees are the population groups with a proportionally lower interest in term deposits compared to other groups."},"responsive":{"rules":[{"condition":{"maxWidth":500},"chartOptions":{"plotOptions":{"column":{"dataLabels":{"enabled":false}}}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-3-2" class="tab-pane" aria-labelledby="tabset-3-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb23" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotmarital</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">marital</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarize</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>         lbl <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"column"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotmarital</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">marital</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span>    max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{value}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"percent"</span>,</span>
<span>      dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>        format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.y:.0f}%"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_series.html">hc_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Όχι"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotmarital</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lbl</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotmarital</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Όχι"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF5733"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ναι"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotmarital</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lbl</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plotmarital</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ναι"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#33FF57"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;{series.name}&lt;/b&gt;: {point.y:.2f}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Marital Status by Interest to Term Deposit"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Couples are less interested in comparison to singles / divorced people in term deposit accounts. The increased expenses of a hpusehold may averts people from maintaining a term deposit."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_responsive.html">hc_responsive</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    rules <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        condition <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          maxWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Hide labels when screen width is ≤500px</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        chartOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          plotOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>              dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Disable labels</span></span>
<span>            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>          <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-5dd29b0f5564aefdb464" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-5dd29b0f5564aefdb464">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Marital Status by Interest to Term Deposit"},"yAxis":{"title":{"text":"Percentage"},"min":0,"max":100,"labels":{"format":"{value}%"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"column":{"stacking":"percent","dataLabels":{"enabled":true,"format":"{point.y:.0f}%"}}},"xAxis":{"categories":["divorced","married","single","divorced","married","single"]},"series":[{"name":"Όχι","data":[],"color":"#FF5733"},{"name":"Ναι","data":[],"color":"#33FF57"}],"tooltip":{"pointFormat":"<b>{series.name}<\/b>: {point.y:.2f}%"},"subtitle":{"text":"Couples are less interested in comparison to singles / divorced people in term deposit accounts. The increased expenses of a hpusehold may averts people from maintaining a term deposit."},"responsive":{"rules":[{"condition":{"maxWidth":500},"chartOptions":{"plotOptions":{"column":{"dataLabels":{"enabled":false}}}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-3-3" class="tab-pane" aria-labelledby="tabset-3-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb24" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">educdata</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">education</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarize</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"column"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">educdata</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">education</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span>    max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{value}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"percent"</span>,</span>
<span>      dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>        format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.y:.0f}%"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_series.html">hc_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"No"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">educdata</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">educdata</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"no"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF5733"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Yes"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">educdata</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">educdata</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"yes"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#33FF57"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;{series.name}&lt;/b&gt;: {point.y:.2f}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Education Level &amp; Interest to Term Deposit"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"The more educated people tend to be more interested to new bank/finanial products. "</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_responsive.html">hc_responsive</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    rules <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        condition <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          maxWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Hide labels when screen width is ≤500px</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        chartOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          plotOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>              dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Disable labels</span></span>
<span>            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>          <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-e8be4581484f0e66088e" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-e8be4581484f0e66088e">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Education Level & Interest to Term Deposit"},"yAxis":{"title":{"text":"Percentage"},"min":0,"max":100,"labels":{"format":"{value}%"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"column":{"stacking":"percent","dataLabels":{"enabled":true,"format":"{point.y:.0f}%"}}},"xAxis":{"categories":["primary","secondary","tertiary","unknown","primary","secondary","tertiary","unknown"]},"series":[{"name":"No","data":[90.56047197640117,89.37554206418041,85.70370370370371,89.83957219251337],"color":"#FF5733"},{"name":"Yes","data":[9.43952802359882,10.6244579358196,14.2962962962963,10.16042780748663],"color":"#33FF57"}],"tooltip":{"pointFormat":"<b>{series.name}<\/b>: {point.y:.2f}%"},"subtitle":{"text":"The more educated people tend to be more interested to new bank/finanial products. "},"responsive":{"rules":[{"condition":{"maxWidth":500},"chartOptions":{"plotOptions":{"column":{"dataLabels":{"enabled":false}}}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-3-4" class="tab-pane" aria-labelledby="tabset-3-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb25" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_housing2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">housing</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarize</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stderr">
<pre><code>`summarise()` has grouped output by 'housing'. You can override using the
`.groups` argument.</code></pre>
</div>
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb27" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"column"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_housing2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">housing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span>    max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{value}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"percent"</span>,</span>
<span>      dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>        format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.y:.0f}%"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_series.html">hc_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"No"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_housing2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_housing2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"no"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF5733"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Yes"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_housing2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_housing2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"yes"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#33FF57"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;{series.name}&lt;/b&gt;: {point.y:.2f}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Do you have housing loan?"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"People without loans tend to open more willingly deposit accounts."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_responsive.html">hc_responsive</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    rules <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        condition <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          maxWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Hide labels when screen width is ≤500px</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        chartOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          plotOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>              dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Disable labels</span></span>
<span>            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>          <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-cecf80d670d29acdadc4" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-cecf80d670d29acdadc4">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Do you have housing loan?"},"yAxis":{"title":{"text":"Percentage"},"min":0,"max":100,"labels":{"format":"{value}%"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"column":{"stacking":"percent","dataLabels":{"enabled":true,"format":"{point.y:.0f}%"}}},"xAxis":{"categories":["no","yes","no","yes"]},"series":[{"name":"No","data":[84.65851172273192,91.40289175459164],"color":"#FF5733"},{"name":"Yes","data":[15.34148827726809,8.597108245408362],"color":"#33FF57"}],"tooltip":{"pointFormat":"<b>{series.name}<\/b>: {point.y:.2f}%"},"subtitle":{"text":"People without loans tend to open more willingly deposit accounts."},"responsive":{"rules":[{"condition":{"maxWidth":500},"chartOptions":{"plotOptions":{"column":{"dataLabels":{"enabled":false}}}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-3-5" class="tab-pane" aria-labelledby="tabset-3-5-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb28" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_loan</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">loan</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarize</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stderr">
<pre><code>`summarise()` has grouped output by 'loan'. You can override using the
`.groups` argument.</code></pre>
</div>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb30" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"column"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_loan</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">loan</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span>    max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Percentage"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{value}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      stacking <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"percent"</span>,</span>
<span>      dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>        format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.y:.0f}%"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_series.html">hc_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"No"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_loan</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_loan</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"no"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF5733"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Yes"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_loan</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_loan</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"yes"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#33FF57"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;{series.name}&lt;/b&gt;: {point.y:.2f}%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Do you have personal loan?"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"People without loans tend to open more willingly deposit accounts."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_responsive.html">hc_responsive</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    rules <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        condition <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          maxWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">500</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Hide labels when screen width is ≤500px</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        chartOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          plotOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            column <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>              dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Disable labels</span></span>
<span>            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>          <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-2434526b6c9c5051ca25" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-2434526b6c9c5051ca25">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Do you have personal loan?"},"yAxis":{"title":{"text":"Percentage"},"min":0,"max":100,"labels":{"format":"{value}%"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"column":{"stacking":"percent","dataLabels":{"enabled":true,"format":"{point.y:.0f}%"}}},"xAxis":{"categories":["no","yes","no","yes"]},"series":[{"name":"No","data":[87.51958224543081,93.77713458755427],"color":"#FF5733"},{"name":"Yes","data":[12.48041775456919,6.222865412445731],"color":"#33FF57"}],"tooltip":{"pointFormat":"<b>{series.name}<\/b>: {point.y:.2f}%"},"subtitle":{"text":"People without loans tend to open more willingly deposit accounts."},"responsive":{"rules":[{"condition":{"maxWidth":500},"chartOptions":{"plotOptions":{"column":{"dataLabels":{"enabled":false}}}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-3-6" class="tab-pane" aria-labelledby="tabset-3-6-tab">

</div>
<div id="tabset-3-7" class="tab-pane" aria-labelledby="tabset-3-7-tab">

</div>
<div id="tabset-3-8" class="tab-pane" aria-labelledby="tabset-3-8-tab">

</div>
</div>
</div>
</section><section id="quantitative-variables-1" class="level3"><h3 class="anchored" data-anchor-id="quantitative-variables-1">Quantitative variables</h3>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-4-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-1" aria-controls="tabset-4-1" aria-selected="true" href="">Age</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-4-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-2" aria-controls="tabset-4-2" aria-selected="false" href="">Balance</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-4-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-3" aria-controls="tabset-4-3" aria-selected="false" href="">Duration</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-4-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-4" aria-controls="tabset-4-4" aria-selected="false" href="">Campaign</a></li>
</ul>
<div class="tab-content">
<div id="tabset-4-1" class="tab-pane active" aria-labelledby="tabset-4-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb31" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">dat</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/data_to_boxplot.html">data_to_boxplot</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">age</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"category"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series_list.html">hc_add_series_list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">dat</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Age &amp; Desire of Bank Deposit Account"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"There are not significant demographic differences concerning people that choose to open term deposit accounts."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-fbda247a6e1581e972d1" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-fbda247a6e1581e972d1">{"x":{"hc_opts":{"chart":{"reflow":true},"title":{"text":"Age & Desire of Bank Deposit Account"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"type":"category"},"series":[{"name":null,"data":[{"name":"no","low":19,"q1":33,"median":39,"q3":48,"high":70},{"name":"yes","low":19,"q1":32,"median":40,"q3":50,"high":77}],"id":null,"type":"boxplot"}],"subtitle":{"text":"There are not significant demographic differences concerning people that choose to open term deposit accounts."},"legend":{"enabled":false}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-4-2" class="tab-pane" aria-labelledby="tabset-4-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb32" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">dat</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/data_to_boxplot.html">data_to_boxplot</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">balance</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"category"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series_list.html">hc_add_series_list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">dat</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Balance &amp; Desire of Bank Deposit Account"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-6f2f7e4df8b248746a35" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-6f2f7e4df8b248746a35">{"x":{"hc_opts":{"chart":{"reflow":true},"title":{"text":"Balance & Desire of Bank Deposit Account"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"type":"category"},"series":[{"name":null,"data":[{"name":"no","low":-1746,"q1":61,"median":419.5,"q3":1407,"high":3419},{"name":"yes","low":-1206,"q1":171,"median":710,"q3":2160,"high":5106}],"id":null,"type":"boxplot"}],"subtitle":{"text":""},"legend":{"enabled":false}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-4-3" class="tab-pane" aria-labelledby="tabset-4-3-tab">

</div>
<div id="tabset-4-4" class="tab-pane" aria-labelledby="tabset-4-4-tab">

</div>
</div>
</div>
</section></section></section><section id="building-model" class="level1"><h1>Building model</h1>
<p>In R there are two fairly well-known libraries when it comes to model generation, <a href="https://topepo.github.io/caret/">caret</a> and <a href="https://www.tidymodels.org/">tidymodels</a>. On one hand, caret is pretty simple to use, has lots of sources, guides, explanatory articles. On the other hand, tidymodels is an all-in-one solution but has less documentation, articles compared to caret.</p>
<section id="split-traintest-dataset" class="level2"><h2 class="anchored" data-anchor-id="split-traintest-dataset">Split train/test dataset</h2>
<p>Our first step is to split our dataset on 2 parts. Each of those will be used for a different purpose. The first part’s (train dataset) purpose is to build our model. The other part (test dataset) will be used to evaluate our model’s performance.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb33" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Random.html">set.seed</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">123</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset_split</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">initial_split</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset</span>,</span>
<span>                                prop <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.75</span>,</span>
<span>                                strata <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Create training data</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_train</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset_split</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>                    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">training</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Create testing data</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_test</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset_split</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>                    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">testing</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<center>
<div class="cell" data-layout-align="default">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb34" style="background: #f1f3f5;"><pre class="sourceCode default code-with-copy"><code class="sourceCode default"><span id="cb34-1">graph TD;</span>
<span id="cb34-2">  A(Data) --&gt; B(Train Dataset &lt;br&gt; 3390 obs.)</span>
<span id="cb34-3">  A(Data) --&gt; C(Test  Dataset &lt;br&gt; 1131 obs.)</span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<p></p><figure class="figure"></figure><p></p>
<div>
<pre class="mermaid mermaid-js">graph TD;
  A(Data) --&gt; B(Train Dataset &lt;br&gt; 3390 obs.)
  A(Data) --&gt; C(Test  Dataset &lt;br&gt; 1131 obs.)
</pre>
</div>
<p></p>
</div>
</div>
</div>
</center>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-5-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-5-1" aria-controls="tabset-5-1" aria-selected="true" href="">Train dataset</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-5-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-5-2" aria-controls="tabset-5-2" aria-selected="false" href="">Test dataset</a></li>
</ul>
<div class="tab-content">
<div id="tabset-5-1" class="tab-pane active" aria-labelledby="tabset-5-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb35" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_train</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>toprule <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: center;" data-quarto-table-cell-role="th">ID</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">age</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">job</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">marital</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">education</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">default</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">balance</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">housing</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">loan</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">contact</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">day</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">month</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">duration</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">campaign</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">pdays</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">previous</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">poutcome</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">y</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">1</td>
<td style="text-align: center;">30</td>
<td style="text-align: center;">unemployed</td>
<td style="text-align: center;">married</td>
<td style="text-align: center;">primary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">1787</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">19</td>
<td style="text-align: center;">oct</td>
<td style="text-align: center;">79</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="even">
<td style="text-align: center;">2</td>
<td style="text-align: center;">33</td>
<td style="text-align: center;">services</td>
<td style="text-align: center;">married</td>
<td style="text-align: center;">secondary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">4789</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">11</td>
<td style="text-align: center;">may</td>
<td style="text-align: center;">220</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">339</td>
<td style="text-align: center;">4</td>
<td style="text-align: center;">failure</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="odd">
<td style="text-align: center;">4</td>
<td style="text-align: center;">30</td>
<td style="text-align: center;">management</td>
<td style="text-align: center;">married</td>
<td style="text-align: center;">tertiary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">1476</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">3</td>
<td style="text-align: center;">jun</td>
<td style="text-align: center;">199</td>
<td style="text-align: center;">4</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="even">
<td style="text-align: center;">5</td>
<td style="text-align: center;">59</td>
<td style="text-align: center;">blue-collar</td>
<td style="text-align: center;">married</td>
<td style="text-align: center;">secondary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">may</td>
<td style="text-align: center;">226</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="odd">
<td style="text-align: center;">7</td>
<td style="text-align: center;">36</td>
<td style="text-align: center;">self-employed</td>
<td style="text-align: center;">married</td>
<td style="text-align: center;">tertiary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">307</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">14</td>
<td style="text-align: center;">may</td>
<td style="text-align: center;">341</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">330</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">other</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="even">
<td style="text-align: center;">8</td>
<td style="text-align: center;">39</td>
<td style="text-align: center;">technician</td>
<td style="text-align: center;">married</td>
<td style="text-align: center;">secondary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">147</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">6</td>
<td style="text-align: center;">may</td>
<td style="text-align: center;">151</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">no</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div id="tabset-5-2" class="tab-pane" aria-labelledby="tabset-5-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb36" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_test</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>toprule <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: center;" data-quarto-table-cell-role="th">ID</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">age</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">job</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">marital</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">education</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">default</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">balance</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">housing</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">loan</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">contact</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">day</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">month</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">duration</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">campaign</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">pdays</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">previous</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">poutcome</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">y</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">3</td>
<td style="text-align: center;">35</td>
<td style="text-align: center;">management</td>
<td style="text-align: center;">single</td>
<td style="text-align: center;">tertiary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">1350</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">16</td>
<td style="text-align: center;">apr</td>
<td style="text-align: center;">185</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">330</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">failure</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="even">
<td style="text-align: center;">6</td>
<td style="text-align: center;">35</td>
<td style="text-align: center;">management</td>
<td style="text-align: center;">single</td>
<td style="text-align: center;">tertiary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">747</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">23</td>
<td style="text-align: center;">feb</td>
<td style="text-align: center;">141</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">176</td>
<td style="text-align: center;">3</td>
<td style="text-align: center;">failure</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="odd">
<td style="text-align: center;">15</td>
<td style="text-align: center;">31</td>
<td style="text-align: center;">blue-collar</td>
<td style="text-align: center;">married</td>
<td style="text-align: center;">secondary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">360</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">29</td>
<td style="text-align: center;">jan</td>
<td style="text-align: center;">89</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">241</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">failure</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="even">
<td style="text-align: center;">23</td>
<td style="text-align: center;">44</td>
<td style="text-align: center;">services</td>
<td style="text-align: center;">single</td>
<td style="text-align: center;">secondary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">106</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">12</td>
<td style="text-align: center;">jun</td>
<td style="text-align: center;">109</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="odd">
<td style="text-align: center;">51</td>
<td style="text-align: center;">45</td>
<td style="text-align: center;">blue-collar</td>
<td style="text-align: center;">divorced</td>
<td style="text-align: center;">primary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">844</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">jun</td>
<td style="text-align: center;">1018</td>
<td style="text-align: center;">3</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">52</td>
<td style="text-align: center;">37</td>
<td style="text-align: center;">technician</td>
<td style="text-align: center;">single</td>
<td style="text-align: center;">secondary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">228</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">20</td>
<td style="text-align: center;">aug</td>
<td style="text-align: center;">1740</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">no</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</section><section id="recipes" class="level2"><h2 class="anchored" data-anchor-id="recipes">Recipes</h2>
<p>An important part in the process of model building is preprocessing. Depending of model type and data structure, I have to do the necessary changes. The <em>tidymodels</em> offers some ready-made preprocessing functions which make the whole process piece of cake.</p>
<p>In instance, the dataset I am working right now has imbalanced response variable (term deposit interest). For that reason, I used the recipe <code><a href="https://themis.tidymodels.org/reference/step_smote.html">step_smote()</a></code> from <em>themis</em> package.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb37" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_recipe</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">recipes</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/recipe.html">recipe</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>, </span>
<span>                               data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_train</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/step_rm.html">step_rm</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">poutcome</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ID</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/step_corr.html">step_corr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/has_role.html">all_numeric</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, threshold <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.75</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/step_dummy.html">step_dummy</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/has_role.html">all_nominal</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/has_role.html">all_outcomes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/prep.html">prep</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://themis.tidymodels.org/reference/step_smote.html">step_smote</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/prep.html">prep</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<p>Let’s preview our dataset after applying our recipes :</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb38" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_recipe</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/prep.html">prep</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/juice.html">juice</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div id="tbl-recipes-df" class="cell quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-tbl figure"><figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-recipes-df-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table&nbsp;2: Dataset after <code>recipes</code>
</figcaption><div aria-describedby="tbl-recipes-df-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output-display">
<table class="table do-not-create-environment cell caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: right;" data-quarto-table-cell-role="th">age</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">balance</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">day</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">duration</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">campaign</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">pdays</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">previous</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_blue.collar</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_entrepreneur</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_housemaid</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_management</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_retired</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_self.employed</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_services</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_student</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_technician</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_unemployed</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">job_unknown</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">marital_married</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">marital_single</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">education_secondary</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">education_tertiary</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">education_unknown</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">default_yes</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">housing_yes</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">loan_yes</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">contact_telephone</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">contact_unknown</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_aug</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_dec</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_feb</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_jan</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_jul</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_jun</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_mar</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_may</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_nov</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_oct</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">month_sep</th>
<th style="text-align: left;" data-quarto-table-cell-role="th">y</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: right;">30</td>
<td style="text-align: right;">1787</td>
<td style="text-align: right;">19</td>
<td style="text-align: right;">79</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">-1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: left;">no</td>
</tr>
<tr class="even">
<td style="text-align: right;">33</td>
<td style="text-align: right;">4789</td>
<td style="text-align: right;">11</td>
<td style="text-align: right;">220</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">339</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: left;">no</td>
</tr>
<tr class="odd">
<td style="text-align: right;">30</td>
<td style="text-align: right;">1476</td>
<td style="text-align: right;">3</td>
<td style="text-align: right;">199</td>
<td style="text-align: right;">4</td>
<td style="text-align: right;">-1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: left;">no</td>
</tr>
<tr class="even">
<td style="text-align: right;">59</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">226</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">-1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: left;">no</td>
</tr>
<tr class="odd">
<td style="text-align: right;">36</td>
<td style="text-align: right;">307</td>
<td style="text-align: right;">14</td>
<td style="text-align: right;">341</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">330</td>
<td style="text-align: right;">2</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: left;">no</td>
</tr>
<tr class="even">
<td style="text-align: right;">39</td>
<td style="text-align: right;">147</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">151</td>
<td style="text-align: right;">2</td>
<td style="text-align: right;">-1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">1</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: right;">0</td>
<td style="text-align: left;">no</td>
</tr>
</tbody>
</table>
</div>
</div>
</figure>
</div>
</div>
</section><section id="create-validation-set" class="level2"><h2 class="anchored" data-anchor-id="create-validation-set">Create validation set</h2>
<blockquote class="blockquote">
<p>So, how good is the model? Not so fast…</p>
</blockquote>
<p>We could actually build the model and evaluate its performance. The problem with that approach is the sample.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb39" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">cv_folds</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">recipes</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://recipes.tidymodels.org/reference/bake.html">bake</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_recipe</span>,</span>
<span>  new_data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_train</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">rsample</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rsample.tidymodels.org/reference/vfold_cv.html">vfold_cv</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>v <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>, strata <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section><section id="specify-models" class="level2"><h2 class="anchored" data-anchor-id="specify-models">Specify models</h2>
<p>Next, parsnip helps us to specify our models. Initially, I will define a LightGBM model,</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb40" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_model</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">parsnip</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://parsnip.tidymodels.org/reference/boost_tree.html">boost_tree</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span> mode <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"classification"</span>,</span>
<span> trees <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">50</span>,</span>
<span> min_n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://hardhat.tidymodels.org/reference/tune.html">tune</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> learn_rate <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://hardhat.tidymodels.org/reference/tune.html">tune</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> tree_depth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://hardhat.tidymodels.org/reference/tune.html">tune</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://parsnip.tidymodels.org/reference/set_engine.html">set_engine</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"lightgbm"</span>, loss_function <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"squarederror"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<p>and an XGBoost one.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb41" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_model</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">parsnip</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://parsnip.tidymodels.org/reference/boost_tree.html">boost_tree</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span> mode <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"classification"</span>,</span>
<span> trees <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">50</span>,</span>
<span> min_n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://hardhat.tidymodels.org/reference/tune.html">tune</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> learn_rate <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://hardhat.tidymodels.org/reference/tune.html">tune</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> tree_depth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://hardhat.tidymodels.org/reference/tune.html">tune</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://parsnip.tidymodels.org/reference/set_engine.html">set_engine</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"xgboost"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section><section id="hyperparameters-tuning" class="level2"><h2 class="anchored" data-anchor-id="hyperparameters-tuning">Hyperparameters tuning</h2>
<p>Now, we are specifying the hyperpaterers’ values and a grid to check which combination of those are performing better according to our desired metric (in our case ROC). This has to be done for both, LightGBM</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb42" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_params</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dials</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dials.tidymodels.org/reference/parameters.html">parameters</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">min_n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tree_depth</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>range <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">learn_rate</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># learning rate</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb43" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_grid</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dials</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dials.tidymodels.org/reference/grid_max_entropy.html">grid_max_entropy</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_params</span>,</span>
<span> size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_grid</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>toprule <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: center;" data-quarto-table-cell-role="th">min_n</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">tree_depth</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">learn_rate</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">3</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0000</td>
</tr>
<tr class="even">
<td style="text-align: center;">3</td>
<td style="text-align: center;">7</td>
<td style="text-align: center;">0.0000</td>
</tr>
<tr class="odd">
<td style="text-align: center;">11</td>
<td style="text-align: center;">10</td>
<td style="text-align: center;">0.0000</td>
</tr>
<tr class="even">
<td style="text-align: center;">33</td>
<td style="text-align: center;">4</td>
<td style="text-align: center;">0.0787</td>
</tr>
<tr class="odd">
<td style="text-align: center;">10</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0116</td>
</tr>
<tr class="even">
<td style="text-align: center;">31</td>
<td style="text-align: center;">9</td>
<td style="text-align: center;">0.0000</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>and XGBoost.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb44" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_params</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dials</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dials.tidymodels.org/reference/parameters.html">parameters</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">min_n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tree_depth</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>range <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">learn_rate</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># learning rate</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb45" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_grid</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dials</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dials.tidymodels.org/reference/grid_max_entropy.html">grid_max_entropy</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_params</span>,</span>
<span>  size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_grid</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>toprule <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: center;" data-quarto-table-cell-role="th">min_n</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">tree_depth</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">learn_rate</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">5</td>
<td style="text-align: center;">6</td>
<td style="text-align: center;">0.0000</td>
</tr>
<tr class="even">
<td style="text-align: center;">4</td>
<td style="text-align: center;">8</td>
<td style="text-align: center;">0.0000</td>
</tr>
<tr class="odd">
<td style="text-align: center;">37</td>
<td style="text-align: center;">9</td>
<td style="text-align: center;">0.0000</td>
</tr>
<tr class="even">
<td style="text-align: center;">2</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0000</td>
</tr>
<tr class="odd">
<td style="text-align: center;">21</td>
<td style="text-align: center;">9</td>
<td style="text-align: center;">0.0057</td>
</tr>
<tr class="even">
<td style="text-align: center;">21</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0472</td>
</tr>
</tbody>
</table>
</div>
</div>
</section><section id="fit-resamples" class="level2"><h2 class="anchored" data-anchor-id="fit-resamples">Fit resamples</h2>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb46" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># build workflow for LightGBM</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_workflow</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">workflows</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://workflows.tidymodels.org/reference/workflow.html">workflow</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">add_model</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_model</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">add_formula</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb47" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># build workflow for XGBoost</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_workflow</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">workflows</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://workflows.tidymodels.org/reference/workflow.html">workflow</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">add_model</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_model</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">add_formula</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<p>Finally, we can build the LightGBM model by combining :</p>
<ul>
<li>The workflows we set it up above</li>
<li>The resamples</li>
<li>Grid of values (hyperparameters)</li>
<li>Metric based on which we will evaluate our model’s performance</li>
</ul>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb48" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">start_time_lightgbm</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_tuned_model</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tune</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tune.tidymodels.org/reference/tune_grid.html">tune_grid</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span> object <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_workflow</span>,</span>
<span> resamples <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">cv_folds</span>,</span>
<span> metrics <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">metric_set</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">roc_auc</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">accuracy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> grid <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_grid</span>,</span>
<span> control <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tune</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tune.tidymodels.org/reference/control_grid.html">control_grid</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>verbose <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># set this to TRUE to see</span></span>
<span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># in what step of the process you are. But that doesn't look that well in</span></span>
<span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># a blog.</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">end_time_lightgbm</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">time_lightgbm</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/difftime.html">difftime</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">end_time_lightgbm</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">start_time_lightgbm</span>,units <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"secs"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<p>Similarly, for XGBoost.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb49" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">start_time_xgboost</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_tuned_model</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tune</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tune.tidymodels.org/reference/tune_grid.html">tune_grid</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span> object <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_workflow</span>,</span>
<span> resamples <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">cv_folds</span>,</span>
<span> metrics <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">metric_set</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">roc_auc</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">accuracy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span> grid <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_grid</span>,</span>
<span> control <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">tune</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://tune.tidymodels.org/reference/control_grid.html">control_grid</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>verbose <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># set this to TRUE to see</span></span>
<span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># in what step of the process you are. But that doesn't look that well in</span></span>
<span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># a blog.</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">end_time_xgboost</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">time_xgboost</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/difftime.html">difftime</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">end_time_xgboost</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">start_time_xgboost</span>,units <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"secs"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section><section id="evaluate-model" class="level2"><h2 class="anchored" data-anchor-id="evaluate-model">Evaluate model</h2>
<p>Our first results based on resamples for LightGBM</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb50" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lightgbm_tuned_model</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">show_best</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>, metric <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"roc_auc"</span>, n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>toprule <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: center;" data-quarto-table-cell-role="th">min_n</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">tree_depth</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">learn_rate</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">.metric</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">.estimator</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">mean</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">n</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">std_err</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">.config</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">16</td>
<td style="text-align: center;">10</td>
<td style="text-align: center;">0.0646</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.9001</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0022</td>
<td style="text-align: center;">pre0_mod05_post0</td>
</tr>
<tr class="even">
<td style="text-align: center;">33</td>
<td style="text-align: center;">4</td>
<td style="text-align: center;">0.0787</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8921</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0021</td>
<td style="text-align: center;">pre0_mod09_post0</td>
</tr>
<tr class="odd">
<td style="text-align: center;">10</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0116</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8775</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0037</td>
<td style="text-align: center;">pre0_mod03_post0</td>
</tr>
<tr class="even">
<td style="text-align: center;">34</td>
<td style="text-align: center;">10</td>
<td style="text-align: center;">0.0006</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8653</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0035</td>
<td style="text-align: center;">pre0_mod10_post0</td>
</tr>
<tr class="odd">
<td style="text-align: center;">31</td>
<td style="text-align: center;">9</td>
<td style="text-align: center;">0.0000</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8580</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0088</td>
<td style="text-align: center;">pre0_mod07_post0</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>and XGBoost</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb51" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_tuned_model</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">show_best</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>, metric <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"roc_auc"</span>, n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>toprule <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: center;" data-quarto-table-cell-role="th">min_n</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">tree_depth</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">learn_rate</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">.metric</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">.estimator</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">mean</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">n</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">std_err</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">.config</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">21</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0472</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8730</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0037</td>
<td style="text-align: center;">pre0_mod06_post0</td>
</tr>
<tr class="even">
<td style="text-align: center;">5</td>
<td style="text-align: center;">6</td>
<td style="text-align: center;">0.0000</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8499</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0043</td>
<td style="text-align: center;">pre0_mod03_post0</td>
</tr>
<tr class="odd">
<td style="text-align: center;">21</td>
<td style="text-align: center;">9</td>
<td style="text-align: center;">0.0057</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8470</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0077</td>
<td style="text-align: center;">pre0_mod07_post0</td>
</tr>
<tr class="even">
<td style="text-align: center;">19</td>
<td style="text-align: center;">7</td>
<td style="text-align: center;">0.0000</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8328</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0055</td>
<td style="text-align: center;">pre0_mod04_post0</td>
</tr>
<tr class="odd">
<td style="text-align: center;">40</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0002</td>
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8050</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">0.0049</td>
<td style="text-align: center;">pre0_mod10_post0</td>
</tr>
</tbody>
</table>
</div>
</div>
</section><section id="last-fit" class="level2"><h2 class="anchored" data-anchor-id="last-fit">Last fit</h2>
<p>By now we can assess which is the best combination of values. Given those I will assess my model’s performance on unknown (to my model) data. LightGBM model has 0.8469 ROC-value</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb52" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">last_fit_lightgbm_model</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">parsnip</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://parsnip.tidymodels.org/reference/boost_tree.html">boost_tree</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span> mode <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"classification"</span>,</span>
<span> trees <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span> min_n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">33</span>,</span>
<span> learn_rate <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.0787</span>,</span>
<span> tree_depth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://parsnip.tidymodels.org/reference/set_engine.html">set_engine</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"lightgbm"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb53" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">## TODO</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># options(digits = 4)</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># last_fit_workflow &lt;- lightgbm_workflow %&gt;% </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   update_model(last_fit_lightgbm_model)</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># last_lightgbm_fit &lt;- </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   last_fit_workflow %&gt;% </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   last_fit(bank_dataset_split)</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># last_lightgbm_fit %&gt;% </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   collect_metrics() %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   kbl(toprule = T,align = 'c',booktabs = T)  %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   kable_styling(full_width = F, position = "center", html_font = "Cambria") </span></span></code></pre></div></div>
</details>
</div>
<p>and XGBoost, 0.8736.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb54" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">last_fit_xgboost_model</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">parsnip</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://parsnip.tidymodels.org/reference/boost_tree.html">boost_tree</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span> mode <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"classification"</span>,</span>
<span> trees <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span> min_n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">21</span>,</span>
<span> learn_rate <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.0472</span>,</span>
<span> tree_depth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://parsnip.tidymodels.org/reference/set_engine.html">set_engine</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"xgboost"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb55" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/options.html">options</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">last_fit_xgboost_workflow</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">xgboost_workflow</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">update_model</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">last_fit_xgboost_model</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">last_xgboost_fit</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> </span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">last_fit_xgboost_workflow</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">last_fit</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_dataset_split</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">last_xgboost_fit</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">collect_metrics</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>toprule <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: center;" data-quarto-table-cell-role="th">.metric</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">.estimator</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">.estimate</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">.config</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">accuracy</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8957</td>
<td style="text-align: center;">pre0_mod0_post0</td>
</tr>
<tr class="even">
<td style="text-align: center;">roc_auc</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.8708</td>
<td style="text-align: center;">pre0_mod0_post0</td>
</tr>
<tr class="odd">
<td style="text-align: center;">brier_class</td>
<td style="text-align: center;">binary</td>
<td style="text-align: center;">0.0762</td>
<td style="text-align: center;">pre0_mod0_post0</td>
</tr>
</tbody>
</table>
</div>
</div>
</section></section><section id="results" class="level1"><h1>Results</h1>
<p>It seems that my model has a really good predictive value even if I applied a relatively simple model. If an increased accuracy is justified we can apply a more powerful model (e.g., XGBoost, CatBoost, etc..).</p>
<p>To summarize,</p>
<table class="caption-top table">
<thead><tr class="header">
<th style="text-align: center;">Model</th>
<th style="text-align: center;">Time to build</th>
<th style="text-align: center;">ROC value (test)</th>
<th style="text-align: center;">ROC value (CV)</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">LightGBM</td>
<td style="text-align: center;">6.83 sec.</td>
<td style="text-align: center;">0.8469</td>
<td style="text-align: center;">0.903</td>
</tr>
<tr class="even">
<td style="text-align: center;">XGBoost</td>
<td style="text-align: center;">6.48 sec.</td>
<td style="text-align: center;">0.8736</td>
<td style="text-align: center;">0.881</td>
</tr>
</tbody>
</table>
<p>In conclusion LightGBM model is less time consuming in comparison with XGBoost. On the other hand, XGBoost model needed more time to be built (which was expected) but outperformed LightGBM.</p>
<p>So, we got some results, so what? The main question is still unanswered. All this modelling was about to find out who is interested to a term deposit. Usually, I would use predict function with the corresponding data to mark my predictions. However, I wasn’t able to do that as I received an error about class. Nevermind, the function collect_predictions() does the same.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb56" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pr</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">last_xgboost_fit</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">collect_predictions</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<p>Now, I will select the predicted value and the result and I will paste them on my test data.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb57" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pr</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pr</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.pred_class</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">y</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/rename.html">rename</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>prediction <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.pred_class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">final</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/cbind.html">cbind</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pr</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">bank_test</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<p>And now let’s say that I want to give a list of only the interested ones. I will filter pred class to show only “Yes” values. We should also take into consideration that the dataset does not include any personal information, so I will also include an ID.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb58" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">final</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>toprule <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: center;" data-quarto-table-cell-role="th">prediction</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">y</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">ID</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">age</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">job</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">marital</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">education</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">default</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">balance</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">housing</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">loan</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">contact</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">day</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">month</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">duration</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">campaign</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">pdays</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">previous</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">poutcome</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">y</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">3</td>
<td style="text-align: center;">35</td>
<td style="text-align: center;">management</td>
<td style="text-align: center;">single</td>
<td style="text-align: center;">tertiary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">1350</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">16</td>
<td style="text-align: center;">apr</td>
<td style="text-align: center;">185</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">330</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">failure</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="even">
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">6</td>
<td style="text-align: center;">35</td>
<td style="text-align: center;">management</td>
<td style="text-align: center;">single</td>
<td style="text-align: center;">tertiary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">747</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">23</td>
<td style="text-align: center;">feb</td>
<td style="text-align: center;">141</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">176</td>
<td style="text-align: center;">3</td>
<td style="text-align: center;">failure</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="odd">
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">15</td>
<td style="text-align: center;">31</td>
<td style="text-align: center;">blue-collar</td>
<td style="text-align: center;">married</td>
<td style="text-align: center;">secondary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">360</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">29</td>
<td style="text-align: center;">jan</td>
<td style="text-align: center;">89</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">241</td>
<td style="text-align: center;">1</td>
<td style="text-align: center;">failure</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="even">
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">23</td>
<td style="text-align: center;">44</td>
<td style="text-align: center;">services</td>
<td style="text-align: center;">single</td>
<td style="text-align: center;">secondary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">106</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">12</td>
<td style="text-align: center;">jun</td>
<td style="text-align: center;">109</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">no</td>
</tr>
<tr class="odd">
<td style="text-align: center;">no</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">51</td>
<td style="text-align: center;">45</td>
<td style="text-align: center;">blue-collar</td>
<td style="text-align: center;">divorced</td>
<td style="text-align: center;">primary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">844</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">5</td>
<td style="text-align: center;">jun</td>
<td style="text-align: center;">1018</td>
<td style="text-align: center;">3</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">yes</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">52</td>
<td style="text-align: center;">37</td>
<td style="text-align: center;">technician</td>
<td style="text-align: center;">single</td>
<td style="text-align: center;">secondary</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">228</td>
<td style="text-align: center;">yes</td>
<td style="text-align: center;">no</td>
<td style="text-align: center;">cellular</td>
<td style="text-align: center;">20</td>
<td style="text-align: center;">aug</td>
<td style="text-align: center;">1740</td>
<td style="text-align: center;">2</td>
<td style="text-align: center;">-1</td>
<td style="text-align: center;">0</td>
<td style="text-align: center;">unknown</td>
<td style="text-align: center;">no</td>
</tr>
</tbody>
</table>
</div>
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb59" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">interested_clients</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">final</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ID</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">prediction</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">prediction</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"yes"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>toprule <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span>, html_font <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cambria"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/scroll_box.html">scroll_box</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"100%"</span>, height <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"200px"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">interested_clients</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div style="border: 1px solid #ddd; padding: 0px; overflow-y: scroll; height:200px; overflow-x: scroll; width:100%; ">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th data-quarto-table-cell-role="th" style="text-align: center; position: sticky; top: 0; background-color: #FFFFFF;">ID</th>
<th data-quarto-table-cell-role="th" style="text-align: center; position: sticky; top: 0; background-color: #FFFFFF;">prediction</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">52</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">99</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">157</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">203</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">301</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">355</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">495</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">510</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">620</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">662</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">685</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">703</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">838</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">856</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">960</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">1112</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1127</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">1277</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1280</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">1313</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1350</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">1612</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1739</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">1751</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1764</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">1780</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1897</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">1904</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1915</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">1975</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1981</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">1992</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">2161</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">2259</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">2376</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">2478</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">2634</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">2761</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">2825</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">2828</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">2880</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">2986</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">3089</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">3590</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">3615</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">3645</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">3659</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">3751</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">3755</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">3795</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">3932</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">3957</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">4233</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="even">
<td style="text-align: center;">4263</td>
<td style="text-align: center;">yes</td>
</tr>
<tr class="odd">
<td style="text-align: center;">4276</td>
<td style="text-align: center;">yes</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<p>So, from 1131 possible clients, I finally got 75 that are actually interested. So, I reduced the required phone calls by 93 % (and therefore the working hours allocated to this task). But at what cost ?</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb60" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ds</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">final</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">prediction</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">prediction</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pct <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ds</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hchart.html">hchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"pie"</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hcaes.html">hcaes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">prediction</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pct</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Expected number of clients"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"From {nrow(final)}, only {nrow(interested_clients)} are interested to open a deposit account."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"stesiam, 2023"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-2a523148a44f9b82ffd8" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-2a523148a44f9b82ffd8">{"x":{"hc_opts":{"chart":{"reflow":true},"title":{"text":"Expected number of clients"},"yAxis":{"title":{"text":"pct"},"type":"linear"},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0,"showInLegend":false},"treemap":{"layoutAlgorithm":"squarified"},"scatter":{"marker":{"symbol":"circle"}}},"series":[{"group":"group","data":[{"prediction":"no","n":1076,"pct":95.14,"y":95.14,"name":"no"},{"prediction":"yes","n":55,"pct":4.86,"y":4.86,"name":"yes"}],"type":"pie"}],"xAxis":{"type":"category","title":{"text":"prediction"},"categories":null},"subtitle":{"text":[]},"caption":["stesiam, 2023"]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="hypothesis" class="level1"><h1>Hypothesis</h1>
<p>Let’s suppose we have to launch a new campaign and inform the interested parties. There are two options. The traditional one, in which case we should call everyone (1131 people). On the other hand, we can use a machine learning (ML) model (given that I have some data) to ‘interrupt’ some of them. I am also assuming that a phone call lasts, on average, 4 minutes. Additionally, based on Eurostat, the average hourly wage is 30.5 euros.</p>
<p>To call everyone, we would need 4,524 minutes, which corresponds to 75.4 working hours and therefore amounts to 2,300 euros. By using the model, we would only require 75 calls, equivalent to 5 working hours and 152.5 euros. Even in this simple example (with so few observations), we can see a significant benefit for the company. Last but not least, the company won’t disappoint any customers by promoting something they are not interested in, potentially losing clients. Therefore, ML modeling will help not only financially but also in maintaining a healthy brand.</p>
</section><div id="quarto-appendix" class="default"><section id="acknowledgements" class="level1 appendix unlisted"><h2 class="anchored quarto-appendix-heading">Acknowledgements</h2><div class="quarto-appendix-contents">
<p>Image by <a href="https://pixabay.com/users/geralt-9301/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=563967">Gerd Altmann</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=563967">Pixabay</a></p>
</div></section><section id="references" class="level1 appendix unlisted"><h2 class="quarto-appendix-heading"></h2><div class="quarto-appendix-contents">



</div></section><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0" data-line-spacing="2">
<div id="ref-R-infer" class="csl-entry">
Bray, A., Ismay, C., Chasnovski, E., Couch, S., Baumer, B., &amp; Cetinkaya-Rundel, M. (2025). <em>Infer: Tidy statistical inference</em>. Retrieved from <a href="https://github.com/tidymodels/infer">https://github.com/tidymodels/infer</a>
</div>
<div id="ref-infer2021" class="csl-entry">
Couch, S. P., Bray, A. P., Ismay, C., Chasnovski, E., Baumer, B. S., &amp; Çetinkaya-Rundel, M. (2021). <span class="nocase">infer</span>: An <span>R</span> package for tidyverse-friendly statistical inference. <em>Journal of Open Source Software</em>, <em>6</em>(65), 3661. <a href="https://doi.org/10.21105/joss.03661">https://doi.org/10.21105/joss.03661</a>
</div>
<div id="ref-R-tailor" class="csl-entry">
Couch, S., Frick, H., HvitFeldt, E., &amp; Kuhn, M. (2025). <em>Tailor: Iterative steps for postprocessing model predictions</em>. Retrieved from <a href="https://github.com/tidymodels/tailor">https://github.com/tidymodels/tailor</a>
</div>
<div id="ref-Dua2019" class="csl-entry">
Dua, D., &amp; Graff, C. (2017). <em><span>UCI</span> machine learning repository</em>. University of California, Irvine, School of Information; Computer Sciences. Retrieved from <a href="http://archive.ics.uci.edu/ml">http://archive.ics.uci.edu/ml</a>
</div>
<div id="ref-R-bonsai" class="csl-entry">
Falbel, D., Damiani, A., Hogervorst, R. M., Kuhn, M., Couch, S., &amp; Hvitfeldt, E. (2025). <em>Bonsai: Model wrappers for tree-based models</em>. Retrieved from <a href="https://bonsai.tidymodels.org/">https://bonsai.tidymodels.org/</a>
</div>
<div id="ref-R-rsample" class="csl-entry">
Frick, H., Chow, F., Kuhn, M., Mahoney, M., Silge, J., &amp; Wickham, H. (2025). <em>Rsample: General resampling infrastructure</em>. Retrieved from <a href="https://rsample.tidymodels.org">https://rsample.tidymodels.org</a>
</div>
<div id="ref-R-workflowsets" class="csl-entry">
Frick, H., Kuhn, M., &amp; Couch, S. (2025). <em>Workflowsets: Create a collection of tidymodels workflows</em>. Retrieved from <a href="https://github.com/tidymodels/workflowsets">https://github.com/tidymodels/workflowsets</a>
</div>
<div id="ref-R-glue" class="csl-entry">
Hester, J., &amp; Bryan, J. (2024). <em>Glue: Interpreted string literals</em>. Retrieved from <a href="https://glue.tidyverse.org/">https://glue.tidyverse.org/</a>
</div>
<div id="ref-R-themis" class="csl-entry">
Hvitfeldt, E. (2025). <em>Themis: Extra recipes steps for dealing with unbalanced data</em>. Retrieved from <a href="https://github.com/tidymodels/themis">https://github.com/tidymodels/themis</a>
</div>
<div id="ref-kabacoff2019data" class="csl-entry">
Kabacoff, R. (2019). Data visualization with r. <em>URL Https://Rkabacoff. Github. Io/Datavis</em>.
</div>
<div id="ref-Kirenz2021" class="csl-entry">
Kirenz, J. (2021). Classification with tidymodels, workflows and recipes. Retrieved November 22, 2022, from <a href="https://www.kirenz.com/post/2021-02-17-r-classification-tidymodels/#data-preparation">https://www.kirenz.com/post/2021-02-17-r-classification-tidymodels/#data-preparation</a>
</div>
<div id="ref-R-modeldata" class="csl-entry">
Kuhn, M. (2025a). <em>Modeldata: Data sets useful for modeling examples</em>. Retrieved from <a href="https://modeldata.tidymodels.org">https://modeldata.tidymodels.org</a>
</div>
<div id="ref-R-tune" class="csl-entry">
Kuhn, M. (2025b). <em>Tune: Tidy tuning tools</em>. Retrieved from <a href="https://tune.tidymodels.org/">https://tune.tidymodels.org/</a>
</div>
<div id="ref-R-dials" class="csl-entry">
Kuhn, M., &amp; Frick, H. (2025). <em>Dials: Tools for creating tuning parameter values</em>. Retrieved from <a href="https://dials.tidymodels.org">https://dials.tidymodels.org</a>
</div>
<div id="ref-R-parsnip" class="csl-entry">
Kuhn, M., &amp; Vaughan, D. (2026). <em>Parsnip: A common API to modeling and analysis functions</em>. Retrieved from <a href="https://github.com/tidymodels/parsnip">https://github.com/tidymodels/parsnip</a>
</div>
<div id="ref-R-yardstick" class="csl-entry">
Kuhn, M., Vaughan, D., &amp; Hvitfeldt, E. (2025). <em>Yardstick: Tidy characterizations of model performance</em>. Retrieved from <a href="https://github.com/tidymodels/yardstick">https://github.com/tidymodels/yardstick</a>
</div>
<div id="ref-tidymodels2020" class="csl-entry">
Kuhn, M., &amp; Wickham, H. (2020). <em>Tidymodels: A collection of packages for modeling and machine learning using tidyverse principles.</em> Retrieved from <a href="https://www.tidymodels.org">https://www.tidymodels.org</a>
</div>
<div id="ref-R-tidymodels" class="csl-entry">
Kuhn, M., &amp; Wickham, H. (2025). <em>Tidymodels: Easily install and load the tidymodels packages</em>. Retrieved from <a href="https://tidymodels.tidymodels.org">https://tidymodels.tidymodels.org</a>
</div>
<div id="ref-R-recipes" class="csl-entry">
Kuhn, M., Wickham, H., &amp; Hvitfeldt, E. (2025). <em>Recipes: Preprocessing and feature engineering steps for modeling</em>. Retrieved from <a href="https://github.com/tidymodels/recipes">https://github.com/tidymodels/recipes</a>
</div>
<div id="ref-R-highcharter" class="csl-entry">
Kunst, J. (2022). <em>Highcharter: A wrapper for the highcharts library</em>. Retrieved from <a href="https://jkunst.com/highcharter/">https://jkunst.com/highcharter/</a>
</div>
<div id="ref-R-reactable" class="csl-entry">
Lin, G. (2025). <em>Reactable: Interactive data tables for r</em>. Retrieved from <a href="https://glin.github.io/reactable/">https://glin.github.io/reactable/</a>
</div>
<div id="ref-moro2014data" class="csl-entry">
Moro, S., Cortez, P., &amp; Rita, P. (2014). A data-driven approach to predict the success of bank telemarketing. <em>Decision Support Systems</em>, <em>62</em>, 22–31.
</div>
<div id="ref-R-base" class="csl-entry">
R Core Team. (2025). <em>R: A language and environment for statistical computing</em>. Vienna, Austria: R Foundation for Statistical Computing. Retrieved from <a href="https://www.R-project.org/">https://www.R-project.org/</a>
</div>
<div id="ref-Rbloggers2017" class="csl-entry">
R-Bloggers. (2017). 5 ways to measure running time of r code. Retrieved November 20, 2022, from <a href="https://www.r-bloggers.com/2017/05/5-ways-to-measure-running-time-of-r-code/">https://www.r-bloggers.com/2017/05/5-ways-to-measure-running-time-of-r-code/</a>
</div>
<div id="ref-Rbloggers2020" class="csl-entry">
R-Bloggers. (2020). How to use lightgbm with tidymodels. Retrieved November 20, 2022, from <a href="https://www.r-bloggers.com/2020/08/how-to-use-lightgbm-with-tidymodels/">https://www.r-bloggers.com/2020/08/how-to-use-lightgbm-with-tidymodels/</a>
</div>
<div id="ref-R-broom" class="csl-entry">
Robinson, D., Hayes, A., Couch, S., &amp; Hvitfeldt, E. (2025). <em>Broom: Convert statistical objects into tidy tibbles</em>. Retrieved from <a href="https://broom.tidymodels.org/">https://broom.tidymodels.org/</a>
</div>
<div id="ref-R-workflows" class="csl-entry">
Vaughan, D., Couch, S., &amp; Frick, H. (2025). <em>Workflows: Modeling workflows</em>. Retrieved from <a href="https://github.com/tidymodels/workflows">https://github.com/tidymodels/workflows</a>
</div>
<div id="ref-ggplot22016" class="csl-entry">
Wickham, H. (2016). <em>ggplot2: Elegant graphics for data analysis</em>. Springer-Verlag New York. Retrieved from <a href="https://ggplot2.tidyverse.org">https://ggplot2.tidyverse.org</a>
</div>
<div id="ref-R-forcats" class="csl-entry">
Wickham, H. (2025). <em>Forcats: Tools for working with categorical variables (factors)</em>. Retrieved from <a href="https://forcats.tidyverse.org/">https://forcats.tidyverse.org/</a>
</div>
<div id="ref-R-ggplot2" class="csl-entry">
Wickham, H., Chang, W., Henry, L., Pedersen, T. L., Takahashi, K., Wilke, C., … van den Brand, T. (2025). <em>ggplot2: Create elegant data visualisations using the grammar of graphics</em>. Retrieved from <a href="https://ggplot2.tidyverse.org">https://ggplot2.tidyverse.org</a>
</div>
<div id="ref-R-dplyr" class="csl-entry">
Wickham, H., François, R., Henry, L., Müller, K., &amp; Vaughan, D. (2023). <em>Dplyr: A grammar of data manipulation</em>. Retrieved from <a href="https://dplyr.tidyverse.org">https://dplyr.tidyverse.org</a>
</div>
<div id="ref-R-purrr" class="csl-entry">
Wickham, H., &amp; Henry, L. (2026). <em>Purrr: Functional programming tools</em>. Retrieved from <a href="https://purrr.tidyverse.org/">https://purrr.tidyverse.org/</a>
</div>
<div id="ref-R-readr" class="csl-entry">
Wickham, H., Hester, J., &amp; Bryan, J. (2025). <em>Readr: Read rectangular text data</em>. Retrieved from <a href="https://readr.tidyverse.org">https://readr.tidyverse.org</a>
</div>
<div id="ref-R-scales" class="csl-entry">
Wickham, H., Pedersen, T. L., &amp; Seidel, D. (2025). <em>Scales: Scale functions for visualization</em>. Retrieved from <a href="https://scales.r-lib.org">https://scales.r-lib.org</a>
</div>
<div id="ref-R-tidyr" class="csl-entry">
Wickham, H., Vaughan, D., &amp; Girlich, M. (2025). <em>Tidyr: Tidy messy data</em>. Retrieved from <a href="https://tidyr.tidyverse.org">https://tidyr.tidyverse.org</a>
</div>
<div id="ref-R-kableExtra" class="csl-entry">
Zhu, H. (2024). <em>kableExtra: Construct complex table with kable and pipe syntax</em>. Retrieved from <a href="http://haozhu233.github.io/kableExtra/">http://haozhu233.github.io/kableExtra/</a>
</div>
</div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{2022,
  author = {, stesiam},
  title = {Predict {Possible} {Interested} {Clients}},
  date = {2022-11-24},
  url = {https://stesiam.com/posts/predict-possible-clients/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-2022" class="csl-entry quarto-appendix-citeas">
stesiam. (2022, November 24). Predict Possible Interested Clients.
Retrieved from <a href="https://stesiam.com/posts/predict-possible-clients/">https://stesiam.com/posts/predict-possible-clients/</a>
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>Classification</category>
  <category>Tidymodels</category>
  <guid>https://stesiam.com/posts/predict-possible-clients/</guid>
  <pubDate>Thu, 24 Nov 2022 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/predict-possible-clients/client_predict.png" medium="image" type="image/png" height="93" width="144"/>
</item>
<item>
  <title>Install LightGBM and CatBoost on Ubuntu 22.04</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/install-gbm-in-ubuntu/</link>
  <description><![CDATA[ <section id="introduction" class="level2"><h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<p>When someone starts with Machine Learning he usually starts to build some simple models as logistic regression, naive Bayes, linear regression etc. And those alone are already enough for most use cases, as their simplicity is productivity-friendly and comes up with adequate accuracy. However, in enterprise level, accuracy can be important for a lot of reasons. Gradient Boosting Machines are some algorithms which outperform the aforementioned methods and are not complex enough to use them. Of course, before we build the model with (e.g.&nbsp;tidymodels) we have to install them. Thus, on this article I gather all that information.</p>
<div id="tbl-documentation-list-gbm" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-tbl figure"><figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-documentation-list-gbm-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table&nbsp;1: Documentation - Installation of GBMs
</figcaption><div aria-describedby="tbl-documentation-list-gbm-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<table class="caption-top table">
<thead><tr class="header">
<th style="text-align: center;">Installation Guides</th>
<th style="text-align: center;">Source</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">LightGBM</td>
<td style="text-align: center;"><a href="https://lightgbm.readthedocs.io/en/v3.3.2/Installation-Guide.html">Link</a></td>
</tr>
<tr class="even">
<td style="text-align: center;">CatBoost</td>
<td style="text-align: center;"><a href="https://catboost.ai/en/docs/concepts/installation">Link</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;">XGBoost</td>
<td style="text-align: center;"><a href="https://xgboost.readthedocs.io/en/stable/install.html">Link</a></td>
</tr>
</tbody>
</table>
</div>
</figure>
</div>
<div class="cell fig-cap-location-margin">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" data-cap-location="margin" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/PMassicotte/gtrendsR">gtrendsR</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">googleTrendsData</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">gtrendsR</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">gtrends</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>keyword <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LightGBM"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"CatBoost"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"XGBoost"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, gprop <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"web"</span>, onlyInterest <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">interestOverTime</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">googleTrendsData</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"interest_over_time"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>date <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">lubridate</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://lubridate.tidyverse.org/reference/ymd.html">ymd</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">date</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Year <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">lubridate</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://lubridate.tidyverse.org/reference/year.html">year</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">date</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">keyword</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hits</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">keyword</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Average <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/mean.html">mean</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hits</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  </span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Search Interest of various GBMs"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/unique.html">unique</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">interestOverTime</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Average"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"XGBoost"</span>,</span>
<span>        data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">interestOverTime</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">keyword</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"XGBoost"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Average</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"CatBoost"</span>,</span>
<span>        data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">interestOverTime</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">keyword</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"CatBoost"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Average</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LightGBM"</span>,</span>
<span>        data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">interestOverTime</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">keyword</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LightGBM"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Average</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section><section id="lightgbm" class="level2"><h2 class="anchored" data-anchor-id="lightgbm">LightGBM</h2>
<section id="option-1.-install-r-package" class="level3"><h3 class="anchored" data-anchor-id="option-1.-install-r-package">Option 1. Install R Package</h3>
<p>If you are reading this blog, the most possible scenario in that you are using R too. The most easy way to install the corresponding R package :</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>R code</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" data-filename="R code" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">start_time_lightgbm</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"lightgbm"</span>, repos <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://cran.r-project.org"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">end_time_lightgbm</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="option-2.-cmake" class="level3"><h3 class="anchored" data-anchor-id="option-2.-cmake">Option 2. CMAKE</h3>
<p>The LightGBM <a href="https://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#linux">documentation</a> are referring to this method of installation.</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Terminal</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" data-filename="Terminal" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">sudo</span> apt install cmake</span></code></pre></div></div>
</div>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Terminal</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" data-filename="Terminal" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb4-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> clone <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--recursive</span> https://github.com/microsoft/LightGBM</span>
<span id="cb4-2"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">cd</span> LightGBM</span>
<span id="cb4-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">mkdir</span> build</span>
<span id="cb4-4"><span class="bu" style="color: null;
background-color: null;
font-style: inherit;">cd</span> build</span>
<span id="cb4-5"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">cmake</span> ..</span>
<span id="cb4-6"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">make</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">-j4</span></span></code></pre></div></div>
</div>
</section></section><section id="catboost" class="level2"><h2 class="anchored" data-anchor-id="catboost">CatBoost</h2>
<p>Their <a href="https://github.com/catboost/catboost/releases">realeases</a>.</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>R code</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" data-filename="R code" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"devtools"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
<p>On my occassion, when I tried to install <code>devtools</code> had an error status. According to my error status I had to add packages <code>libharfbuzz-dev</code> and <code>libfribidi-dev</code>. After that, my devtools installation completed without errors.</p>
<p><img src="https://stesiam.com/posts/install-gbm-in-ubuntu/images/error_message_devtools_install.png" class="img-fluid"></p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>R code</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" data-filename="R code" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">start_time_catboost</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">devtools</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">install_url</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"https://github.com/catboost/catboost/releases/download/v1.1.1/catboost-R-Linux-1.1.1.tgz"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>, INSTALL_opts <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"--no-multiarch"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"--no-test-load"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">end_time_catboost</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="xgboost" class="level2"><h2 class="anchored" data-anchor-id="xgboost">XGBoost</h2>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>R code</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" data-filename="R code" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">start_time_xgboost</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"xgboost"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">end_time_xgboost</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Sys.time.html">Sys.time</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</div>
</section><section id="summary" class="level2"><h2 class="anchored" data-anchor-id="summary">Summary</h2>
<table class="caption-top table">
<thead><tr class="header">
<th style="text-align: center;">ML Model</th>
<th style="text-align: center;">Method</th>
<th style="text-align: center;">Installation time</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">LightGBM</td>
<td style="text-align: center;">R package</td>
<td style="text-align: center;">7.79 min.</td>
</tr>
<tr class="even">
<td style="text-align: center;">CatBoost</td>
<td style="text-align: center;">R package (w/o devtools)</td>
<td style="text-align: center;">2.1 min.</td>
</tr>
<tr class="odd">
<td style="text-align: center;">XGBoost</td>
<td style="text-align: center;">R package</td>
<td style="text-align: center;">6.16 min.</td>
</tr>
</tbody>
</table>


</section><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{2022,
  author = {, stesiam},
  title = {Install {LightGBM} and {CatBoost} on {Ubuntu} 22.04},
  date = {2022-11-13},
  url = {https://stesiam.com/posts/install-gbm-in-ubuntu/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-2022" class="csl-entry quarto-appendix-citeas">
stesiam. (2022, November 13). Install LightGBM and CatBoost on Ubuntu
22.04. Retrieved from <a href="https://stesiam.com/posts/install-gbm-in-ubuntu/">https://stesiam.com/posts/install-gbm-in-ubuntu/</a>
</div></div></section></div> ]]></description>
  <category>Linux</category>
  <category>LightGBM</category>
  <category>CatBoost</category>
  <category>XGBoost</category>
  <guid>https://stesiam.com/posts/install-gbm-in-ubuntu/</guid>
  <pubDate>Sun, 13 Nov 2022 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/install-gbm-in-ubuntu/images/installation_ubuntu.png" medium="image" type="image/png" height="81" width="144"/>
</item>
<item>
  <title>Git Configuration</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/git-commands/</link>
  <description><![CDATA[ <section id="introduction" class="level2"><h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<section id="what-is-version-control-system" class="level3"><h3 class="anchored" data-anchor-id="what-is-version-control-system">What is Version Control System</h3>
<p>A Version Control System (VCS) is a way to manage and track code changes. As we build an application, we add functions, change frontend features, fix bugs. We will need to edit the code many times. So we need a way to manage these changes. The tracking of every change to our code is the key point of VCS.</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><img src="https://stesiam.com/posts/git-commands/images/workflow_without_vcs.png" class="img-fluid figure-img"></p>
<figcaption>Workflow without Version Control</figcaption></figure>
</div>
<p>Some popular Version Control Software are the following :</p>
<ul>
<li>Git</li>
<li>Apache Subversion (SVN)</li>
<li>Mercurial</li>
<li>Bazaar</li>
</ul></section><section id="popularity-of-vcs" class="level3"><h3 class="anchored" data-anchor-id="popularity-of-vcs">Popularity of VCS</h3>
<p>Having seen what a VCS is, it would be interesting to see which one is the most widely used. In order to study which VCS is the most popular, I pulled data from <a href="https://trends.google.com/trends/">Google Trends</a>.</p>
<div class="cell" title="Import R libraries">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://readr.tidyverse.org">readr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://lubridate.tidyverse.org">lubridate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">avgPercentageGit</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">trends_vcs_tidy</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">VCS</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"git: (Worldwide)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">AVG</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">avgPercentageSVN</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">trends_vcs_tidy</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">VCS</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"svn: (Worldwide)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/pull.html">pull</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">AVG</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Trends on Version Control Systems"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;span style='display: inline-block; align-items: center; text-align: center;'&gt;Compare trends of Git &lt;img height='16' style='margin: 0px 6px;' src='https://git-scm.com/images/logos/downloads/Git-Icon-1788C.png'&gt; and SVN &lt;img height='16' style='margin: 0px 6px;' src='https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Apache_Subversion_logo.svg/250px-Apache_Subversion_logo.svg.png '&gt; (Subversion) from 2004 to 2022&lt;/span&gt;"</span>, useHTML<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    useHTML <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>    text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'&lt;b&gt;Source:&lt;/b&gt; &lt;a href="https://trends.google.com/trends/" target="_blank"&gt;Google Trends&lt;/a&gt;'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    series <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      marker <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_annotations.html">hc_annotations</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      point <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">70</span>, xAxis <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, yAxis <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Git"</span>,</span>
<span>      rotation <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">30</span>,</span>
<span>      backgroundColor <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"rgba(255,255,255,0.7)"</span>,</span>
<span>      borderColor <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"black"</span>,</span>
<span>      style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        fontSize <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"12px"</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      point <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span>, xAxis <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, yAxis <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Subversion (SVN)"</span>,</span>
<span>      rotation <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,</span>
<span>      backgroundColor <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"rgba(255,255,255,0.7)"</span>,</span>
<span>      borderColor <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"black"</span>,</span>
<span>      style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        fontSize <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"12px"</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/unique.html">unique</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">trends_vcs_tidy</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Search Interest"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>           max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">90</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Git"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">avgPercentageGit</span>, type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"orange"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SVN"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">avgPercentageSVN</span>, type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"steelblue"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>shared <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div id="fig-vcs-trends" class="cell-output-display quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure"><div aria-describedby="fig-vcs-trends-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="highchart html-widget html-fill-item" id="htmlwidget-93adc06f63dc89e08929" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-93adc06f63dc89e08929">{"x":{"hc_opts":{"chart":{"reflow":true},"title":{"text":"Trends on Version Control Systems"},"yAxis":{"title":{"text":"Search Interest"},"max":90},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0,"marker":{"enabled":false}},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"<span style='display: inline-block; align-items: center; text-align: center;'>Compare trends of Git <img height='16' style='margin: 0px 6px;' src='https://git-scm.com/images/logos/downloads/Git-Icon-1788C.png'> and SVN <img height='16' style='margin: 0px 6px;' src='https://upload.wikimedia.org/wikipedia/commons/thumb/2/22/Apache_Subversion_logo.svg/250px-Apache_Subversion_logo.svg.png '> (Subversion) from 2004 to 2022<\/span>","useHTML":true},"caption":{"useHTML":true,"text":"<b>Source:<\/b> <a href=\"https://trends.google.com/trends/\" target=\"_blank\">Google Trends<\/a>"},"annotations":[{"labels":[{"point":{"x":12,"y":70,"xAxis":0,"yAxis":0},"text":"Git","rotation":-30,"backgroundColor":"rgba(255,255,255,0.7)","borderColor":"black","style":{"fontSize":"12px"}},{"point":{"x":12,"y":10,"xAxis":0,"yAxis":0},"text":"Subversion (SVN)","rotation":0,"backgroundColor":"rgba(255,255,255,0.7)","borderColor":"black","style":{"fontSize":"12px"}}]}],"xAxis":{"categories":[2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022]},"series":[{"data":[6.2,7,9,10.7,16.4,33.7,31.4,37.1,47.6,49.2,58.2,63.2,69.2,78.40000000000001,79.5,85.2,73.7,60.8,90],"name":"Git","type":"line","color":"orange"},{"data":[5.1,13.3,24.3,30.1,34.9,36.2,32.8,28.4,22.4,18.9,15.3,12.3,9.9,8.5,6.8,5.7,4.2,3.1,3.1],"name":"SVN","type":"line","color":"steelblue"}],"tooltip":{"shared":true}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-vcs-trends-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;1: Time series of trends on Version Control Systems
</figcaption></figure>
</div>
</div>
<p>The figure above makes clear the dominance of Git as a version control tool. Also, we notice that Subversion (SVN) was quite popular and a capable competitor of Git until 2010. After that period there is a continuous decline in SVN’s interest and the exact opposite for Git. Today, in 2022, the difference is chaotic between them.</p>
</section><section id="benefits" class="level3"><h3 class="anchored" data-anchor-id="benefits">Benefits</h3>
<blockquote class="blockquote">
<p>Why should I use VCS ?</p>
</blockquote>
<ul>
<li>Easy transition between versions</li>
<li>More productive, Time saver if a version produces error</li>
<li>Enables cooperation with other developers (especially with a hosting service like GitHub).</li>
</ul></section><section id="drawbacks" class="level3"><h3 class="anchored" data-anchor-id="drawbacks">Drawbacks</h3>
<blockquote class="blockquote">
<p>Ok. There are some good points. But where is the catch ?</p>
</blockquote>
<ul>
<li>We are adding a new tool to our workflow (Git)</li>
<li>Kind of steep learning curve.</li>
</ul></section><section id="hosting-platforms" class="level3"><h3 class="anchored" data-anchor-id="hosting-platforms">Hosting platforms</h3>
<p>We have mentioned some of the most important programs for managing the code of an application. Of course, there are not a few times when we want to save the progress of our application somewhere else to enable developers communicate their code commits to each other. The solution is some code hosting services. The best known are <strong>GitHub</strong>, <strong>GitLab</strong> and <strong>Bitbucket</strong>. Finally, in case none of the options outlined earlier satisfy us, there is also the self-host solution. For example, if I had concerns about the terms of the above services, I could host <a href="https://gitea.io/en-us/">Gitea</a> on my own server or even to rent a cloud server. That way I would have my own “GitHub”, without depending on a third party service.</p>
</section></section><section id="git-settings" class="level2"><h2 class="anchored" data-anchor-id="git-settings">Git settings</h2>
<section id="set-up-name-email" class="level3"><h3 class="anchored" data-anchor-id="set-up-name-email">Set up Name &amp; Email</h3>
<p>So, you decided to start Git without setting Name and Email?</p>
<p>You may think of it again. In case you try to commit without setting a Name and email. Git will not commit your changes, without prior setting those.</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Terminal</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" data-filename="Terminal" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb3-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> user.name <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"YourName"</span></span>
<span id="cb3-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> user.email your_email</span></code></pre></div></div>
</div>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>If you are planning to host your repository on GitHub, you may want to hide your casual email. In that case GitHub offers a <code>noreply</code> email for this purpose. You can read more <a href="https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address">here</a>.</p>
</div>
</div>
</section><section id="set-editor" class="level3"><h3 class="anchored" data-anchor-id="set-editor">Set editor</h3>
<p>A part that I considered a little bit hard is editing Git commits. By default, Ubuntu has installed Vim, so this was my first editor for my commits. I think this choice is good if you are writing short commit messages or you are acquainted with Vim options/shortcuts. In case you are in a hurry, the use of an alterantive (most familiar) IDE is justified.</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Terminal</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" data-filename="Terminal" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb4-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> core.editor <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"editor_name"</span></span></code></pre></div></div>
</div>
<p>Most notable is Visual Studio Code, which is the most popular IDE, according to <a href="https://insights.stackoverflow.com/survey/2021#section-most-popular-technologies-integrated-development-environment">recent Stackoveflow’s survey</a>.</p>
<table class="caption-top table">
<thead><tr class="header">
<th style="text-align: left;">Editor</th>
<th style="text-align: center;">Command</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">Atom</td>
<td style="text-align: center;">git config –global core.editor “atom –wait”</td>
</tr>
<tr class="even">
<td style="text-align: left;">Visual Studio Code</td>
<td style="text-align: center;">git config –global core.editor “code –wait”</td>
</tr>
</tbody>
</table></section><section id="default-branch-name-to-main" class="level3"><h3 class="anchored" data-anchor-id="default-branch-name-to-main">Default branch name to main</h3>
<p>In October of 2020, GitHub <a href="https://github.blog/changelog/2020-10-01-the-default-branch-for-newly-created-repositories-is-now-main/">announced</a> that will change the default name of initial branch from <code>master</code> to <code>main</code>. <br></p>
<blockquote class="blockquote">
<p>The default branch name for new repositories is now main. <br><span style="float:right">GitHub.blog - October 1,2020</span></p>
</blockquote>
<p>Therefore, it would be good to make this change in our local environment as well, as follows :</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Terminal</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" data-filename="Terminal" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb5-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> init.defaultBranch main</span></code></pre></div></div>
</div>
</section><section id="merge-method" class="level3"><h3 class="anchored" data-anchor-id="merge-method">Merge method</h3>
<p>One change that is not exactly necessary but helps me is to change the defaults regarding merge. Let’s say that I want to add a new feature in my application. Most of the times I will make a branch on which I will start developing my new feature. When I implement this function and I’m ready to merge my changes into the main code there are two situations.</p>
<p><strong>1. There are commits to main branch </strong></p>
<p>The predefined action is to merge. The branch is visible. Our setting has not any effect on this case.</p>
<p><strong>2. There are no commits to main branch</strong></p>
<p>The predefined action of Git is to take the feature branch and paste it on the top of main branch. By making the setting above I am telling Git to keep the branch and react like the first case. The branch is visible again.</p>
<p>With simple words, I am forcing Git to keep branch, regardless of changes to main branch.</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Terminal</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" data-filename="Terminal" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb6-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> merge.ff false</span></code></pre></div></div>
</div>
</section><section id="auto-sign-your-commits" class="level3"><h3 class="anchored" data-anchor-id="auto-sign-your-commits">Auto-sign your commits</h3>
<p>In a previous <a href="https://stesiam.github.io/blog/2022-10-03-Verified-Commits/2022-10-03-Verified-Commits.html">article</a> we saw how to sign our commits as well as the reasons for doing so. In short, we made a PGP key which we added to our GitHub account. From that moment to sign my commits I had to write <code>git commit -S -m "something"</code>, instead of <code>git commit -m "something"</code>. Of course, that method is a little bit problematic. It is a little bit longer, little different in comparison to what I am used to type and most importantly I may forget some times to sign it manually. The last one happened to me A LOT. Thankfully, there is a way to be carefree about that anymore. I can set git config in a way that my commits will be signed automatically.</p>
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warning
</div>
</div>
<div class="callout-body-container callout-body">
<p>If you do not have already a GPG key, you can have a look in this <a href="https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key">guide</a> in order to generate one. Also, depending your hosting platform for your code, you can link your GPG with your account : <br></p>
<ul>
<li>
<a href="https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account">GitHub and GPG keys</a> <br>
</li>
<li>
<a href="https://confluence.atlassian.com/bitbucketserver/using-gpg-keys-913477014.html">BitBucket and GPG keys</a> <br>
</li>
<li><a href="https://docs.gitlab.com/ee/user/project/repository/gpg_signed_commits/">GitLab and GPG keys</a></li>
</ul>
</div>
</div>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Terminal</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" data-filename="Terminal" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb7-1"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">gpg</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--list-secret-keys</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--keyid-format</span> LONG</span>
<span id="cb7-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config user.signingkey key_id</span>
<span id="cb7-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config commit.gpgsign true</span></code></pre></div></div>
</div>
</section><section id="check-your-settings" class="level3"><h3 class="anchored" data-anchor-id="check-your-settings">Check your settings</h3>
<p>Making the above settings, we can have a summary of those with the corresponding command:</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Terminal</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" data-filename="Terminal" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb8-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--list</span></span></code></pre></div></div>
</div>
<p>Here is the output on my machine :</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><img src="https://stesiam.com/posts/git-commands/images/git_config_output.png" class="img-fluid figure-img"></p>
<figcaption>Output of git-config command</figcaption></figure>
</div>
<p>The image above sums up the settings of Git. Although, each user has different needs and for that reason it would be good in case you want to learn more about <code>git config</code> to see their <a href="https://git-scm.com/docs/git-config">documentation page</a>.</p>
</section></section><section id="to-sum-up" class="level2"><h2 class="anchored" data-anchor-id="to-sum-up">To sum up</h2>
<p>A summary of the commands we used to configure Git :</p>
<div class="code-with-filename">
<div class="code-with-filename-file">
<pre><strong>Terminal</strong></pre>
</div>
<div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" data-filename="Terminal" style="background: #f1f3f5;"><pre class="sourceCode bash code-with-copy"><code class="sourceCode bash"><span id="cb9-1"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> user.name <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"YourName"</span></span>
<span id="cb9-2"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> user.email your_email</span>
<span id="cb9-3"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> core.editor <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"editor_name"</span></span>
<span id="cb9-4"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> init.defaultBranch main</span>
<span id="cb9-5"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--global</span> merge.ff false</span>
<span id="cb9-6"></span>
<span id="cb9-7"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Add PGP key to your commits</span></span>
<span id="cb9-8"></span>
<span id="cb9-9"><span class="ex" style="color: null;
background-color: null;
font-style: inherit;">gpg</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--list-secret-keys</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--keyid-format</span> LONG</span>
<span id="cb9-10"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config user.signingkey key_id</span>
<span id="cb9-11"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config commit.gpgsign true</span>
<span id="cb9-12"></span>
<span id="cb9-13"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># check git config settings</span></span>
<span id="cb9-14"></span>
<span id="cb9-15"><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">git</span> config <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--list</span> <span class="at" style="color: #657422;
background-color: null;
font-style: inherit;">--show-origin</span></span></code></pre></div></div>
</div>
<p>Of course you can access your git config file on your Home directory (at least on Ubuntu installation).</p>
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warning
</div>
</div>
<div class="callout-body-container callout-body">
<p>Note that the .gitconfig file, which contains our settings, may not be visible in the Home directory. In general, files whose names begin with a period are not displayed. However, if everything has been done correctly, it’s probably there. For example, in Ubuntu you should choose to show hidden files.</p>
</div>
</div>
<p>In case you open that file you will see probably something like the above :</p>
<script src="https://gist.github.com/stesiam/c4c1541fd57dad0cafdb3c8be9b95a12.js"></script></section><div id="quarto-appendix" class="default"><section id="acknowledgements" class="level2 appendix unlisted"><h2 class="anchored quarto-appendix-heading">Acknowledgements</h2><div class="quarto-appendix-contents">
<p>Image by <a href="https://pixabay.com/users/skorec-16694100/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7522129">Daniel Skovran</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7522129">Pixabay</a></p>



</div></section><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0" data-line-spacing="2">
<div id="ref-chacon2014pro" class="csl-entry">
Chacon, S., &amp; Straub, B. (2014). <em>Pro git</em>. Springer Nature.
</div>
</div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{2022,
  author = {, stesiam},
  title = {Git {Configuration}},
  date = {2022-11-04},
  url = {https://stesiam.com/posts/git-commands/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-2022" class="csl-entry quarto-appendix-citeas">
stesiam. (2022, November 4). Git Configuration. Retrieved from <a href="https://stesiam.com/posts/git-commands/">https://stesiam.com/posts/git-commands/</a>
</div></div></section></div> ]]></description>
  <category>Git</category>
  <guid>https://stesiam.com/posts/git-commands/</guid>
  <pubDate>Fri, 04 Nov 2022 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/git-commands/images/git_new.png" medium="image" type="image/png" height="83" width="144"/>
</item>
<item>
  <title>Forecasting Unemployment in Greece</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/forecasting-greek-unemployment/</link>
  <description><![CDATA[ <section id="introduction" class="level2"><h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<section id="background" class="level3"><h3 class="anchored" data-anchor-id="background">Background</h3>
</section><section id="time-series" class="level3"><h3 class="anchored" data-anchor-id="time-series">Time series</h3>
</section><section id="methodology" class="level3"><h3 class="anchored" data-anchor-id="methodology">Methodology</h3>
</section><section id="short-answer" class="level3"><h3 class="anchored" data-anchor-id="short-answer">Short Answer</h3>
<p>If you are in a hurry, I predicted that unemployment on Greece is expected to further reduce. It will range between 10% - 13% in February, 2023.</p>
</section></section><section id="prerequisites" class="level2"><h2 class="anchored" data-anchor-id="prerequisites">Prerequisites</h2>
<section id="import-libraries" class="level3"><h3 class="anchored" data-anchor-id="import-libraries">Import Libraries</h3>
<p>For this analysis we will need standard libraries for importing and processing my data, such as readr <span class="citation" data-cites="R-readr">(Wickham, Hester, &amp; Bryan, 2025)</span> and dplyr <span class="citation" data-cites="R-dplyr">(Wickham, François, Henry, Müller, &amp; Vaughan, 2023)</span>. The kableExtra <span class="citation" data-cites="R-kableExtra">(Zhu, 2024)</span> package was used to print the results in table format, while the flextable <span class="citation" data-cites="R-flextable">(Gohel &amp; Skintzos, 2025)</span> package was used to print the results of the Dickey-Fuller and KPSS tests.</p>
<p>Then, due to the nature of the data (time series) it was deemed necessary to use relevant libraries such as lubridate<span class="citation" data-cites="R-lubridate">(Spinu, Grolemund, &amp; Wickham, 2024)</span>, tseries<span class="citation" data-cites="R-tseries">(Trapletti &amp; Hornik, 2026)</span> &amp; forecast<span class="citation" data-cites="R-forecast">(R. Hyndman et al., 2026)</span> packages.</p>
<p>Finally, the ggplot2 <span class="citation" data-cites="R-ggplot2">(<strong>R-ggplot2?</strong>)</span> package was used to create some visualizations, as well as an auxiliary package, ggtext <span class="citation" data-cites="R-ggtext">(<strong>R-ggtext?</strong>)</span>, for further formatting those.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># General purpose R libraries</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org">dplyr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://readr.tidyverse.org">readr</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="http://haozhu233.github.io/kableExtra/">kableExtra</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://ardata-fr.github.io/flextable-book/">flextable</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Graphs</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Time Series </span></span>
<span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://lubridate.tidyverse.org">lubridate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">tseries</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://pkg.robjhyndman.com/forecast/">forecast</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf_plot_function</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">min</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">max</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ts_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">N</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/length.html">length</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ts_data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Compute confidence limit</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">conf_limit</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/Normal.html">qnorm</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.975</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/MathFun.html">sqrt</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">N</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Use forecast::Acf (biased estimator, recommended for ARIMA)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf_obj</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://pkg.robjhyndman.com/forecast/reference/Acf.html">Acf</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ts_data</span>, plot <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>, lag.max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Extract lags and values</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Note: Acf() returns acf_obj$acf as a matrix; acf_obj$lag as a matrix</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lags_acf</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/numeric.html">as.numeric</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf_obj</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lag</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>             <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># skip lag 0</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf_values</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/numeric.html">as.numeric</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf_obj</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>           <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># skip lag 0</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Build the highcharter ACF plot</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf_chart</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"column"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Autocorrelation Plot"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lags_acf</span>, title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lag"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">min</span>, max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">max</span>,</span>
<span>    title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ACF"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    plotLines <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#000000"</span>, width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">conf_limit</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF0000"</span>, dashStyle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ShortDash"</span>, width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">conf_limit</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF0000"</span>, dashStyle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ShortDash"</span>, width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ACF"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf_values</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Show chart</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf_chart</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pacf_plot_function</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">min</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">max</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ts_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">data</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">N</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/length.html">length</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ts_data</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  </span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Compute confidence limit (same formula as for ACF)</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">conf_limit</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/Normal.html">qnorm</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.975</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/MathFun.html">sqrt</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">N</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  </span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Compute PACF using forecast::Pacf (biased estimator, recommended for ARIMA)</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pacf_obj</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">forecast</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://pkg.robjhyndman.com/forecast/reference/Acf.html">Pacf</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">ts_data</span>, plot <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span>, lag.max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  </span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Extract lags and PACF values</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lags_pacf</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/numeric.html">as.numeric</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pacf_obj</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lag</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># already excludes lag 0</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pacf_values</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/numeric.html">as.numeric</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pacf_obj</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">acf</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  </span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Build the highcharter PACF plot</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pacf_chart</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">highcharter</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">highcharter</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"column"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">highcharter</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Partial Autocorrelation Plot"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">highcharter</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lags_pacf</span>, title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lag"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">highcharter</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">min</span>, max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">max</span>,</span>
<span>      title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PACF"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      plotLines <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#000000"</span>, width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">conf_limit</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF0000"</span>, dashStyle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ShortDash"</span>, width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>value <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">conf_limit</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF0000"</span>, dashStyle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ShortDash"</span>, width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">highcharter</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">highcharter</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PACF"</span>, data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pacf_values</span>, digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  </span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Show chart</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pacf_chart</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</details>
</div>
</section><section id="import-dataset" class="level3"><h3 class="anchored" data-anchor-id="import-dataset">Import dataset</h3>
<p>After loading the libraries I am able to use the commands of the readr package to import my data. My data is in .csv format, so I’ll use the <code><a href="https://readr.tidyverse.org/reference/read_delim.html">read_csv()</a></code> command <span class="citation" data-cites="R-readr">(Wickham et al., 2025)</span> to import them.</p>
<p>Additionally, I choose not to include EA-19 values (as I investigate Greece’s unemployment).</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://readr.tidyverse.org/reference/read_delim.html">read_csv</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"data/unemployment.csv"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"EA19"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section><section id="preview-dataset" class="level3"><h3 class="anchored" data-anchor-id="preview-dataset">Preview Dataset</h3>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">.</span>, </span>
<span>    align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,</span>
<span>    booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,</span>
<span>    centering <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,</span>
<span>    valign <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div id="tbl-preview-dataset" class="cell quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-tbl figure"><figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-preview-dataset-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table&nbsp;1: Preview Dataset (first 6 rows)
</figcaption><div aria-describedby="tbl-preview-dataset-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output-display">
<table class="table do-not-create-environment cell caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: center;" data-quarto-table-cell-role="th">LOCATION</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">TIME</th>
<th style="text-align: center;" data-quarto-table-cell-role="th">Value</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1998-04</td>
<td style="text-align: center;">10.9</td>
</tr>
<tr class="even">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1998-05</td>
<td style="text-align: center;">11.0</td>
</tr>
<tr class="odd">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1998-06</td>
<td style="text-align: center;">10.9</td>
</tr>
<tr class="even">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1998-07</td>
<td style="text-align: center;">11.0</td>
</tr>
<tr class="odd">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1998-08</td>
<td style="text-align: center;">11.2</td>
</tr>
<tr class="even">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1998-09</td>
<td style="text-align: center;">11.1</td>
</tr>
<tr class="odd">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1998-10</td>
<td style="text-align: center;">11.1</td>
</tr>
<tr class="even">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1998-11</td>
<td style="text-align: center;">11.4</td>
</tr>
<tr class="odd">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1998-12</td>
<td style="text-align: center;">11.4</td>
</tr>
<tr class="even">
<td style="text-align: center;">GRC</td>
<td style="text-align: center;">1999-01</td>
<td style="text-align: center;">11.4</td>
</tr>
</tbody>
</table>
</div>
</div>
</figure>
</div>
</div>
</section><section id="dataset-structure" class="level3"><h3 class="anchored" data-anchor-id="dataset-structure">Dataset Structure</h3>
<p>Our dataset is consisted by 3 variables (columns). More specifically, concerning my variables, are as follows :</p>
<table class="caption-top table">
<colgroup>
<col style="width: 21%">
<col style="width: 33%">
<col style="width: 45%">
</colgroup>
<thead><tr class="header">
<th style="text-align: center;">Variable</th>
<th style="text-align: center;">Property</th>
<th style="text-align: center;">Description</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><code>LOCATION</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">Specific country’s statistics</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>TIME</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (ordinal)</td>
<td style="text-align: center;">Month of the reported data</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>Value</code></td>
<td style="text-align: center;">
<em>quantitative</em> <br> (continuous)</td>
<td style="text-align: center;">Unemployment at the given Time and Country</td>
</tr>
</tbody>
</table>
<p>Thus, my sample has 3 variables, of which 2 are qualitative and 1 is quantitative property.</p>
</section></section><section id="time-series-preprocessing" class="level2"><h2 class="anchored" data-anchor-id="time-series-preprocessing">Time Series Preprocessing</h2>
<p>The <code>TIME</code> variable needs to be a Date variable which is not fulfilled on our case.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/lapply.html">sapply</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th"></th>
<th style="text-align: left;" data-quarto-table-cell-role="th">x</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">LOCATION</td>
<td style="text-align: left;">character</td>
</tr>
<tr class="even">
<td style="text-align: left;">TIME</td>
<td style="text-align: left;">character</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Value</td>
<td style="text-align: left;">numeric</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>So, above I see that I have dates in a format “YYYY-MM” (Year - Month) and they are considered as characters. With the help of <code>lubridate</code> package I will convert my time series on a Date format.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">lubridate</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://lubridate.tidyverse.org/reference/ymd.html">ym</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<p>And let’s check again :</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/lapply.html">sapply</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">class</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th"></th>
<th style="text-align: left;" data-quarto-table-cell-role="th">x</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">LOCATION</td>
<td style="text-align: left;">character</td>
</tr>
<tr class="even">
<td style="text-align: left;">TIME</td>
<td style="text-align: left;">Date</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Value</td>
<td style="text-align: left;">numeric</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>And now I got the Date format. I am able to continue my analysis.</p>
</section><section id="missing-values" class="level2"><h2 class="anchored" data-anchor-id="missing-values">Missing Values</h2>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/sum.html">sum</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/NA.html">is.na</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<p>Good news! On this dataset there are 0 missing values, in total.</p>
<p>In case the dataset had missing values, I would first look at which variables those were.In a second phase, it might be necessary to replace the missing values.</p>
</section><section id="descriptive-statistics" class="level2"><h2 class="anchored" data-anchor-id="descriptive-statistics">Descriptive Statistics</h2>
<p>The unemployment data for Greece refer to the period from April 1998 το August 2022. Regarding Europe we have data from January 2000 to August 2022.</p>
<p>The last 20 years have seen particularly large changes mainly in Greece, due to the domestic economic crisis. There is a noticeable change between September 2010 (10.1%) and September 2013 (28.1 %), in terms of unemployment in Greece. For the record, below you can find a table with the months that presented the highest unemployment in Greece. As you will notice the five highest values were observed in 2013.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"GRC"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">tail</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th"></th>
<th style="text-align: left;" data-quarto-table-cell-role="th">TIME</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">Value</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">289</td>
<td style="text-align: left;">2013-11-01</td>
<td style="text-align: right;">27.9</td>
</tr>
<tr class="even">
<td style="text-align: left;">290</td>
<td style="text-align: left;">2013-04-01</td>
<td style="text-align: right;">28.0</td>
</tr>
<tr class="odd">
<td style="text-align: left;">291</td>
<td style="text-align: left;">2013-05-01</td>
<td style="text-align: right;">28.0</td>
</tr>
<tr class="even">
<td style="text-align: left;">292</td>
<td style="text-align: left;">2013-07-01</td>
<td style="text-align: right;">28.1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">293</td>
<td style="text-align: left;">2013-09-01</td>
<td style="text-align: right;">28.1</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>Accordingly, the highest unemployment rates observed at the European level are the following:</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"EU27_2020"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">tail</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th"></th>
<th style="text-align: left;" data-quarto-table-cell-role="th">TIME</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">Value</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">268</td>
<td style="text-align: left;">2013-06-01</td>
<td style="text-align: right;">11.6</td>
</tr>
<tr class="even">
<td style="text-align: left;">269</td>
<td style="text-align: left;">2013-01-01</td>
<td style="text-align: right;">11.7</td>
</tr>
<tr class="odd">
<td style="text-align: left;">270</td>
<td style="text-align: left;">2013-02-01</td>
<td style="text-align: right;">11.7</td>
</tr>
<tr class="even">
<td style="text-align: left;">271</td>
<td style="text-align: left;">2013-03-01</td>
<td style="text-align: right;">11.7</td>
</tr>
<tr class="odd">
<td style="text-align: left;">272</td>
<td style="text-align: left;">2013-04-01</td>
<td style="text-align: right;">11.7</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>The lowest unemployment ever recorded in Greece was in the period of 2008:</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"GRC"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th">TIME</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">Value</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">2008-05-01</td>
<td style="text-align: right;">7.4</td>
</tr>
<tr class="even">
<td style="text-align: left;">2008-06-01</td>
<td style="text-align: right;">7.6</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2008-07-01</td>
<td style="text-align: right;">7.6</td>
</tr>
<tr class="even">
<td style="text-align: left;">2008-10-01</td>
<td style="text-align: right;">7.6</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2008-01-01</td>
<td style="text-align: right;">7.7</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>On the other hand, at the moment in Europe we are at the lowest levels of the last 20 years, with unemployment hovering around 6%.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"EU27_2020"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">F</span>, position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"center"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th">TIME</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">Value</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">2022-07-01</td>
<td style="text-align: right;">6.0</td>
</tr>
<tr class="even">
<td style="text-align: left;">2022-08-01</td>
<td style="text-align: right;">6.0</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2022-04-01</td>
<td style="text-align: right;">6.1</td>
</tr>
<tr class="even">
<td style="text-align: left;">2022-05-01</td>
<td style="text-align: right;">6.1</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2022-06-01</td>
<td style="text-align: right;">6.1</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>Finally, it is evident that in the case of Greece the changes are more intense than in Europe.</p>
<p>All of the above can be summarized by the following graph:</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb13" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">g</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Year <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://lubridate.tidyverse.org/reference/year.html">year</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>mean_unemployment <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/mean.html">mean</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stderr">
<pre><code>`summarise()` has grouped output by 'LOCATION'. You can override using the
`.groups` argument.</code></pre>
</div>
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Unemployment Rates"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Year"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Value"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>shared <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>, valueDecimals <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>, valueSuffix <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" %"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">g</span>,</span>
<span>        type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span>,</span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hcaes.html">hcaes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">mean_unemployment</span>, group <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  series <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>      formatter <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/htmlwidgets/man/JS.html">JS</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"function() {</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">        if (this.point.index === this.series.data.length - 1) {</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">          return this.y.toFixed(2) + ' %';</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">        }</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">        return null;</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">      }"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-c28e5f7c4f1703815bbf" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-c28e5f7c4f1703815bbf">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"line"},"title":{"text":"Unemployment Rates"},"yAxis":{"title":{"text":"Value"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0,"dataLabels":{"enabled":true,"formatter":"function() {\n        if (this.point.index === this.series.data.length - 1) {\n          return this.y.toFixed(2) + ' %';\n        }\n        return null;\n      }"}},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"title":{"text":"Year"}},"tooltip":{"shared":true,"valueDecimals":2,"valueSuffix":" %"},"series":[{"name":"EU27_2020","data":[{"LOCATION":"EU27_2020","Year":2000,"mean_unemployment":8.991666666666667,"x":2000,"y":8.991666666666667},{"LOCATION":"EU27_2020","Year":2001,"mean_unemployment":8.75,"x":2001,"y":8.75},{"LOCATION":"EU27_2020","Year":2002,"mean_unemployment":9.050000000000001,"x":2002,"y":9.050000000000001},{"LOCATION":"EU27_2020","Year":2003,"mean_unemployment":9.866666666666667,"x":2003,"y":9.866666666666667},{"LOCATION":"EU27_2020","Year":2004,"mean_unemployment":10,"x":2004,"y":10},{"LOCATION":"EU27_2020","Year":2005,"mean_unemployment":9.683333333333334,"x":2005,"y":9.683333333333334},{"LOCATION":"EU27_2020","Year":2006,"mean_unemployment":8.741666666666667,"x":2006,"y":8.741666666666667},{"LOCATION":"EU27_2020","Year":2007,"mean_unemployment":7.575,"x":2007,"y":7.575},{"LOCATION":"EU27_2020","Year":2008,"mean_unemployment":7.333333333333333,"x":2008,"y":7.333333333333333},{"LOCATION":"EU27_2020","Year":2009,"mean_unemployment":9.300000000000001,"x":2009,"y":9.300000000000001},{"LOCATION":"EU27_2020","Year":2010,"mean_unemployment":10.06666666666667,"x":2010,"y":10.06666666666667},{"LOCATION":"EU27_2020","Year":2011,"mean_unemployment":10.08333333333333,"x":2011,"y":10.08333333333333},{"LOCATION":"EU27_2020","Year":2012,"mean_unemployment":11.06666666666667,"x":2012,"y":11.06666666666667},{"LOCATION":"EU27_2020","Year":2013,"mean_unemployment":11.575,"x":2013,"y":11.575},{"LOCATION":"EU27_2020","Year":2014,"mean_unemployment":11.025,"x":2014,"y":11.025},{"LOCATION":"EU27_2020","Year":2015,"mean_unemployment":10.19166666666667,"x":2015,"y":10.19166666666667},{"LOCATION":"EU27_2020","Year":2016,"mean_unemployment":9.266666666666666,"x":2016,"y":9.266666666666666},{"LOCATION":"EU27_2020","Year":2017,"mean_unemployment":8.275,"x":2017,"y":8.275},{"LOCATION":"EU27_2020","Year":2018,"mean_unemployment":7.391666666666667,"x":2018,"y":7.391666666666667},{"LOCATION":"EU27_2020","Year":2019,"mean_unemployment":6.825,"x":2019,"y":6.825},{"LOCATION":"EU27_2020","Year":2020,"mean_unemployment":7.241666666666666,"x":2020,"y":7.241666666666666},{"LOCATION":"EU27_2020","Year":2021,"mean_unemployment":7.025,"x":2021,"y":7.025},{"LOCATION":"EU27_2020","Year":2022,"mean_unemployment":6.125,"x":2022,"y":6.125}],"type":"line"},{"name":"GRC","data":[{"LOCATION":"GRC","Year":1998,"mean_unemployment":11.11111111111111,"x":1998,"y":11.11111111111111},{"LOCATION":"GRC","Year":1999,"mean_unemployment":11.95,"x":1999,"y":11.95},{"LOCATION":"GRC","Year":2000,"mean_unemployment":11.225,"x":2000,"y":11.225},{"LOCATION":"GRC","Year":2001,"mean_unemployment":10.675,"x":2001,"y":10.675},{"LOCATION":"GRC","Year":2002,"mean_unemployment":10.30833333333333,"x":2002,"y":10.30833333333333},{"LOCATION":"GRC","Year":2003,"mean_unemployment":9.758333333333333,"x":2003,"y":9.758333333333333},{"LOCATION":"GRC","Year":2004,"mean_unemployment":10.59166666666667,"x":2004,"y":10.59166666666667},{"LOCATION":"GRC","Year":2005,"mean_unemployment":10.025,"x":2005,"y":10.025},{"LOCATION":"GRC","Year":2006,"mean_unemployment":9.008333333333333,"x":2006,"y":9.008333333333333},{"LOCATION":"GRC","Year":2007,"mean_unemployment":8.416666666666666,"x":2007,"y":8.416666666666666},{"LOCATION":"GRC","Year":2008,"mean_unemployment":7.8,"x":2008,"y":7.8},{"LOCATION":"GRC","Year":2009,"mean_unemployment":9.766666666666667,"x":2009,"y":9.766666666666667},{"LOCATION":"GRC","Year":2010,"mean_unemployment":12.91666666666667,"x":2010,"y":12.91666666666667},{"LOCATION":"GRC","Year":2011,"mean_unemployment":18.09166666666667,"x":2011,"y":18.09166666666667},{"LOCATION":"GRC","Year":2012,"mean_unemployment":24.825,"x":2012,"y":24.825},{"LOCATION":"GRC","Year":2013,"mean_unemployment":27.8,"x":2013,"y":27.8},{"LOCATION":"GRC","Year":2014,"mean_unemployment":26.625,"x":2014,"y":26.625},{"LOCATION":"GRC","Year":2015,"mean_unemployment":25.01666666666667,"x":2015,"y":25.01666666666667},{"LOCATION":"GRC","Year":2016,"mean_unemployment":23.875,"x":2016,"y":23.875},{"LOCATION":"GRC","Year":2017,"mean_unemployment":21.825,"x":2017,"y":21.825},{"LOCATION":"GRC","Year":2018,"mean_unemployment":19.75,"x":2018,"y":19.75},{"LOCATION":"GRC","Year":2019,"mean_unemployment":17.85833333333333,"x":2019,"y":17.85833333333333},{"LOCATION":"GRC","Year":2020,"mean_unemployment":17.59166666666667,"x":2020,"y":17.59166666666667},{"LOCATION":"GRC","Year":2021,"mean_unemployment":14.8,"x":2021,"y":14.8},{"LOCATION":"GRC","Year":2022,"mean_unemployment":12.7375,"x":2022,"y":12.7375}],"type":"line"},{"name":"OECD","data":[{"LOCATION":"OECD","Year":2001,"mean_unemployment":6.693926666666667,"x":2001,"y":6.693926666666667},{"LOCATION":"OECD","Year":2002,"mean_unemployment":7.217836,"x":2002,"y":7.217836},{"LOCATION":"OECD","Year":2003,"mean_unemployment":7.32901075,"x":2003,"y":7.32901075},{"LOCATION":"OECD","Year":2004,"mean_unemployment":7.186191916666667,"x":2004,"y":7.186191916666667},{"LOCATION":"OECD","Year":2005,"mean_unemployment":6.833244083333334,"x":2005,"y":6.833244083333334},{"LOCATION":"OECD","Year":2006,"mean_unemployment":6.323188416666667,"x":2006,"y":6.323188416666667},{"LOCATION":"OECD","Year":2007,"mean_unemployment":5.860239916666667,"x":2007,"y":5.860239916666667},{"LOCATION":"OECD","Year":2008,"mean_unemployment":6.19083425,"x":2008,"y":6.19083425},{"LOCATION":"OECD","Year":2009,"mean_unemployment":8.31856325,"x":2009,"y":8.31856325},{"LOCATION":"OECD","Year":2010,"mean_unemployment":8.5215555,"x":2010,"y":8.5215555},{"LOCATION":"OECD","Year":2011,"mean_unemployment":8.124760666666667,"x":2011,"y":8.124760666666667},{"LOCATION":"OECD","Year":2012,"mean_unemployment":8.104284083333333,"x":2012,"y":8.104284083333333},{"LOCATION":"OECD","Year":2013,"mean_unemployment":8.0130815,"x":2013,"y":8.0130815},{"LOCATION":"OECD","Year":2014,"mean_unemployment":7.447850083333333,"x":2014,"y":7.447850083333333},{"LOCATION":"OECD","Year":2015,"mean_unemployment":6.886819583333334,"x":2015,"y":6.886819583333334},{"LOCATION":"OECD","Year":2016,"mean_unemployment":6.468867666666666,"x":2016,"y":6.468867666666666},{"LOCATION":"OECD","Year":2017,"mean_unemployment":5.940258500000001,"x":2017,"y":5.940258500000001},{"LOCATION":"OECD","Year":2018,"mean_unemployment":5.498065583333333,"x":2018,"y":5.498065583333333},{"LOCATION":"OECD","Year":2019,"mean_unemployment":5.418292583333334,"x":2019,"y":5.418292583333334},{"LOCATION":"OECD","Year":2020,"mean_unemployment":7.169993916666667,"x":2020,"y":7.169993916666667},{"LOCATION":"OECD","Year":2021,"mean_unemployment":6.155706916666666,"x":2021,"y":6.155706916666666},{"LOCATION":"OECD","Year":2022,"mean_unemployment":5.01607775,"x":2022,"y":5.01607775}],"type":"line"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":["hc_opts.plotOptions.series.dataLabels.formatter"],"jsHooks":[]}</script>
</div>
</div>
</section><section id="examine-trend-and-seasonality" class="level2"><h2 class="anchored" data-anchor-id="examine-trend-and-seasonality">Examine trend and seasonality</h2>
<p>In time series analysis, it’s important to distinguish where the variability in the final form of the series originates from. Time series consist of three main components: trend, seasonality, and randomness. The trend refers to whether the series shows a specific direction (upward/downward). Seasonality refers to recurring patterns at regular intervals.</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ay_t%20=%20S_t%20+%20T_t%20+%20E_t%0A"> Όπου:</p>
<ul>
<li>
<img src="https://latex.codecogs.com/png.latex?y_t"> δηλώνουν τα δεδομένα που έχουμε διαθέσιμα,</li>
<li><img src="https://latex.codecogs.com/png.latex?S_t"></li>
<li><img src="https://latex.codecogs.com/png.latex?T_t"></li>
<li><img src="https://latex.codecogs.com/png.latex?E_t"></li>
</ul>
<p>Similarly, the multiplicative model is defined:</p>
<p><img src="https://latex.codecogs.com/png.latex?%0Ay_t%20=%20S_t%20%5Ccdot%20T_t%20%5Ccdot%20E_t%0A"></p>
<p>where the components that make up the time series are multiplied instead of added.</p>
</section><section id="examine-stationarity" class="level2"><h2 class="anchored" data-anchor-id="examine-stationarity">Examine stationarity</h2>
<section id="definition-of-stationarity" class="level3"><h3 class="anchored" data-anchor-id="definition-of-stationarity">Definition of stationarity</h3>
<p>An important concept in studying time series is stationarity. A time series is called stationary <span class="citation" data-cites="appliedtimeseriespenn">(<span>“Applied Time Series Analysis,”</span> n.d.)</span> if: </p>
<ol type="1">
<li>
<img src="https://latex.codecogs.com/png.latex?E(X_t):%5Ctext%7Bconstant%7D"> </li>
<li>
<img src="https://latex.codecogs.com/png.latex?Var(X_t):%20%5Ctext%7Bconstant%7D"> </li>
<li><img src="https://latex.codecogs.com/png.latex?Cov(X_t,%20X_s):%20%5Ctext%7Bconstant%7D"></li>
</ol></section><section id="examine-stationarity-graphically" class="level3"><h3 class="anchored" data-anchor-id="examine-stationarity-graphically">Examine Stationarity Graphically</h3>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-1-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-1" aria-controls="tabset-1-1" aria-selected="true" href="">Level</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-2" aria-controls="tabset-1-2" aria-selected="false" href="">First Diff.</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-3" aria-controls="tabset-1-3" aria-selected="false" href="">Second Diff.</a></li>
</ul>
<div class="tab-content">
<div id="tabset-1-1" class="tab-pane active" aria-labelledby="tabset-1-1-tab">
<p>It is apparent that there is a big variation on the values of unemployment. This time series is not stationary and the differencing is justified.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Unemployment Rates"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Year"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Value"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>shared <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>, valueDecimals <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>, valueSuffix <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" %"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">g</span>,</span>
<span>        type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span>,</span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hcaes.html">hcaes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Year</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">mean_unemployment</span>, group <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  series <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>      formatter <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/htmlwidgets/man/JS.html">JS</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"function() {</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">        if (this.point.index === this.series.data.length - 1) {</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">          return this.y.toFixed(2) + ' %';</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">        }</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">        return null;</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">      }"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-2ebf3c200e9b64a987c4" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-2ebf3c200e9b64a987c4">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"line"},"title":{"text":"Unemployment Rates"},"yAxis":{"title":{"text":"Value"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0,"dataLabels":{"enabled":true,"formatter":"function() {\n        if (this.point.index === this.series.data.length - 1) {\n          return this.y.toFixed(2) + ' %';\n        }\n        return null;\n      }"}},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"title":{"text":"Year"}},"tooltip":{"shared":true,"valueDecimals":2,"valueSuffix":" %"},"series":[{"name":"EU27_2020","data":[{"LOCATION":"EU27_2020","Year":2000,"mean_unemployment":8.991666666666667,"x":2000,"y":8.991666666666667},{"LOCATION":"EU27_2020","Year":2001,"mean_unemployment":8.75,"x":2001,"y":8.75},{"LOCATION":"EU27_2020","Year":2002,"mean_unemployment":9.050000000000001,"x":2002,"y":9.050000000000001},{"LOCATION":"EU27_2020","Year":2003,"mean_unemployment":9.866666666666667,"x":2003,"y":9.866666666666667},{"LOCATION":"EU27_2020","Year":2004,"mean_unemployment":10,"x":2004,"y":10},{"LOCATION":"EU27_2020","Year":2005,"mean_unemployment":9.683333333333334,"x":2005,"y":9.683333333333334},{"LOCATION":"EU27_2020","Year":2006,"mean_unemployment":8.741666666666667,"x":2006,"y":8.741666666666667},{"LOCATION":"EU27_2020","Year":2007,"mean_unemployment":7.575,"x":2007,"y":7.575},{"LOCATION":"EU27_2020","Year":2008,"mean_unemployment":7.333333333333333,"x":2008,"y":7.333333333333333},{"LOCATION":"EU27_2020","Year":2009,"mean_unemployment":9.300000000000001,"x":2009,"y":9.300000000000001},{"LOCATION":"EU27_2020","Year":2010,"mean_unemployment":10.06666666666667,"x":2010,"y":10.06666666666667},{"LOCATION":"EU27_2020","Year":2011,"mean_unemployment":10.08333333333333,"x":2011,"y":10.08333333333333},{"LOCATION":"EU27_2020","Year":2012,"mean_unemployment":11.06666666666667,"x":2012,"y":11.06666666666667},{"LOCATION":"EU27_2020","Year":2013,"mean_unemployment":11.575,"x":2013,"y":11.575},{"LOCATION":"EU27_2020","Year":2014,"mean_unemployment":11.025,"x":2014,"y":11.025},{"LOCATION":"EU27_2020","Year":2015,"mean_unemployment":10.19166666666667,"x":2015,"y":10.19166666666667},{"LOCATION":"EU27_2020","Year":2016,"mean_unemployment":9.266666666666666,"x":2016,"y":9.266666666666666},{"LOCATION":"EU27_2020","Year":2017,"mean_unemployment":8.275,"x":2017,"y":8.275},{"LOCATION":"EU27_2020","Year":2018,"mean_unemployment":7.391666666666667,"x":2018,"y":7.391666666666667},{"LOCATION":"EU27_2020","Year":2019,"mean_unemployment":6.825,"x":2019,"y":6.825},{"LOCATION":"EU27_2020","Year":2020,"mean_unemployment":7.241666666666666,"x":2020,"y":7.241666666666666},{"LOCATION":"EU27_2020","Year":2021,"mean_unemployment":7.025,"x":2021,"y":7.025},{"LOCATION":"EU27_2020","Year":2022,"mean_unemployment":6.125,"x":2022,"y":6.125}],"type":"line"},{"name":"GRC","data":[{"LOCATION":"GRC","Year":1998,"mean_unemployment":11.11111111111111,"x":1998,"y":11.11111111111111},{"LOCATION":"GRC","Year":1999,"mean_unemployment":11.95,"x":1999,"y":11.95},{"LOCATION":"GRC","Year":2000,"mean_unemployment":11.225,"x":2000,"y":11.225},{"LOCATION":"GRC","Year":2001,"mean_unemployment":10.675,"x":2001,"y":10.675},{"LOCATION":"GRC","Year":2002,"mean_unemployment":10.30833333333333,"x":2002,"y":10.30833333333333},{"LOCATION":"GRC","Year":2003,"mean_unemployment":9.758333333333333,"x":2003,"y":9.758333333333333},{"LOCATION":"GRC","Year":2004,"mean_unemployment":10.59166666666667,"x":2004,"y":10.59166666666667},{"LOCATION":"GRC","Year":2005,"mean_unemployment":10.025,"x":2005,"y":10.025},{"LOCATION":"GRC","Year":2006,"mean_unemployment":9.008333333333333,"x":2006,"y":9.008333333333333},{"LOCATION":"GRC","Year":2007,"mean_unemployment":8.416666666666666,"x":2007,"y":8.416666666666666},{"LOCATION":"GRC","Year":2008,"mean_unemployment":7.8,"x":2008,"y":7.8},{"LOCATION":"GRC","Year":2009,"mean_unemployment":9.766666666666667,"x":2009,"y":9.766666666666667},{"LOCATION":"GRC","Year":2010,"mean_unemployment":12.91666666666667,"x":2010,"y":12.91666666666667},{"LOCATION":"GRC","Year":2011,"mean_unemployment":18.09166666666667,"x":2011,"y":18.09166666666667},{"LOCATION":"GRC","Year":2012,"mean_unemployment":24.825,"x":2012,"y":24.825},{"LOCATION":"GRC","Year":2013,"mean_unemployment":27.8,"x":2013,"y":27.8},{"LOCATION":"GRC","Year":2014,"mean_unemployment":26.625,"x":2014,"y":26.625},{"LOCATION":"GRC","Year":2015,"mean_unemployment":25.01666666666667,"x":2015,"y":25.01666666666667},{"LOCATION":"GRC","Year":2016,"mean_unemployment":23.875,"x":2016,"y":23.875},{"LOCATION":"GRC","Year":2017,"mean_unemployment":21.825,"x":2017,"y":21.825},{"LOCATION":"GRC","Year":2018,"mean_unemployment":19.75,"x":2018,"y":19.75},{"LOCATION":"GRC","Year":2019,"mean_unemployment":17.85833333333333,"x":2019,"y":17.85833333333333},{"LOCATION":"GRC","Year":2020,"mean_unemployment":17.59166666666667,"x":2020,"y":17.59166666666667},{"LOCATION":"GRC","Year":2021,"mean_unemployment":14.8,"x":2021,"y":14.8},{"LOCATION":"GRC","Year":2022,"mean_unemployment":12.7375,"x":2022,"y":12.7375}],"type":"line"},{"name":"OECD","data":[{"LOCATION":"OECD","Year":2001,"mean_unemployment":6.693926666666667,"x":2001,"y":6.693926666666667},{"LOCATION":"OECD","Year":2002,"mean_unemployment":7.217836,"x":2002,"y":7.217836},{"LOCATION":"OECD","Year":2003,"mean_unemployment":7.32901075,"x":2003,"y":7.32901075},{"LOCATION":"OECD","Year":2004,"mean_unemployment":7.186191916666667,"x":2004,"y":7.186191916666667},{"LOCATION":"OECD","Year":2005,"mean_unemployment":6.833244083333334,"x":2005,"y":6.833244083333334},{"LOCATION":"OECD","Year":2006,"mean_unemployment":6.323188416666667,"x":2006,"y":6.323188416666667},{"LOCATION":"OECD","Year":2007,"mean_unemployment":5.860239916666667,"x":2007,"y":5.860239916666667},{"LOCATION":"OECD","Year":2008,"mean_unemployment":6.19083425,"x":2008,"y":6.19083425},{"LOCATION":"OECD","Year":2009,"mean_unemployment":8.31856325,"x":2009,"y":8.31856325},{"LOCATION":"OECD","Year":2010,"mean_unemployment":8.5215555,"x":2010,"y":8.5215555},{"LOCATION":"OECD","Year":2011,"mean_unemployment":8.124760666666667,"x":2011,"y":8.124760666666667},{"LOCATION":"OECD","Year":2012,"mean_unemployment":8.104284083333333,"x":2012,"y":8.104284083333333},{"LOCATION":"OECD","Year":2013,"mean_unemployment":8.0130815,"x":2013,"y":8.0130815},{"LOCATION":"OECD","Year":2014,"mean_unemployment":7.447850083333333,"x":2014,"y":7.447850083333333},{"LOCATION":"OECD","Year":2015,"mean_unemployment":6.886819583333334,"x":2015,"y":6.886819583333334},{"LOCATION":"OECD","Year":2016,"mean_unemployment":6.468867666666666,"x":2016,"y":6.468867666666666},{"LOCATION":"OECD","Year":2017,"mean_unemployment":5.940258500000001,"x":2017,"y":5.940258500000001},{"LOCATION":"OECD","Year":2018,"mean_unemployment":5.498065583333333,"x":2018,"y":5.498065583333333},{"LOCATION":"OECD","Year":2019,"mean_unemployment":5.418292583333334,"x":2019,"y":5.418292583333334},{"LOCATION":"OECD","Year":2020,"mean_unemployment":7.169993916666667,"x":2020,"y":7.169993916666667},{"LOCATION":"OECD","Year":2021,"mean_unemployment":6.155706916666666,"x":2021,"y":6.155706916666666},{"LOCATION":"OECD","Year":2022,"mean_unemployment":5.01607775,"x":2022,"y":5.01607775}],"type":"line"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":["hc_opts.plotOptions.series.dataLabels.formatter"],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-2" class="tab-pane" aria-labelledby="tabset-1-2-tab">
<p>Here we can see a big improvement in comparison with original data. I have some concerns about points close to 150 (mildly upwards trend) and 250 (outlier).</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">LOCATION</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"GRC"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment_diff1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/diff.html">diff</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span>, differences <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Unemployment Rates"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Year"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Value"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>shared <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>, valueDecimals <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>, valueSuffix <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" %"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment_diff1</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-25d81bf864ba5a63caeb" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-25d81bf864ba5a63caeb">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"line"},"title":{"text":"Unemployment Rates"},"yAxis":{"title":{"text":"Value"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"title":{"text":"Year"}},"tooltip":{"shared":true,"valueDecimals":2,"valueSuffix":" %"},"series":[{"data":[0.09999999999999964,-0.09999999999999964,0.09999999999999964,0.1999999999999993,-0.09999999999999964,0,0.3000000000000007,0,0,0,0,0.6999999999999993,-0.09999999999999964,0,0,0.09999999999999964,-0.09999999999999964,0.3000000000000007,0.09999999999999964,-0.09999999999999964,-0.8000000000000007,0.09999999999999964,0,-0.09999999999999964,0,-0.09999999999999964,-0.09999999999999964,-0.1000000000000014,0,-0.5999999999999996,0.09999999999999964,-0.09999999999999964,-0.09999999999999964,0,0,0.1999999999999993,0,0,0,-0.09999999999999964,0,0.3000000000000007,0,-0.09999999999999964,-0.1000000000000014,0,0,-0.3999999999999986,0,0,0,-0.1000000000000014,0,-0.1999999999999993,0,0,-0.1999999999999993,-0.1000000000000014,0,0,0,0,0,0,0,0.2000000000000011,0,0,1.299999999999999,-0.5,0.2000000000000011,-0.4000000000000004,0.09999999999999964,0,0,-0.09999999999999964,0,-0.09999999999999964,-0.09999999999999964,0,-0.1000000000000014,-0.3999999999999986,0.3999999999999986,-0.2999999999999989,0,0.2999999999999989,0,0,0.1000000000000014,-0.2000000000000011,-0.5,0.09999999999999964,-0.3999999999999986,0.1999999999999993,-0.3000000000000007,-0.09999999999999964,0,0,-0.2999999999999989,0,0,-0.3000000000000007,0.4000000000000004,0.09999999999999964,-0.4000000000000004,0.2000000000000011,0,-0.4000000000000004,0.09999999999999964,-0.09999999999999964,-0.09999999999999964,0.1999999999999993,0,-0.3000000000000007,-0.2999999999999989,0.1999999999999993,-0.3999999999999995,0.09999999999999964,0.2999999999999998,-0.3999999999999995,-0.2999999999999998,0.1999999999999993,0,0.2000000000000002,0,-0.2000000000000002,0.4000000000000004,0.5,0.5,0.4000000000000004,-0.09999999999999964,0,0.09999999999999964,0.09999999999999964,0.3000000000000007,0,0.2999999999999989,0,0.5999999999999996,0.1000000000000014,0.2999999999999989,0.5999999999999996,0.1000000000000014,0.2999999999999989,0.4000000000000004,0.1999999999999993,0.4000000000000004,-0.09999999999999964,0.5999999999999996,0.7000000000000011,-0.1000000000000014,0.7000000000000011,0.5,0.1999999999999993,0.7999999999999989,0.3000000000000007,0.1999999999999993,0.5,0.7000000000000028,0.6999999999999993,0.3000000000000007,1.399999999999999,0.1999999999999993,0.8000000000000007,0.1000000000000014,0.7999999999999972,0.6000000000000014,0.5,0.6999999999999993,1,0.1999999999999993,0.6000000000000014,0.5,-0.3000000000000007,0.8000000000000007,-0.1000000000000014,0.4000000000000021,0,0.3000000000000007,0.3999999999999986,0,-0.1000000000000014,0.2000000000000028,-0.2000000000000028,0.2000000000000028,-0.4000000000000021,0.1999999999999993,-0.09999999999999787,-0.6000000000000014,0.4000000000000021,-0.4000000000000021,-0.09999999999999787,0.1999999999999993,-0.6000000000000014,-0.3999999999999986,0,-0.1000000000000014,-0.1999999999999993,-0.3000000000000007,0.1999999999999993,-0.09999999999999787,0.09999999999999787,0.2000000000000028,-0.7000000000000028,-0.6999999999999993,0.3000000000000007,0,-0.8000000000000007,0.6999999999999993,-0.09999999999999787,-0.6000000000000014,0,0.5,-0.5,0,-0.3000000000000007,0,-0.2999999999999972,0.1999999999999993,0.09999999999999787,-0.5999999999999979,0.3000000000000007,0.09999999999999787,0,-0.1999999999999993,-0.3999999999999986,-0.5,-0.5,0,-0.7000000000000028,-0.1999999999999993,-0.09999999999999787,0,0,0.2999999999999972,-0.1999999999999993,-0.3000000000000007,0.5,-0.7999999999999972,-0.5,-0.4000000000000021,-0.1999999999999993,-0.1999999999999993,0,-0.1999999999999993,-0.2000000000000028,0.3000000000000007,-0.1999999999999993,0.3999999999999986,-0.09999999999999787,-0.4000000000000021,-0.6999999999999993,-0.5999999999999979,-0.2000000000000028,0.2000000000000028,-0.2000000000000028,0,-0.2999999999999972,-0.1000000000000014,0,-0.5,-0.1000000000000014,0.6000000000000014,1.399999999999999,1.200000000000003,0.6999999999999993,-2.900000000000002,-0.3999999999999986,-0.1000000000000014,0.6000000000000014,-0.1999999999999993,-0.5,-0.4000000000000021,-0.4999999999999982,1.299999999999999,0,-1.6,-0.5999999999999996,-0.5999999999999996,-0.7000000000000011,-0.5999999999999996,0.2000000000000011,-0.4000000000000004,0,0.6999999999999993,-0.5,-0.2999999999999989,0,-0.1000000000000014,-0.2999999999999989,-0.09999999999999964,-0.1000000000000014]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-3" class="tab-pane" aria-labelledby="tabset-1-3-tab">
<p>Given the concerns of above, I made also a second difference plot. It seems to solve the problem on points close to 150.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/diff.html">diff</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span>, differences <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Unemployment Rates"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Year"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Value"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>shared <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>, valueDecimals <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>, valueSuffix <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" %"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment_diff2</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-3856792dd2a671be5400" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-3856792dd2a671be5400">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"line"},"title":{"text":"Unemployment Rates"},"yAxis":{"title":{"text":"Value"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"title":{"text":"Year"}},"tooltip":{"shared":true,"valueDecimals":2,"valueSuffix":" %"},"series":[{"data":[-0.1999999999999993,0.1999999999999993,0.09999999999999964,-0.2999999999999989,0.09999999999999964,0.3000000000000007,-0.3000000000000007,0,0,0,0.6999999999999993,-0.7999999999999989,0.09999999999999964,0,0.09999999999999964,-0.1999999999999993,0.4000000000000004,-0.2000000000000011,-0.1999999999999993,-0.7000000000000011,0.9000000000000004,-0.09999999999999964,-0.09999999999999964,0.09999999999999964,-0.09999999999999964,0,-1.77635683940025e-15,0.1000000000000014,-0.5999999999999996,0.6999999999999993,-0.1999999999999993,0,0.09999999999999964,0,0.1999999999999993,-0.1999999999999993,0,0,-0.09999999999999964,0.09999999999999964,0.3000000000000007,-0.3000000000000007,-0.09999999999999964,-1.77635683940025e-15,0.1000000000000014,0,-0.3999999999999986,0.3999999999999986,0,0,-0.1000000000000014,0.1000000000000014,-0.1999999999999993,0.1999999999999993,0,-0.1999999999999993,0.09999999999999787,0.1000000000000014,0,0,0,0,0,0,0.2000000000000011,-0.2000000000000011,0,1.299999999999999,-1.799999999999999,0.7000000000000011,-0.6000000000000014,0.5,-0.09999999999999964,0,-0.09999999999999964,0.09999999999999964,-0.09999999999999964,0,0.09999999999999964,-0.1000000000000014,-0.2999999999999972,0.7999999999999972,-0.6999999999999975,0.2999999999999989,0.2999999999999989,-0.2999999999999989,0,0.1000000000000014,-0.3000000000000025,-0.2999999999999989,0.5999999999999996,-0.4999999999999982,0.5999999999999979,-0.5,0.2000000000000011,0.09999999999999964,0,-0.2999999999999989,0.2999999999999989,0,-0.3000000000000007,0.7000000000000011,-0.3000000000000007,-0.5,0.6000000000000014,-0.2000000000000011,-0.4000000000000004,0.5,-0.1999999999999993,0,0.2999999999999989,-0.1999999999999993,-0.3000000000000007,1.77635683940025e-15,0.4999999999999982,-0.5999999999999988,0.4999999999999991,0.2000000000000002,-0.6999999999999993,0.09999999999999964,0.4999999999999991,-0.1999999999999993,0.2000000000000002,-0.2000000000000002,-0.2000000000000002,0.6000000000000005,0.09999999999999964,0,-0.09999999999999964,-0.5,0.09999999999999964,0.09999999999999964,0,0.2000000000000011,-0.3000000000000007,0.2999999999999989,-0.2999999999999989,0.5999999999999996,-0.4999999999999982,0.1999999999999975,0.3000000000000007,-0.4999999999999982,0.1999999999999975,0.1000000000000014,-0.2000000000000011,0.2000000000000011,-0.5,0.6999999999999993,0.1000000000000014,-0.8000000000000025,0.8000000000000025,-0.2000000000000011,-0.3000000000000007,0.5999999999999996,-0.4999999999999982,-0.1000000000000014,0.3000000000000007,0.2000000000000028,-3.552713678800501e-15,-0.3999999999999986,1.099999999999998,-1.199999999999999,0.6000000000000014,-0.6999999999999993,0.6999999999999957,-0.1999999999999957,-0.1000000000000014,0.1999999999999993,0.3000000000000007,-0.8000000000000007,0.4000000000000021,-0.1000000000000014,-0.8000000000000007,1.100000000000001,-0.9000000000000021,0.5000000000000036,-0.4000000000000021,0.3000000000000007,0.09999999999999787,-0.3999999999999986,-0.1000000000000014,0.3000000000000043,-0.4000000000000057,0.4000000000000057,-0.600000000000005,0.6000000000000014,-0.2999999999999972,-0.5000000000000036,1.000000000000004,-0.8000000000000043,0.3000000000000043,0.2999999999999972,-0.8000000000000007,0.2000000000000028,0.3999999999999986,-0.1000000000000014,-0.09999999999999787,-0.1000000000000014,0.5,-0.2999999999999972,0.1999999999999957,0.100000000000005,-0.9000000000000057,3.552713678800501e-15,1,-0.3000000000000007,-0.8000000000000007,1.5,-0.7999999999999972,-0.5000000000000036,0.6000000000000014,0.5,-1,0.5,-0.3000000000000007,0.3000000000000007,-0.2999999999999972,0.4999999999999964,-0.1000000000000014,-0.6999999999999957,0.8999999999999986,-0.2000000000000028,-0.09999999999999787,-0.1999999999999993,-0.1999999999999993,-0.1000000000000014,0,0.5,-0.7000000000000028,0.5000000000000036,0.1000000000000014,0.09999999999999787,0,0.2999999999999972,-0.4999999999999964,-0.1000000000000014,0.8000000000000007,-1.299999999999997,0.2999999999999972,0.09999999999999787,0.2000000000000028,0,0.1999999999999993,-0.1999999999999993,-3.552713678800501e-15,0.5000000000000036,-0.5,0.5999999999999979,-0.4999999999999964,-0.3000000000000043,-0.2999999999999972,0.1000000000000014,0.399999999999995,0.4000000000000057,-0.4000000000000057,0.2000000000000028,-0.2999999999999972,0.1999999999999957,0.1000000000000014,-0.5,0.3999999999999986,0.7000000000000028,0.7999999999999972,-0.1999999999999957,-0.5000000000000036,-3.600000000000001,2.500000000000004,0.2999999999999972,0.7000000000000028,-0.8000000000000007,-0.3000000000000007,0.09999999999999787,-0.09999999999999609,1.799999999999997,-1.299999999999999,-1.6,1,0,-0.1000000000000014,0.1000000000000014,0.8000000000000007,-0.6000000000000014,0.4000000000000004,0.6999999999999993,-1.199999999999999,0.2000000000000011,0.2999999999999989,-0.1000000000000014,-0.1999999999999975,0.1999999999999993,-1.77635683940025e-15]}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
</div>
</div>
</section><section id="examine-stationarity-with-statistical-tests" class="level3"><h3 class="anchored" data-anchor-id="examine-stationarity-with-statistical-tests">Examine Stationarity with Statistical tests</h3>
<p>The graphical interpretation of stationarity can be beneficial for a quick assessment on topic of stationarity. However it can be considered a subjective metric, which leads on a non consistent decision (someone may consider the second figure as stationary and some others not.</p>
<p>Thankfully, there are some statistical tests which can help us on our decisions. Some commonly used are :</p>
<ul>
<li>
<strong>Augmented Dickey-Fuller</strong> (ADF) test</li>
<li>
<strong>Phillips- Perron</strong> (PP) test</li>
<li>
<strong>Kwiatkowski-Phillips-Schmidt-Shin</strong> (KPSS) test</li>
<li>
<strong>Zivot-Andrews</strong> (ZA) test</li>
</ul>
<p>But an other problem arises. We are not in a fancy IDE with menus and checkboxes. We use R and its packages. There are many packages that have already write functions to study stationarity with the aforementioned tests. Some of them are:</p>
<ul>
<li>tseries</li>
<li>urca</li>
<li>CADFtest</li>
</ul>
<p>We should carefully evaluate our choices, as these packages advertise similar functionality but differ significantly in the scope of their functions and, more importantly, in the level of flexibility they offer for handling time series characteristics. In short, the <code>tseries</code> package is the one I’m most familiar with, but it is also the most limited in terms of configurable parameters. Although many tutorials use this package, I found that I couldn’t set the number of lags for tests or specify characteristics like trends when applicable. On the other hand, the <code>urca</code> package addresses these limitations by allowing users to specify both the trend component and the number of lags in the respective tests. One minor drawback of urca, however, is that it only provides critical values, not p-values.</p>
<section id="summary" class="level4"><h4 class="anchored" data-anchor-id="summary">Summary</h4>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb19" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">summary_stationarity_results</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>                             <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Type"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"levels"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Diff(GRC)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Diff2(GRC)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                             <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ADF test"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Non Stationary"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stationary"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stationary"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                              <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PP test"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Non Stationary"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stationary"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stationary"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                             <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KPSS test"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Non Stationary"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Non Stationary"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Stationary"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">summary_stationarity_results</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th">Type</th>
<th style="text-align: left;" data-quarto-table-cell-role="th">ADF.test</th>
<th style="text-align: left;" data-quarto-table-cell-role="th">PP.test</th>
<th style="text-align: left;" data-quarto-table-cell-role="th">KPSS.test</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">levels</td>
<td style="text-align: left;">Non Stationary</td>
<td style="text-align: left;">Non Stationary</td>
<td style="text-align: left;">Non Stationary</td>
</tr>
<tr class="even">
<td style="text-align: left;">Diff(GRC)</td>
<td style="text-align: left;">Stationary</td>
<td style="text-align: left;">Stationary</td>
<td style="text-align: left;">Non Stationary</td>
</tr>
<tr class="odd">
<td style="text-align: left;">Diff2(GRC)</td>
<td style="text-align: left;">Stationary</td>
<td style="text-align: left;">Stationary</td>
<td style="text-align: left;">Stationary</td>
</tr>
</tbody>
</table>
</div>
</div>
</section><section id="adf-test" class="level4"><h4 class="anchored" data-anchor-id="adf-test">ADF test</h4>
<p>One of the most</p>
<p><img src="https://latex.codecogs.com/png.latex?%0AH_0%20:%20%5Ctext%7BThe%20time%20series%20has%20a%20unit%20root%7D%20%5C%5C%0AH_1%20:%20%5Ctext%7BThe%20time%20series%20has%20not%20a%20unit%20root%7D%0A"> Selecting the lags</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://www.pfaffikus.de">vars</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stderr">
<pre><code>Loading required package: MASS</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>
Attaching package: 'MASS'</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>The following object is masked from 'package:dplyr':

    select</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>Loading required package: strucchange</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>Loading required package: zoo</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>
Attaching package: 'zoo'</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>The following objects are masked from 'package:base':

    as.Date, as.Date.numeric</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>Loading required package: sandwich</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>Loading required package: urca</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>Loading required package: lmtest</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>
Attaching package: 'lmtest'</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>The following object is masked _by_ '.GlobalEnv':

    unemployment</code></pre>
</div>
<div class="cell-output cell-output-stderr">
<pre><code>The following object is masked from 'package:highcharter':

    unemployment</code></pre>
</div>
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb34" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">G</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/vars/man/VARselect.html">VARselect</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span>, lag.max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span>, type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"const"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb35" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">get_adf_results</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span></span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Ensure variable is numeric (e.g., a time series or numeric vector)</span></span>
<span>    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/numeric.html">is.numeric</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/stop.html">stop</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Input variable must be numeric."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span>    </span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Perform ADF tests</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_orig</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/tseries/man/adf.test.html">adf.test</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_diff1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/tseries/man/adf.test.html">adf.test</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/diff.html">diff</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span>, differences <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_diff2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/tseries/man/adf.test.html">adf.test</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/diff.html">diff</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span>, differences <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    </span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Extract results</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_table</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Transformation"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Level"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1st Difference"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"2nd Difference"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dickey-Fuller"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_orig</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistic</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dickey-Fuller"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_diff1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistic</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dickey-Fuller"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistic</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dickey-Fuller"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lag Order"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_orig</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parameter</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lag order"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_diff1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parameter</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lag order"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parameter</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lag order"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"p-value"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_orig</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p.value</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_diff1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p.value</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p.value</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    </span>
<span>    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/function.html">return</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">adf_table</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</details>
</div>
<div class="cell" data-tbl-cap="Augmented Dickey-Fuller test results">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb36" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">get_adf_results</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<caption>Augmented Dickey-Fuller test results</caption>
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th">Transformation</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">Dickey.Fuller</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">Lag.Order</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">p.value</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">Level</td>
<td style="text-align: right;">-0.93123</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">0.94846</td>
</tr>
<tr class="even">
<td style="text-align: left;">1st Difference</td>
<td style="text-align: right;">-3.50738</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">0.04240</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2nd Difference</td>
<td style="text-align: right;">-9.48682</td>
<td style="text-align: right;">6</td>
<td style="text-align: right;">0.01000</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>Συνεπώς, είναι προφανές από τα αποτελέσματα του στατιστικού ελέγχου Dickey Fuller ότι η χρονοσειρά μου δεν είναι στάσιμη. Θα πρέπει να εφαρμόσω τον έλεγχο Dickey-Fuller στις δοαφορές.</p>
</section><section id="pp-test" class="level4"><h4 class="anchored" data-anchor-id="pp-test">PP test</h4>
<p><img src="https://latex.codecogs.com/png.latex?%0AH_0%20:%20%5Ctext%7BThe%20time%20series%20has%20a%20unit%20root%7D%20%5C%5C%0AH_1%20:%20%5Ctext%7BThe%20time%20series%20has%20not%20a%20unit%20root%7D%0A"></p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb37" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">get_pp_results</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span></span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Ensure variable is numeric (e.g., a time series or numeric vector)</span></span>
<span>    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/numeric.html">is.numeric</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/stop.html">stop</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Input variable must be numeric."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span>    </span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Perform ADF tests</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_orig</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/tseries/man/pp.test.html">pp.test</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_diff1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/tseries/man/pp.test.html">pp.test</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/diff.html">diff</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span>, differences <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_diff2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/tseries/man/pp.test.html">pp.test</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/diff.html">diff</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span>, differences <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    </span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Extract results</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_table</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Transformation"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Level"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1st Difference"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"2nd Difference"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Phillips-Perron"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_orig</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistic</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dickey-Fuller Z(alpha)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_diff1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistic</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dickey-Fuller Z(alpha)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">statistic</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dickey-Fuller Z(alpha)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lag Order"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_orig</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Truncation lag parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_diff1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Truncation lag parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Truncation lag parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"p-value"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_orig</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p.value</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_diff1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p.value</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p.value</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    </span>
<span>    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/function.html">return</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_table</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</details>
</div>
<div class="cell" data-tbl-cap="Phillips-Perron test results">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb38" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">get_pp_results</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<caption>Phillips-Perron test results</caption>
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th">Transformation</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">Phillips.Perron</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">Lag.Order</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">p.value</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">Level</td>
<td style="text-align: right;">0.19401</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">0.99</td>
</tr>
<tr class="even">
<td style="text-align: left;">1st Difference</td>
<td style="text-align: right;">-279.81456</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">0.01</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2nd Difference</td>
<td style="text-align: right;">-337.13053</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">0.01</td>
</tr>
</tbody>
</table>
</div>
</div>
</section><section id="kpss-test" class="level4"><h4 class="anchored" data-anchor-id="kpss-test">KPSS test</h4>
<p><img src="https://latex.codecogs.com/png.latex?%0AH_0%20:%20%5Ctext%7BThe%20time%20series%20has%20not%20a%20unit%20root%7D%20%5C%5C%0AH_1%20:%20%5Ctext%7BAlternatively%7D%0A"></p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb39" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">get_kpss_results</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span></span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Ensure variable is numeric (e.g., a time series or numeric vector)</span></span>
<span>    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">!</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/numeric.html">is.numeric</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/stop.html">stop</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Input variable must be numeric."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span>    </span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Perform ADF tests</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_orig</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/tseries/man/kpss.test.html">kpss.test</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_diff1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/tseries/man/kpss.test.html">kpss.test</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/diff.html">diff</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span>, differences <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_diff2</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/tseries/man/kpss.test.html">kpss.test</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/diff.html">diff</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">variable</span>, differences <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    </span>
<span>    <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Extract results</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_table</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Transformation"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Level"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1st Difference"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"2nd Difference"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KPSS"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_orig</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"statistic"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KPSS Level"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_diff1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"statistic"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KPSS Level"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"statistic"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KPSS Level"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lag Order"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_orig</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Truncation lag parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_diff1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Truncation lag parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[[</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Truncation lag parameter"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"p-value"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_orig</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p.value</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_diff1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p.value</span>,</span>
<span>            <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kpss_diff2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p.value</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>digits <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>full_width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    </span>
<span>    <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/function.html">return</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pp_table</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</details>
</div>
<div class="cell" data-tbl-cap="KPSS test results">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb40" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">get_kpss_results</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<caption>KPSS test results</caption>
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th">Transformation</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">KPSS</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">Lag.Order</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">p.value</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">Level</td>
<td style="text-align: right;">2.53719</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">0.01000</td>
</tr>
<tr class="even">
<td style="text-align: left;">1st Difference</td>
<td style="text-align: right;">0.59510</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">0.02308</td>
</tr>
<tr class="odd">
<td style="text-align: left;">2nd Difference</td>
<td style="text-align: right;">0.01426</td>
<td style="text-align: right;">5</td>
<td style="text-align: right;">0.10000</td>
</tr>
</tbody>
</table>
</div>
</div>
</section></section></section><section id="identify-model" class="level2"><h2 class="anchored" data-anchor-id="identify-model">Identify Model</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-2-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-1" aria-controls="tabset-2-1" aria-selected="true" href="">Levels</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-2" aria-controls="tabset-2-2" aria-selected="false" href="">First Diff.</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-3" aria-controls="tabset-2-3" aria-selected="false" href="">Second Diff.</a></li>
</ul>
<div class="tab-content">
<div id="tabset-2-1" class="tab-pane active" aria-labelledby="tabset-2-1-tab">
<div class="grid">
<div class="g-col-12 g-col-md-6">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb41" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">acf_plot_function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span>, min<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.2</span>, max<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-241356e50f688d31686e" style="width:100%;height:371px;"></div>
<script type="application/json" data-for="htmlwidget-241356e50f688d31686e">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Autocorrelation Plot"},"yAxis":{"title":{"text":"ACF"},"min":-0.2,"max":1,"plotLines":[{"value":0,"color":"#000000","width":3},{"value":0.06823718723726442,"color":"#FF0000","dashStyle":"ShortDash","width":1},{"value":-0.06823718723726442,"color":"#FF0000","dashStyle":"ShortDash","width":1}]},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"title":{"text":"Lag"}},"legend":{"enabled":false},"series":[{"data":[0.9971,0.9936,0.9898,0.9856,0.9811,0.9762,0.9706,0.9645,0.9586,0.9523,0.9451000000000001,0.9377,0.9298999999999999,0.9217,0.9132,0.9044,0.8949,0.8852,0.8758,0.866],"name":"ACF"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div class="g-col-12 g-col-md-6">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb42" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">pacf_plot_function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span>, min<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.2</span>, max<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-cfe0c65c95349f23099a" style="width:100%;height:371px;"></div>
<script type="application/json" data-for="htmlwidget-cfe0c65c95349f23099a">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Partial Autocorrelation Plot"},"yAxis":{"title":{"text":"PACF"},"min":-0.2,"max":1,"plotLines":[{"value":0,"color":"#000000","width":3},{"value":0.06823718723726442,"color":"#FF0000","dashStyle":"ShortDash","width":1},{"value":-0.06823718723726442,"color":"#FF0000","dashStyle":"ShortDash","width":1}]},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"title":{"text":"Lag"}},"legend":{"enabled":false},"series":[{"data":[0.9971,-0.09329999999999999,-0.0459,-0.0693,-0.0357,-0.0572,-0.1036,-0.0566,0.0484,-0.06569999999999999,-0.1156,-0.0223,-0.0252,-0.058,-0.0212,-0.0319,-0.0702,-0.0105,0.0688,-0.0349],"name":"PACF"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
</div>
</div>
<div id="tabset-2-2" class="tab-pane" aria-labelledby="tabset-2-2-tab">
<div class="grid">
<div class="g-col-12 g-col-md-6">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb43" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">acf_plot_function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment_diff1</span>, min<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.1</span>, max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-f94c968e7eeb5502f38a" style="width:100%;height:371px;"></div>
<script type="application/json" data-for="htmlwidget-f94c968e7eeb5502f38a">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Autocorrelation Plot"},"yAxis":{"title":{"text":"ACF"},"min":-0.1,"max":0.6,"plotLines":[{"value":0,"color":"#000000","width":3},{"value":0.1146982166068335,"color":"#FF0000","dashStyle":"ShortDash","width":1},{"value":-0.1146982166068335,"color":"#FF0000","dashStyle":"ShortDash","width":1}]},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"title":{"text":"Lag"}},"legend":{"enabled":false},"series":[{"data":[0.1722,0.1176,0.1454,0.1222,0.1915,0.2844,0.1785,0.0034,0.2232,0.3382,0.1804,0.0949,0.1649,0.0822,0.1369,0.1525,0.1066,0.0272,0.1276,0.1529],"name":"ACF"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div class="g-col-12 g-col-md-6">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb44" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">pacf_plot_function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment_diff1</span>, min<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.2</span>, max<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-5333c60314f3958da9ae" style="width:100%;height:371px;"></div>
<script type="application/json" data-for="htmlwidget-5333c60314f3958da9ae">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Partial Autocorrelation Plot"},"yAxis":{"title":{"text":"PACF"},"min":-0.2,"max":0.5,"plotLines":[{"value":0,"color":"#000000","width":3},{"value":0.1146982166068335,"color":"#FF0000","dashStyle":"ShortDash","width":1},{"value":-0.1146982166068335,"color":"#FF0000","dashStyle":"ShortDash","width":1}]},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"title":{"text":"Lag"}},"legend":{"enabled":false},"series":[{"data":[0.1722,0.0906,0.1158,0.0764,0.1478,0.2254,0.0872,-0.1071,0.1657,0.2714,0.0476,-0.08699999999999999,0.0767,0.0267,-0.0249,-0.0944,0.0128,-0.012,-0.0205,-0.0306],"name":"PACF"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
</div>
</div>
<div id="tabset-2-3" class="tab-pane" aria-labelledby="tabset-2-3-tab">
<div class="grid">
<div class="g-col-12 g-col-md-6">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb45" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">acf_plot_function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment_diff2</span>, min<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>, max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-1083f3b6feccdf137190" style="width:100%;height:371px;"></div>
<script type="application/json" data-for="htmlwidget-1083f3b6feccdf137190">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Autocorrelation Plot"},"yAxis":{"title":{"text":"ACF"},"min":-0.5,"max":0.5,"plotLines":[{"value":0,"color":"#000000","width":3},{"value":0.1148951235614152,"color":"#FF0000","dashStyle":"ShortDash","width":1},{"value":-0.1148951235614152,"color":"#FF0000","dashStyle":"ShortDash","width":1}]},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"title":{"text":"Lag"}},"legend":{"enabled":false},"series":[{"data":[-0.4669,-0.0503,0.031,-0.0554,-0.0147,0.1195,0.0436,-0.2395,0.0629,0.1655,-0.0454,-0.09320000000000001,0.09229999999999999,-0.083,0.0223,0.0393,0.0214,-0.1106,0.0457,0.0543],"name":"ACF"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div class="g-col-12 g-col-md-6">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb46" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">pacf_plot_function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment_diff2</span>, min<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>, max <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-919d16276ab8075c3f67" style="width:100%;height:371px;"></div>
<script type="application/json" data-for="htmlwidget-919d16276ab8075c3f67">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"column"},"title":{"text":"Partial Autocorrelation Plot"},"yAxis":{"title":{"text":"PACF"},"min":-0.5,"max":0.5,"plotLines":[{"value":0,"color":"#000000","width":3},{"value":0.1148951235614152,"color":"#FF0000","dashStyle":"ShortDash","width":1},{"value":-0.1148951235614152,"color":"#FF0000","dashStyle":"ShortDash","width":1}]},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"categories":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"title":{"text":"Lag"}},"legend":{"enabled":false},"series":[{"data":[-0.4669,-0.3431,-0.233,-0.2558,-0.2926,-0.1363,0.0614,-0.2061,-0.2965,-0.066,0.0655,-0.0978,-0.0471,0.003,0.0684,-0.0374,-0.008500000000000001,-0.0014,0.0076,-0.0299],"name":"PACF"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="build-time-series-model" class="level2"><h2 class="anchored" data-anchor-id="build-time-series-model">Build Time Series Model</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-3-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-1" aria-controls="tabset-3-1" aria-selected="true" href="">Automated model</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-2" aria-controls="tabset-3-2" aria-selected="false" href="">ARIMA candidate 1</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-3" aria-controls="tabset-3-3" aria-selected="false" href="">ARIMA candidate 2</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-4" aria-controls="tabset-3-4" aria-selected="false" href="">ARIMA candidate 3</a></li>
</ul>
<div class="tab-content">
<div id="tabset-3-1" class="tab-pane active" aria-labelledby="tabset-3-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb47" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">auto_model</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://pkg.robjhyndman.com/forecast/reference/auto.arima.html">auto.arima</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span>, trace <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,seasonal <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stdout">
<pre><code>
 Fitting models using approximations to speed things up...

 ARIMA(2,2,2)                    : 302.1399
 ARIMA(0,2,0)                    : 473.9345
 ARIMA(1,2,0)                    : 405.2316
 ARIMA(0,2,1)                    : 297.5442
 ARIMA(1,2,1)                    : 301.0253
 ARIMA(0,2,2)                    : 299.5392
 ARIMA(1,2,2)                    : 302.154

 Now re-fitting the best model(s) without approximations...

 ARIMA(0,2,1)                    : 296.71

 Best model: ARIMA(0,2,1)                    </code></pre>
</div>
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb49" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">auto_model</span> </span></code></pre></div></div>
</details><div class="cell-output cell-output-stdout">
<pre><code>Series: grc_unemployment$Value 
ARIMA(0,2,1) 

Coefficients:
          ma1
      -0.9075
s.e.   0.0229

sigma^2 = 0.1597:  log likelihood = -146.33
AIC=296.67   AICc=296.71   BIC=304.02</code></pre>
</div>
</div>
</div>
<div id="tabset-3-2" class="tab-pane" aria-labelledby="tabset-3-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb51" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/arima.html">arima</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span>, order<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_1</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stdout">
<pre><code>
Call:
arima(x = grc_unemployment$Value, order = c(0, 1, 2))

Coefficients:
         ma1     ma2
      0.1445  0.0760
s.e.  0.0588  0.0571

sigma^2 estimated as 0.1714:  log likelihood = -156.83,  aic = 319.67</code></pre>
</div>
</div>
</div>
<div id="tabset-3-3" class="tab-pane" aria-labelledby="tabset-3-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb53" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/arima.html">arima</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span>, order<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_2</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stdout">
<pre><code>
Call:
arima(x = grc_unemployment$Value, order = c(1, 1, 2))

Coefficients:
         ar1      ma1     ma2
      0.9710  -0.9048  0.0168
s.e.  0.0185   0.0666  0.0629

sigma^2 estimated as 0.1569:  log likelihood = -144.19,  aic = 296.37</code></pre>
</div>
</div>
</div>
<div id="tabset-3-4" class="tab-pane" aria-labelledby="tabset-3-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb55" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/arima.html">arima</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span>, order<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">9</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_3</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stdout">
<pre><code>
Call:
arima(x = grc_unemployment$Value, order = c(9, 2, 1))

Coefficients:
          ar1      ar2      ar3      ar4      ar5      ar6      ar7      ar8
      -0.7879  -0.7083  -0.6715  -0.6944  -0.5922  -0.3838  -0.3160  -0.4457
s.e.   0.1713   0.1539   0.1493   0.1434   0.1379   0.1172   0.0883   0.0718
          ar9      ma1
      -0.2704  -0.1456
s.e.   0.0690   0.1767

sigma^2 estimated as 0.1388:  log likelihood = -126.92,  aic = 275.83</code></pre>
</div>
</div>
</div>
</div>
</div>
</section><section id="compare-models" class="level2"><h2 class="anchored" data-anchor-id="compare-models">Compare Models</h2>
<p>After building some ARIMA models, I should decide which is the best one to make my estimations. One metric to evaluate those models is <strong>AIC</strong> (Akaike Information Criterion). The lower the value of AIC, the better my model.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb57" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">accuracy_table</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>                             <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Name of Model"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Auto Model"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ARIMA Candidate #1"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ARIMA Candidate #2"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ARIMA Candidate #3"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                             Model <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ARIMA(0,2,1)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ARIMA(0,1,2)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ARIMA(1,1,2)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ARIMA(9,2,1)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                             AIC <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">auto_model</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">aic</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">aic</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">aic</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">aic</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">accuracy_table</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_styling.html">kable_styling</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<table class="table caption-top table-sm table-striped small">
<thead><tr class="header">
<th style="text-align: left;" data-quarto-table-cell-role="th">Name.of.Model</th>
<th style="text-align: left;" data-quarto-table-cell-role="th">Model</th>
<th style="text-align: right;" data-quarto-table-cell-role="th">AIC</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">Auto Model</td>
<td style="text-align: left;">ARIMA(0,2,1)</td>
<td style="text-align: right;">296.6684</td>
</tr>
<tr class="even">
<td style="text-align: left;">ARIMA Candidate #1</td>
<td style="text-align: left;">ARIMA(0,1,2)</td>
<td style="text-align: right;">319.6669</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ARIMA Candidate #2</td>
<td style="text-align: left;">ARIMA(1,1,2)</td>
<td style="text-align: right;">296.3705</td>
</tr>
<tr class="even">
<td style="text-align: left;">ARIMA Candidate #3</td>
<td style="text-align: left;">ARIMA(9,2,1)</td>
<td style="text-align: right;">275.8314</td>
</tr>
</tbody>
</table>
</div>
</div>
<p>So, the best model is the Auto Model (ARIMA(9,2,1)), which has the lowest AIC value.</p>
</section><section id="checking-best-models" class="level2"><h2 class="anchored" data-anchor-id="checking-best-models">Checking best models</h2>
</section><section id="forecast-future-unemployment" class="level2"><h2 class="anchored" data-anchor-id="forecast-future-unemployment">Forecast Future Unemployment</h2>
<p>Previously, I identify which is the best model. Now, I will use this model in order to predict unemployment for the next 6 months. It should be recalled that the last available value was from August of 2022 (12.2%). Therefore, I will make a prediction for unemployment in Greece until February 2023.</p>
<section id="arima-021-forecasts" class="level3"><h3 class="anchored" data-anchor-id="arima-021-forecasts">ARIMA (0,2,1) forecasts</h3>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb58" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://generics.r-lib.org/reference/forecast.html">forecast</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">auto_model</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">month</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/seq.html">seq</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Extremes.html">max</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://lubridate.tidyverse.org/reference/mplus.html">%m+%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/weekday.POSIXt.html">months</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># start at next month</span></span>
<span>              by <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1 month"</span>,</span>
<span>              length.out <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Prediction of Unemployment with ARIMA(0,2,1)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"datetime"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Unemployment (%)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Historic Data"</span>,</span>
<span>    data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/list_parse.html">list_parse2</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/datetime_to_timestamp.html">datetime_to_timestamp</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Forecast"</span>,</span>
<span>                  data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/list_parse.html">list_parse2</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>                      x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/datetime_to_timestamp.html">datetime_to_timestamp</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">month</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                      y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">mean</span>, digits<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>                  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                  type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span>,</span>
<span>                  color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#d62728"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Confidence Interval"</span>,</span>
<span>                data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/list_parse.html">list_parse2</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>                  x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/datetime_to_timestamp.html">datetime_to_timestamp</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">month</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                  low <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lower</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"80%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, digits<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                  high <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">upper</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"80%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, digits<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>                <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"arearange"</span>,</span>
<span>                color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hex_to_rgba.html">hex_to_rgba</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#d62728"</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                linkedTo <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">":previous"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stderr">
<pre><code>Warning: `unite_()` was deprecated in tidyr 1.2.0.
ℹ Please use `unite()` instead.
ℹ The deprecated feature was likely used in the highcharter package.
  Please report the issue at &lt;https://github.com/jbkunst/highcharter/issues&gt;.</code></pre>
</div>
<div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-0187d9c236108e9927b8" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-0187d9c236108e9927b8">{"x":{"hc_opts":{"chart":{"reflow":true},"title":{"text":"Prediction of Unemployment with ARIMA(0,2,1)"},"yAxis":{"title":{"text":"Unemployment (%)"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"type":"datetime"},"series":[{"name":"Historic Data","data":[[891388800000,10.9],[893980800000,11],[896659200000,10.9],[899251200000,11],[901929600000,11.2],[904608000000,11.1],[907200000000,11.1],[909878400000,11.4],[912470400000,11.4],[915148800000,11.4],[917827200000,11.4],[920246400000,11.4],[922924800000,12.1],[925516800000,12],[928195200000,12],[930787200000,12],[933465600000,12.1],[936144000000,12],[938736000000,12.3],[941414400000,12.4],[944006400000,12.3],[946684800000,11.5],[949363200000,11.6],[951868800000,11.6],[954547200000,11.5],[957139200000,11.5],[959817600000,11.4],[962409600000,11.3],[965088000000,11.2],[967766400000,11.2],[970358400000,10.6],[973036800000,10.7],[975628800000,10.6],[978307200000,10.5],[980985600000,10.5],[983404800000,10.5],[986083200000,10.7],[988675200000,10.7],[991353600000,10.7],[993945600000,10.7],[996624000000,10.6],[999302400000,10.6],[1001894400000,10.9],[1004572800000,10.9],[1007164800000,10.8],[1009843200000,10.7],[1012521600000,10.7],[1014940800000,10.7],[1017619200000,10.3],[1020211200000,10.3],[1022889600000,10.3],[1025481600000,10.3],[1028160000000,10.2],[1030838400000,10.2],[1033430400000,10],[1036108800000,10],[1038700800000,10],[1041379200000,9.800000000000001],[1044057600000,9.699999999999999],[1046476800000,9.699999999999999],[1049155200000,9.699999999999999],[1051747200000,9.699999999999999],[1054425600000,9.699999999999999],[1057017600000,9.699999999999999],[1059696000000,9.699999999999999],[1062374400000,9.699999999999999],[1064966400000,9.9],[1067644800000,9.9],[1070236800000,9.9],[1072915200000,11.2],[1075593600000,10.7],[1078099200000,10.9],[1080777600000,10.5],[1083369600000,10.6],[1086048000000,10.6],[1088640000000,10.6],[1091318400000,10.5],[1093996800000,10.5],[1096588800000,10.4],[1099267200000,10.3],[1101859200000,10.3],[1104537600000,10.2],[1107216000000,9.800000000000001],[1109635200000,10.2],[1112313600000,9.9],[1114905600000,9.9],[1117584000000,10.2],[1120176000000,10.2],[1122854400000,10.2],[1125532800000,10.3],[1128124800000,10.1],[1130803200000,9.6],[1133395200000,9.699999999999999],[1136073600000,9.300000000000001],[1138752000000,9.5],[1141171200000,9.199999999999999],[1143849600000,9.1],[1146441600000,9.1],[1149120000000,9.1],[1151712000000,8.800000000000001],[1154390400000,8.800000000000001],[1157068800000,8.800000000000001],[1159660800000,8.5],[1162339200000,8.9],[1164931200000,9],[1167609600000,8.6],[1170288000000,8.800000000000001],[1172707200000,8.800000000000001],[1175385600000,8.4],[1177977600000,8.5],[1180656000000,8.4],[1183248000000,8.300000000000001],[1185926400000,8.5],[1188604800000,8.5],[1191196800000,8.199999999999999],[1193875200000,7.9],[1196467200000,8.1],[1199145600000,7.7],[1201824000000,7.8],[1204329600000,8.1],[1207008000000,7.7],[1209600000000,7.4],[1212278400000,7.6],[1214870400000,7.6],[1217548800000,7.8],[1220227200000,7.8],[1222819200000,7.6],[1225497600000,8],[1228089600000,8.5],[1230768000000,9],[1233446400000,9.4],[1235865600000,9.300000000000001],[1238544000000,9.300000000000001],[1241136000000,9.4],[1243814400000,9.5],[1246406400000,9.800000000000001],[1249084800000,9.800000000000001],[1251763200000,10.1],[1254355200000,10.1],[1257033600000,10.7],[1259625600000,10.8],[1262304000000,11.1],[1264982400000,11.7],[1267401600000,11.8],[1270080000000,12.1],[1272672000000,12.5],[1275350400000,12.7],[1277942400000,13.1],[1280620800000,13],[1283299200000,13.6],[1285891200000,14.3],[1288569600000,14.2],[1291161600000,14.9],[1293840000000,15.4],[1296518400000,15.6],[1298937600000,16.4],[1301616000000,16.7],[1304208000000,16.9],[1306886400000,17.4],[1309478400000,18.1],[1312156800000,18.8],[1314835200000,19.1],[1317427200000,20.5],[1320105600000,20.7],[1322697600000,21.5],[1325376000000,21.6],[1328054400000,22.4],[1330560000000,23],[1333238400000,23.5],[1335830400000,24.2],[1338508800000,25.2],[1341100800000,25.4],[1343779200000,26],[1346457600000,26.5],[1349049600000,26.2],[1351728000000,27],[1354320000000,26.9],[1356998400000,27.3],[1359676800000,27.3],[1362096000000,27.6],[1364774400000,28],[1367366400000,28],[1370044800000,27.9],[1372636800000,28.1],[1375315200000,27.9],[1377993600000,28.1],[1380585600000,27.7],[1383264000000,27.9],[1385856000000,27.8],[1388534400000,27.2],[1391212800000,27.6],[1393632000000,27.2],[1396310400000,27.1],[1398902400000,27.3],[1401580800000,26.7],[1404172800000,26.3],[1406851200000,26.3],[1409529600000,26.2],[1412121600000,26],[1414800000000,25.7],[1417392000000,25.9],[1420070400000,25.8],[1422748800000,25.9],[1425168000000,26.1],[1427846400000,25.4],[1430438400000,24.7],[1433116800000,25],[1435708800000,25],[1438387200000,24.2],[1441065600000,24.9],[1443657600000,24.8],[1446336000000,24.2],[1448928000000,24.2],[1451606400000,24.7],[1454284800000,24.2],[1456790400000,24.2],[1459468800000,23.9],[1462060800000,23.9],[1464739200000,23.6],[1467331200000,23.8],[1470009600000,23.9],[1472688000000,23.3],[1475280000000,23.6],[1477958400000,23.7],[1480550400000,23.7],[1483228800000,23.5],[1485907200000,23.1],[1488326400000,22.6],[1491004800000,22.1],[1493596800000,22.1],[1496275200000,21.4],[1498867200000,21.2],[1501545600000,21.1],[1504224000000,21.1],[1506816000000,21.1],[1509494400000,21.4],[1512086400000,21.2],[1514764800000,20.9],[1517443200000,21.4],[1519862400000,20.6],[1522540800000,20.1],[1525132800000,19.7],[1527811200000,19.5],[1530403200000,19.3],[1533081600000,19.3],[1535760000000,19.1],[1538352000000,18.9],[1541030400000,19.2],[1543622400000,19],[1546300800000,19.4],[1548979200000,19.3],[1551398400000,18.9],[1554076800000,18.2],[1556668800000,17.6],[1559347200000,17.4],[1561939200000,17.6],[1564617600000,17.4],[1567296000000,17.4],[1569888000000,17.1],[1572566400000,17],[1575158400000,17],[1577836800000,16.5],[1580515200000,16.4],[1583020800000,17],[1585699200000,18.4],[1588291200000,19.6],[1590969600000,20.3],[1593561600000,17.4],[1596240000000,17],[1598918400000,16.9],[1601510400000,17.5],[1604188800000,17.3],[1606780800000,16.8],[1609459200000,16.4],[1612137600000,15.9],[1614556800000,17.2],[1617235200000,17.2],[1619827200000,15.6],[1622505600000,15],[1625097600000,14.4],[1627776000000,13.7],[1630454400000,13.1],[1633046400000,13.3],[1635724800000,12.9],[1638316800000,12.9],[1640995200000,13.6],[1643673600000,13.1],[1646092800000,12.8],[1648771200000,12.8],[1651363200000,12.7],[1654041600000,12.4],[1656633600000,12.3],[1659312000000,12.2]],"type":"line"},{"name":"Forecast","data":[[1661990400000,12.02],[1664582400000,11.85],[1667260800000,11.67],[1669852800000,11.5],[1672531200000,11.32],[1675209600000,11.15],[1677628800000,10.97],[1680307200000,10.79],[1682899200000,10.62],[1685577600000,10.44],[1688169600000,10.27],[1690848000000,10.09],[1693526400000,9.91],[1696118400000,9.74],[1698796800000,9.56],[1701388800000,9.390000000000001],[1704067200000,9.210000000000001],[1706745600000,9.039999999999999],[1709251200000,8.859999999999999],[1711929600000,8.68]],"type":"line","color":"#d62728"},{"name":"Confidence Interval","data":[[1661990400000,11.51,12.54],[1664582400000,11.09,12.61],[1667260800000,10.7,12.64],[1669852800000,10.33,12.67],[1672531200000,9.960000000000001,12.69],[1675209600000,9.59,12.7],[1677628800000,9.220000000000001,12.72],[1680307200000,8.85,12.74],[1682899200000,8.48,12.75],[1685577600000,8.109999999999999,12.78],[1688169600000,7.73,12.8],[1690848000000,7.36,12.83],[1693526400000,6.97,12.86],[1696118400000,6.59,12.89],[1698796800000,6.2,12.93],[1701388800000,5.81,12.96],[1704067200000,5.42,13.01],[1706745600000,5.02,13.05],[1709251200000,4.62,13.1],[1711929600000,4.21,13.16]],"type":"arearange","color":"rgba(214,39,40,0.2)","linkedTo":":previous"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="arima-921-forecasts" class="level3"><h3 class="anchored" data-anchor-id="arima-921-forecasts">ARIMA (9,2,1) forecasts</h3>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb60" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s1</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://generics.r-lib.org/reference/forecast.html">forecast</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">arimaModel_3</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">month</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/seq.html">seq</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Extremes.html">max</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://lubridate.tidyverse.org/reference/mplus.html">%m+%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/weekday.POSIXt.html">months</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># start at next month</span></span>
<span>              by <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1 month"</span>,</span>
<span>              length.out <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Prediction of Unemployment with ARIMA(0,2,1)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"datetime"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Unemployment (%)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Historic Data"</span>,</span>
<span>    data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/list_parse.html">list_parse2</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/datetime_to_timestamp.html">datetime_to_timestamp</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">TIME</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">grc_unemployment</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Value</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Forecast"</span>,</span>
<span>                  data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/list_parse.html">list_parse2</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>                      x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/datetime_to_timestamp.html">datetime_to_timestamp</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">month</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                      y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">mean</span>, digits<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>                  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                  type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"line"</span>,</span>
<span>                  color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#d62728"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Confidence Interval"</span>,</span>
<span>                data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/list_parse.html">list_parse2</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>                  x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/datetime_to_timestamp.html">datetime_to_timestamp</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">month</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                  low <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lower</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"80%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, digits<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                  high <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">s1</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">upper</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"80%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span>, digits<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>                <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"arearange"</span>,</span>
<span>                color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hex_to_rgba.html">hex_to_rgba</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#d62728"</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>                linkedTo <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">":previous"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-ce6313fe30f7a7bdc6b3" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-ce6313fe30f7a7bdc6b3">{"x":{"hc_opts":{"chart":{"reflow":true},"title":{"text":"Prediction of Unemployment with ARIMA(0,2,1)"},"yAxis":{"title":{"text":"Unemployment (%)"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"xAxis":{"type":"datetime"},"series":[{"name":"Historic Data","data":[[891388800000,10.9],[893980800000,11],[896659200000,10.9],[899251200000,11],[901929600000,11.2],[904608000000,11.1],[907200000000,11.1],[909878400000,11.4],[912470400000,11.4],[915148800000,11.4],[917827200000,11.4],[920246400000,11.4],[922924800000,12.1],[925516800000,12],[928195200000,12],[930787200000,12],[933465600000,12.1],[936144000000,12],[938736000000,12.3],[941414400000,12.4],[944006400000,12.3],[946684800000,11.5],[949363200000,11.6],[951868800000,11.6],[954547200000,11.5],[957139200000,11.5],[959817600000,11.4],[962409600000,11.3],[965088000000,11.2],[967766400000,11.2],[970358400000,10.6],[973036800000,10.7],[975628800000,10.6],[978307200000,10.5],[980985600000,10.5],[983404800000,10.5],[986083200000,10.7],[988675200000,10.7],[991353600000,10.7],[993945600000,10.7],[996624000000,10.6],[999302400000,10.6],[1001894400000,10.9],[1004572800000,10.9],[1007164800000,10.8],[1009843200000,10.7],[1012521600000,10.7],[1014940800000,10.7],[1017619200000,10.3],[1020211200000,10.3],[1022889600000,10.3],[1025481600000,10.3],[1028160000000,10.2],[1030838400000,10.2],[1033430400000,10],[1036108800000,10],[1038700800000,10],[1041379200000,9.800000000000001],[1044057600000,9.699999999999999],[1046476800000,9.699999999999999],[1049155200000,9.699999999999999],[1051747200000,9.699999999999999],[1054425600000,9.699999999999999],[1057017600000,9.699999999999999],[1059696000000,9.699999999999999],[1062374400000,9.699999999999999],[1064966400000,9.9],[1067644800000,9.9],[1070236800000,9.9],[1072915200000,11.2],[1075593600000,10.7],[1078099200000,10.9],[1080777600000,10.5],[1083369600000,10.6],[1086048000000,10.6],[1088640000000,10.6],[1091318400000,10.5],[1093996800000,10.5],[1096588800000,10.4],[1099267200000,10.3],[1101859200000,10.3],[1104537600000,10.2],[1107216000000,9.800000000000001],[1109635200000,10.2],[1112313600000,9.9],[1114905600000,9.9],[1117584000000,10.2],[1120176000000,10.2],[1122854400000,10.2],[1125532800000,10.3],[1128124800000,10.1],[1130803200000,9.6],[1133395200000,9.699999999999999],[1136073600000,9.300000000000001],[1138752000000,9.5],[1141171200000,9.199999999999999],[1143849600000,9.1],[1146441600000,9.1],[1149120000000,9.1],[1151712000000,8.800000000000001],[1154390400000,8.800000000000001],[1157068800000,8.800000000000001],[1159660800000,8.5],[1162339200000,8.9],[1164931200000,9],[1167609600000,8.6],[1170288000000,8.800000000000001],[1172707200000,8.800000000000001],[1175385600000,8.4],[1177977600000,8.5],[1180656000000,8.4],[1183248000000,8.300000000000001],[1185926400000,8.5],[1188604800000,8.5],[1191196800000,8.199999999999999],[1193875200000,7.9],[1196467200000,8.1],[1199145600000,7.7],[1201824000000,7.8],[1204329600000,8.1],[1207008000000,7.7],[1209600000000,7.4],[1212278400000,7.6],[1214870400000,7.6],[1217548800000,7.8],[1220227200000,7.8],[1222819200000,7.6],[1225497600000,8],[1228089600000,8.5],[1230768000000,9],[1233446400000,9.4],[1235865600000,9.300000000000001],[1238544000000,9.300000000000001],[1241136000000,9.4],[1243814400000,9.5],[1246406400000,9.800000000000001],[1249084800000,9.800000000000001],[1251763200000,10.1],[1254355200000,10.1],[1257033600000,10.7],[1259625600000,10.8],[1262304000000,11.1],[1264982400000,11.7],[1267401600000,11.8],[1270080000000,12.1],[1272672000000,12.5],[1275350400000,12.7],[1277942400000,13.1],[1280620800000,13],[1283299200000,13.6],[1285891200000,14.3],[1288569600000,14.2],[1291161600000,14.9],[1293840000000,15.4],[1296518400000,15.6],[1298937600000,16.4],[1301616000000,16.7],[1304208000000,16.9],[1306886400000,17.4],[1309478400000,18.1],[1312156800000,18.8],[1314835200000,19.1],[1317427200000,20.5],[1320105600000,20.7],[1322697600000,21.5],[1325376000000,21.6],[1328054400000,22.4],[1330560000000,23],[1333238400000,23.5],[1335830400000,24.2],[1338508800000,25.2],[1341100800000,25.4],[1343779200000,26],[1346457600000,26.5],[1349049600000,26.2],[1351728000000,27],[1354320000000,26.9],[1356998400000,27.3],[1359676800000,27.3],[1362096000000,27.6],[1364774400000,28],[1367366400000,28],[1370044800000,27.9],[1372636800000,28.1],[1375315200000,27.9],[1377993600000,28.1],[1380585600000,27.7],[1383264000000,27.9],[1385856000000,27.8],[1388534400000,27.2],[1391212800000,27.6],[1393632000000,27.2],[1396310400000,27.1],[1398902400000,27.3],[1401580800000,26.7],[1404172800000,26.3],[1406851200000,26.3],[1409529600000,26.2],[1412121600000,26],[1414800000000,25.7],[1417392000000,25.9],[1420070400000,25.8],[1422748800000,25.9],[1425168000000,26.1],[1427846400000,25.4],[1430438400000,24.7],[1433116800000,25],[1435708800000,25],[1438387200000,24.2],[1441065600000,24.9],[1443657600000,24.8],[1446336000000,24.2],[1448928000000,24.2],[1451606400000,24.7],[1454284800000,24.2],[1456790400000,24.2],[1459468800000,23.9],[1462060800000,23.9],[1464739200000,23.6],[1467331200000,23.8],[1470009600000,23.9],[1472688000000,23.3],[1475280000000,23.6],[1477958400000,23.7],[1480550400000,23.7],[1483228800000,23.5],[1485907200000,23.1],[1488326400000,22.6],[1491004800000,22.1],[1493596800000,22.1],[1496275200000,21.4],[1498867200000,21.2],[1501545600000,21.1],[1504224000000,21.1],[1506816000000,21.1],[1509494400000,21.4],[1512086400000,21.2],[1514764800000,20.9],[1517443200000,21.4],[1519862400000,20.6],[1522540800000,20.1],[1525132800000,19.7],[1527811200000,19.5],[1530403200000,19.3],[1533081600000,19.3],[1535760000000,19.1],[1538352000000,18.9],[1541030400000,19.2],[1543622400000,19],[1546300800000,19.4],[1548979200000,19.3],[1551398400000,18.9],[1554076800000,18.2],[1556668800000,17.6],[1559347200000,17.4],[1561939200000,17.6],[1564617600000,17.4],[1567296000000,17.4],[1569888000000,17.1],[1572566400000,17],[1575158400000,17],[1577836800000,16.5],[1580515200000,16.4],[1583020800000,17],[1585699200000,18.4],[1588291200000,19.6],[1590969600000,20.3],[1593561600000,17.4],[1596240000000,17],[1598918400000,16.9],[1601510400000,17.5],[1604188800000,17.3],[1606780800000,16.8],[1609459200000,16.4],[1612137600000,15.9],[1614556800000,17.2],[1617235200000,17.2],[1619827200000,15.6],[1622505600000,15],[1625097600000,14.4],[1627776000000,13.7],[1630454400000,13.1],[1633046400000,13.3],[1635724800000,12.9],[1638316800000,12.9],[1640995200000,13.6],[1643673600000,13.1],[1646092800000,12.8],[1648771200000,12.8],[1651363200000,12.7],[1654041600000,12.4],[1656633600000,12.3],[1659312000000,12.2]],"type":"line"},{"name":"Forecast","data":[[1661990400000,11.86],[1664582400000,11.94],[1667260800000,12.02],[1669852800000,11.76],[1672531200000,11.61],[1675209600000,11.51],[1677628800000,11.33],[1680307200000,11.2],[1682899200000,11.16],[1685577600000,10.97],[1688169600000,10.78],[1690848000000,10.75],[1693526400000,10.66],[1696118400000,10.51],[1698796800000,10.4],[1701388800000,10.26],[1704067200000,10.09],[1706745600000,10],[1709251200000,9.91],[1711929600000,9.75]],"type":"line","color":"#d62728"},{"name":"Confidence Interval","data":[[1661990400000,11.38,12.34],[1664582400000,11.24,12.64],[1667260800000,11.13,12.91],[1669852800000,10.7,12.83],[1672531200000,10.39,12.82],[1675209600000,10.14,12.88],[1677628800000,9.77,12.9],[1680307200000,9.44,12.97],[1682899200000,9.220000000000001,13.09],[1685577600000,8.84,13.1],[1688169600000,8.41,13.16],[1690848000000,8.119999999999999,13.37],[1693526400000,7.77,13.55],[1696118400000,7.36,13.65],[1698796800000,7,13.79],[1701388800000,6.61,13.91],[1704067200000,6.17,14.02],[1706745600000,5.79,14.21],[1709251200000,5.42,14.39],[1711929600000,4.98,14.52]],"type":"arearange","color":"rgba(214,39,40,0.2)","linkedTo":":previous"}]},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section></section><section id="results" class="level2"><h2 class="anchored" data-anchor-id="results">Results</h2>
<p>Given the diagram as well as the forecast table (of the best performing model, candidate #3), I conclude that a reduction in unemployment in Greece is expected in the next period of time (in the next six months). More specifically, <strong>Greece’s unemployment</strong> in <strong>February 2023</strong> will range between <strong>10%</strong> (9.4%) and <strong>13%</strong> (14%) with an <strong>80%</strong> (95%) probability (based on <strong>ARIMA(9,2,1)</strong> model).</p>
</section><div id="quarto-appendix" class="default"><section id="acknowledgements" class="level2 appendix unlisted"><h2 class="anchored quarto-appendix-heading">Acknowledgements</h2><div class="quarto-appendix-contents">
<p>Image by <a href="https://pixabay.com/users/roszie-6000120/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7386581">Rosy / Bad Homburg / Germany</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7386581">Pixabay</a></p>



</div></section><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0" data-line-spacing="2">
<div id="ref-appliedtimeseriespenn" class="csl-entry">
Applied time series analysis. (n.d.). Retrieved October 19, 2022, from <a href="https://online.stat.psu.edu/stat510/">https://online.stat.psu.edu/stat510/</a>
</div>
<div id="ref-R-flextable" class="csl-entry">
Gohel, D., &amp; Skintzos, P. (2025). <em>Flextable: Functions for tabular reporting</em>. Retrieved from <a href="https://ardata-fr.github.io/flextable-book/">https://ardata-fr.github.io/flextable-book/</a>
</div>
<div id="ref-lubridate2011" class="csl-entry">
Grolemund, G., &amp; Wickham, H. (2011). Dates and times made easy with <span class="nocase">lubridate</span>. <em>Journal of Statistical Software</em>, <em>40</em>(3), 1–25. Retrieved from <a href="https://www.jstatsoft.org/v40/i03/">https://www.jstatsoft.org/v40/i03/</a>
</div>
<div id="ref-hyndman2018forecasting" class="csl-entry">
Hyndman, R. J., &amp; Athanasopoulos, G. (2018). <em>Forecasting: Principles and practice</em>. OTexts.
</div>
<div id="ref-forecast2008" class="csl-entry">
Hyndman, R. J., &amp; Khandakar, Y. (2008). Automatic time series forecasting: The forecast package for <span>R</span>. <em>Journal of Statistical Software</em>, <em>27</em>(3), 1–22. <a href="https://doi.org/10.18637/jss.v027.i03">https://doi.org/10.18637/jss.v027.i03</a>
</div>
<div id="ref-R-forecast" class="csl-entry">
Hyndman, R., Athanasopoulos, G., Bergmeir, C., Caceres, G., Chhay, L., Kuroptev, K., … Yasmeen, F. (2026). <em>Forecast: Forecasting functions for time series and linear models</em>. Retrieved from <a href="https://pkg.robjhyndman.com/forecast/">https://pkg.robjhyndman.com/forecast/</a>
</div>
<div id="ref-R-highcharter" class="csl-entry">
Kunst, J. (2022). <em>Highcharter: A wrapper for the highcharts library</em>. Retrieved from <a href="https://jkunst.com/highcharter/">https://jkunst.com/highcharter/</a>
</div>
<div id="ref-oecd2022" class="csl-entry">
OECD. (2022). Unemployment rate (indicator). Retrieved October 14, 2022, from <a href="https://doi:%2010.1787/52570002-en">doi: 10.1787/52570002-en</a>
</div>
<div id="ref-R-base" class="csl-entry">
R Core Team. (2025). <em>R: A language and environment for statistical computing</em>. Vienna, Austria: R Foundation for Statistical Computing. Retrieved from <a href="https://www.R-project.org/">https://www.R-project.org/</a>
</div>
<div id="ref-krgraphgallerytimeseries" class="csl-entry">
R Graph Gallery. (2018). Time series. <em>URL Https://r-Graph-Gallery.com/Time-Series.html</em>.
</div>
<div id="ref-R-lubridate" class="csl-entry">
Spinu, V., Grolemund, G., &amp; Wickham, H. (2024). <em>Lubridate: Make dealing with dates a little easier</em>. Retrieved from <a href="https://lubridate.tidyverse.org">https://lubridate.tidyverse.org</a>
</div>
<div id="ref-R-tseries" class="csl-entry">
Trapletti, A., &amp; Hornik, K. (2026). <em>Tseries: Time series analysis and computational finance</em>. <a href="https://doi.org/10.32614/CRAN.package.tseries">https://doi.org/10.32614/CRAN.package.tseries</a>
</div>
<div id="ref-R-dplyr" class="csl-entry">
Wickham, H., François, R., Henry, L., Müller, K., &amp; Vaughan, D. (2023). <em>Dplyr: A grammar of data manipulation</em>. Retrieved from <a href="https://dplyr.tidyverse.org">https://dplyr.tidyverse.org</a>
</div>
<div id="ref-R-readr" class="csl-entry">
Wickham, H., Hester, J., &amp; Bryan, J. (2025). <em>Readr: Read rectangular text data</em>. Retrieved from <a href="https://readr.tidyverse.org">https://readr.tidyverse.org</a>
</div>
<div id="ref-R-kableExtra" class="csl-entry">
Zhu, H. (2024). <em>kableExtra: Construct complex table with kable and pipe syntax</em>. Retrieved from <a href="http://haozhu233.github.io/kableExtra/">http://haozhu233.github.io/kableExtra/</a>
</div>
</div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{2022,
  author = {, stesiam},
  title = {Forecasting {Unemployment} in {Greece}},
  date = {2022-10-22},
  url = {https://stesiam.com/posts/forecasting-greek-unemployment/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-2022" class="csl-entry quarto-appendix-citeas">
stesiam. (2022, October 22). Forecasting Unemployment in Greece.
Retrieved from <a href="https://stesiam.com/posts/forecasting-greek-unemployment/">https://stesiam.com/posts/forecasting-greek-unemployment/</a>
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>Time Series</category>
  <guid>https://stesiam.com/posts/forecasting-greek-unemployment/</guid>
  <pubDate>Sat, 22 Oct 2022 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/forecasting-greek-unemployment/unemployment.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>EDA on Greek Parliament</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/eda-greek-parliament/</link>
  <description><![CDATA[ <section id="introduction" class="level1"><h1>Introduction</h1>
<p>And here we go…</p>
<p>This is the first notebook on my website and I’d like to be a little special. I didn’t want to just take a ready-made dataset and apply a machine learning technique (I will do this in the next articles). So, I decided to make my own with the help of <a href="hellenicparliament.gr/">hellenic’s parliament website</a>.</p>
<p>The Greek political scene has particularly preoccupied global public opinion in recent years, due to the Greek economic crisis. A part of it was spent on the reasons that caused it. The causes of the Greek crisis are many and a point of contention to this day. In this article we will deal essentially with one of the points of criticism. The election of the same persons.</p>
<p>With this notebook I will try to analyze whether this claim is valid by counting how many times someone has been elected to the Greek parliament. In addition, I will study the obsession with the same persons at the party level, but also at the local level (constituencies).</p>
</section><section id="prerequisites" class="level1"><h1>Prerequisites</h1>
<section id="import-libraries" class="level2"><h2 class="anchored" data-anchor-id="import-libraries">Import Libraries</h2>
<p>First and foremost, we have to load our libraries.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb1" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># General purpose R libraries</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://tidyverse.tidyverse.org">tidyverse</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="http://haozhu233.github.io/kableExtra/">kableExtra</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/">reactable</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/">highcharter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Graphs</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org">ggplot2</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://github.com/erocoar/ggpol">ggpol</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/">ggtext</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Other settings</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/options.html">options</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>digits<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># print only 2 decimals</span></span></code></pre></div></div>
</details>
</div>
</section><section id="import-dataset" class="level2"><h2 class="anchored" data-anchor-id="import-dataset">Import dataset</h2>
<p>After loading R libraries, then I will load my data.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb2" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://readr.tidyverse.org/reference/read_delim.html">read_csv</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"data/greek_parliament.csv"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section><section id="preview-dataset" class="level2"><h2 class="anchored" data-anchor-id="preview-dataset">Preview Dataset</h2>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb3" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">preview_dataset</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kbl.html">kbl</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">preview_dataset</span>, </span>
<span>    align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'c'</span>,</span>
<span>    booktabs <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,</span>
<span>    centering <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span>,</span>
<span>    valign <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">T</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/kable_classic.html">kable_paper</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/kableExtra/man/scroll_box.html">scroll_box</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"600px"</span>, height <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"250px"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div id="tbl-preview-dataset" class="cell quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-tbl figure"><figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-preview-dataset-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table&nbsp;1: Preview Dataset (first 6 rows)
</figcaption><div aria-describedby="tbl-preview-dataset-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="cell-output-display">
<div style="border: 1px solid #ddd; padding: 0px; overflow-y: scroll; height:250px; overflow-x: scroll; width:600px; ">
<table class="lightable-paper do-not-create-environment cell caption-top table table-sm table-striped small">
<thead><tr class="header">
<th data-quarto-table-cell-role="th" style="text-align: center; position: sticky; top: 0; background-color: #FFFFFF;">FullName</th>
<th data-quarto-table-cell-role="th" style="text-align: center; position: sticky; top: 0; background-color: #FFFFFF;">Party</th>
<th data-quarto-table-cell-role="th" style="text-align: center; position: sticky; top: 0; background-color: #FFFFFF;">Constituency</th>
<th data-quarto-table-cell-role="th" style="text-align: center; position: sticky; top: 0; background-color: #FFFFFF;">Term</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">Agorastis Vasileios</td>
<td style="text-align: center;">PA.SO.K. (Panhellenic Socialist Movement)</td>
<td style="text-align: center;">Larissa</td>
<td style="text-align: center;">3</td>
</tr>
<tr class="even">
<td style="text-align: center;">Akrita Sylva - Kaiti</td>
<td style="text-align: center;">PA.SO.K. (Panhellenic Socialist Movement)</td>
<td style="text-align: center;">Athens B</td>
<td style="text-align: center;">3</td>
</tr>
<tr class="odd">
<td style="text-align: center;">Akritidis Nikolaos</td>
<td style="text-align: center;">PA.SO.K. (Panhellenic Socialist Movement)</td>
<td style="text-align: center;">Thessaloniki A</td>
<td style="text-align: center;">3</td>
</tr>
<tr class="even">
<td style="text-align: center;">Akrivakis Alexandros</td>
<td style="text-align: center;">PA.SO.K. (Panhellenic Socialist Movement)</td>
<td style="text-align: center;">Viotia</td>
<td style="text-align: center;">3</td>
</tr>
<tr class="odd">
<td style="text-align: center;">Alevras Ioannis</td>
<td style="text-align: center;">PA.SO.K. (Panhellenic Socialist Movement)</td>
<td style="text-align: center;">Athens A</td>
<td style="text-align: center;">3</td>
</tr>
<tr class="even">
<td style="text-align: center;">Alexandris Efstathios (Stathis)</td>
<td style="text-align: center;">PA.SO.K. (Panhellenic Socialist Movement)</td>
<td style="text-align: center;">Athens B</td>
<td style="text-align: center;">3</td>
</tr>
<tr class="odd">
<td style="text-align: center;">Alexiadis Konstantinos</td>
<td style="text-align: center;">PA.SO.K. (Panhellenic Socialist Movement)</td>
<td style="text-align: center;">Trikala</td>
<td style="text-align: center;">3</td>
</tr>
<tr class="even">
<td style="text-align: center;">Alexiou Thomas</td>
<td style="text-align: center;">NEA DIMOKRATIA</td>
<td style="text-align: center;">Xanthi</td>
<td style="text-align: center;">3</td>
</tr>
<tr class="odd">
<td style="text-align: center;">Allamanis Stylianos</td>
<td style="text-align: center;">NEA DIMOKRATIA</td>
<td style="text-align: center;">Karditsa</td>
<td style="text-align: center;">3</td>
</tr>
<tr class="even">
<td style="text-align: center;">Amanatidis Konstantinos</td>
<td style="text-align: center;">PA.SO.K. (Panhellenic Socialist Movement)</td>
<td style="text-align: center;">Thessaloniki B</td>
<td style="text-align: center;">3</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</figure>
</div>
</div>
</section><section id="structure-of-dataset" class="level2"><h2 class="anchored" data-anchor-id="structure-of-dataset">Structure of Dataset</h2>
<table class="caption-top table">
<colgroup>
<col style="width: 22%">
<col style="width: 30%">
<col style="width: 47%">
</colgroup>
<thead><tr class="header">
<th style="text-align: center;">Variable</th>
<th style="text-align: center;">Property</th>
<th style="text-align: center;">Description</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><code>Full Name</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">Surname and name of the member of parliament</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>Party</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">The party on which the MP got elected</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><code>Constituency</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (nominal)</td>
<td style="text-align: center;">MP got elected on this area</td>
</tr>
<tr class="even">
<td style="text-align: center;"><code>Term</code></td>
<td style="text-align: center;">
<em>qualitative</em> <br> (ordinal)</td>
<td style="text-align: center;">Plenum term</td>
</tr>
</tbody>
</table>
<p>Thus, my sample has 4 variables, of which 0 are quantitative and 4 are quantitative properties, of which 3 are nominal and the rest one (<code>Term</code>) is ordinal.</p>
</section><section id="recoding-variables" class="level2"><h2 class="anchored" data-anchor-id="recoding-variables">Recoding variables</h2>
<p>Party names can vary from short to lengthy ones. The last ones are a problem for our analysis because their names can not fit to our visualisations. The table below is showing all the parties that have ever participated in parliament. Is is apparent that some parties have really long names.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb4" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  Party <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/unique.html">unique</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>  Length <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://stringr.tidyverse.org/reference/str_length.html">str_length</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/unique.html">unique</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Length</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glin.github.io/reactable/reference/reactable.html">reactable</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    defaultPageSize <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="reactable html-widget html-fill-item" id="htmlwidget-d0fef2c9964269956f64" style="width:auto;height:auto;"></div>
<script type="application/json" data-for="htmlwidget-d0fef2c9964269956f64">{"x":{"tag":{"name":"Reactable","attribs":{"data":{"Party":["ANEXARTITOI ELLINES (Independent Hellenes) National Patriotic Democratic Alliance","DEMOCRATIC COALITION (Panhellenic Socialist Movement Democratic Left )","LAIKOS SYNDESMOS - CHRYSI AVGI (People’s Association – Golden Dawn)","ANEXARTITOI ELLINES (Independent Hellenes)","PA.SO.K. (Panhellenic Socialist Movement)","Communist Party of Greece (Interior)","SYNASPISMOS RIZOSPASTIKIS ARISTERAS","Coalition of the Left and Progress","ANEXARTITOI DIMOKRATIKOI VOULEFTES","KOMMOUNISTIKO KOMMA ELLADAS","DHM.AR (Democratic Left)","TO POTAMI (The River)","NEA DIMOKRATIA","LAIKI ENOTITA","INDEPENDENT","DI.K.KI.","DI.ANA.","LA.O.S.","ΟΟ.ΕΟ.","POL.A."],"Length":[81,70,67,42,41,36,35,34,34,27,24,21,14,13,11,8,7,7,6,6]},"columns":[{"id":"Party","name":"Party","type":"character"},{"id":"Length","name":"Length","type":"numeric"}],"defaultPageSize":5,"dataKey":"6290ea4daaf33732cb2712395b66ae78"},"children":[]},"class":"reactR_markup"},"evals":[],"jsHooks":[]}</script>
</div>
</div>
<p>In our case the parties with the longest name is AN.EL. and Democratic Coalition with 81 and 70 characters, respectively. On the contrary, the shortest party name is POL.A. with 6 characters.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb5" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">## Recoding parliament$Party</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ANEXARTITOI DIMOKRATIKOI VOULEFTES"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ADP"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ANEXARTITOI ELLINES (Independent Hellenes)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ANEL"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ANEXARTITOI ELLINES (Independent Hellenes) National Patriotic Democratic Alliance"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ANEL"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Coalition of the Left and Progress"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SYRIZA"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Communist Party of Greece (Interior)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KKE (interior)"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DEMOCRATIC COALITION (Panhellenic Socialist Movement Democratic Left )"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PASOK"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DHM.AR (Democratic Left)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DHMAR"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DI.ANA."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DIANA"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DI.K.KI."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DIKKI"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"INDEPENDENT"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"INDEPENDENT"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KOMMOUNISTIKO KOMMA ELLADAS"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KKE"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LA.O.S."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LAOS"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LAIKI ENOTITA"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LAE"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"LAIKOS SYNDESMOS - CHRYSI AVGI (People’s Association – Golden Dawn)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"XA"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"NEA DIMOKRATIA"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ND"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PA.SO.K. (Panhellenic Socialist Movement)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PASOK"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"POL.A."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"POLA"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SYNASPISMOS RIZOSPASTIKIS ARISTERAS"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SYRIZA"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"TO POTAMI (The River)"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"POTAMI"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">[</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΟΟ.ΕΟ."</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">]</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"EO"</span></span></code></pre></div></div>
</details>
</div>
</section><section id="setting-colors" class="level2"><h2 class="anchored" data-anchor-id="setting-colors">Setting colors</h2>
<p>A few days after, I decided that there should be a consistency in the choice of colors. That’s the reason of this section. Thus, I will assign a dedicated hex color code to each party.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb6" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/data.frame.html">data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  Party <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/unique.html">unique</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/mutate.html">mutate</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/case_when.html">case_when</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PASOK"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#95bb72"</span>,</span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ND"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#0492c2"</span>,</span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KKE"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF6666"</span>,</span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SYRIZA"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#e27bb1"</span>,</span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KKE (interior)"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF3366"</span>,</span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"INDEPENDENT"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#ffffff"</span>,</span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"DIANA"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"orange"</span>,</span>
<span>    <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">~</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#808080"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kke_color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF6666"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">nd_color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#0492c2"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pasok_color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#95bb72"</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">syriza_color</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#e27bb1"</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb7" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">names</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Panhellenic Socialistic Mpvement"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"New Democracy"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Communist Party of Greece"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Communist Party οf Greece (interior)"</span>,</span>
<span>          <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Independent"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Coalition of the Radical Left"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Democratic Renewal"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Alternative Ecologists"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Political Spring"</span>,</span>
<span>          <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Democratic Social Movement"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Popular Orthodox Rally"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Democratic Left"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Independent Greeks"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Golden Dawn"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Independent Democratic MPs"</span>,</span>
<span>          <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Popular Unity"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"The River"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">names</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">names</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party_el</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΠΑΣΟΚ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΝΔ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΚΚΕ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΚΚΕ (εσωτερικού)"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ανεξάρτητοι"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΣΥΡΙΖΑ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΔΗΑΝΑ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΕΟ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΠΟΛΑΝ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΔΗΚΚΙ"</span>,</span>
<span>             <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΛΑΟΣ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΔΗΜΑΡ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΑΝΕΛ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΧΑ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΑΔΒ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΛΑΕ"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΠΟΤΑΜΙ"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">names_el</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Πανελλήνιο Σοσιαλιστικό Κίνημα"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Νέα Δημοκρατία"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Κομμουνιστικό Κόμμα Ελλάδας"</span>, </span>
<span>                    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ΚΚΕ (εσωτερικού)"</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ανεξάρτητοι"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Συνασπισμός Ριζοσπαστικής Αριστεράς"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Δημοκρατική Ανανέωση"</span>, </span>
<span>                    <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Εναλλακτικοί Οικολόγοι"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Πολιτική Άνοιξη"</span>,</span>
<span>            <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Δημοκρατικό Κοινωννικό Κίνημα"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Λαϊκός Ορθόδοξος Συναγερμός"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Δημοκρατική Αριστερά"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ανεξάρτητοι Έλληνες"</span>,</span>
<span>            <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Χρυσή Αυγή"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ανεξ Δημ. Βουλευτές"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Λαϊκή Ενότητα"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Το Ποτάμι"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details>
</div>
</section></section><section id="parliament-over-the-years" class="level1"><h1>Parliament over the years</h1>
<p>Now, I will make a short sum-up of the electoral resuts over the years. It is important to share that I made it thanks to <a href="https://datavizstory.com/a-parliament-diagram-in-r/">this post</a> and <code>ggpol</code> package. As I am planning to do this procedure for many electoral terms, I will convert it as a function.</p>
<p>Arguments like <code>term</code> and <code>custom_title</code> are vital to create reproducible plots for all the terms. Although a main problem is the colors. On the aforementioned post it was about only one term. We knew how many parties we had, so we knew what colors to set and how many. If we try that on many terms (on which the number of parties can vary from 3 to 8) an error will come up which will say “Hey, you have set 3 colors but I see that you have 8 values (parties)”. This was a real obstacle for me. After some tries and misses I came up with the concept of <strong>dynamic arguments</strong>.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb8" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">make_parliament_plot</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">custom_title</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">...</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">custom</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Term</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/table.html">table</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/t.html">t</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">`colnames&lt;-`</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Party"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Seats"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">colors</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">...</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">custom</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">legend</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/paste.html">paste0</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">custom</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">" ("</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">custom</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Seats</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">")"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#draw a parliament diagram </span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">custom</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/ggpol/man/geom_parliament.html">geom_parliament</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>seats <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Seats</span>, fill <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"white"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/scale_manual.html">scale_fill_manual</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>values <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">colors</span> , labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">custom</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">legend</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/coord_fixed.html">coord_fixed</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span> </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggtheme.html">theme_void</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">custom_title</span>,</span>
<span>       caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Source: stesiam | stesiam.github.io, 2022"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/theme.html">theme</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">element_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">18</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        plot.title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">element_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>hjust <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>,size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">14</span>,face <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'bold'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        plot.subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">element_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>hjust <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        plot.caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">element_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>vjust <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>,hjust <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.9</span>, size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,    </span>
<span>        legend.position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'bottom'</span>,</span>
<span>        legend.direction <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"horizontal"</span>,</span>
<span>        legend.spacing.y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/grid/unit.html">unit</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.1</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"cm"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        legend.spacing.x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/grid/unit.html">unit</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.1</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"cm"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        legend.key.size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/grid/unit.html">unit</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.8</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'lines'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        legend.text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">element_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>margin <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">margin</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>r <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>, unit <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'cm'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        legend.text.align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>        <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/guides.html">guides</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>fill<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/guide_legend.html">guide_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>nrow<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>,byrow<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,reverse <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,title<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">NULL</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;"><a href="https://rdrr.io/r/base/function.html">return</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">p</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb9" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># f1 = parliament %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   dplyr::count(FullName, Party) %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   arrange(-n) %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   dplyr::filter(n&gt;=9) %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   mutate(lastName = extract_name_parts_vec(FullName))</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># party_colors = c(</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># kke_color = "#FF6666",</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># nd_color = "#0492c2",</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># pasok_color = "#95bb72",</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># syriza_color = "#e27bb1")</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># </span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># points &lt;- purrr::pmap(</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   list(</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     y = f1$n,</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     color = party_colors[f1$Party]</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   ),</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   function(y, color) list(y = y, color = color)</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># )</span></span>
<span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># highchart() %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   hc_chart(type = "bar") %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   hc_title(text = "Top 20 Politicians by Times Elected") %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   hc_xAxis(</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     categories = f1$lastName$last_name,</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     title = list(text = "Politician")</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   ) %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   hc_yAxis(title = list(text = "Times Elected")) %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   hc_add_series(</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     data = points,</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     name = "Times Elected",</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     colorByPoint = TRUE,</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#     showInLegend = FALSE</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   ) %&gt;%</span></span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#   hc_tooltip(pointFormat = "&lt;b&gt;{point.category}&lt;/b&gt;&lt;br&gt;Times elected: {point.y}")</span></span></code></pre></div></div>
</details>
</div>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>Note that till this moment I have not figure out how to change the position of the parties in an efficient way (in a function) that will somehow represent their potitical view. The next visualizations of the parliament are exclusively about how many MPs got elected by each party.</p>
</div>
</div>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-1-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-1" aria-controls="tabset-1-1" aria-selected="true" href="">3rd Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-2" aria-controls="tabset-1-2" aria-selected="false" href="">4th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-3" aria-controls="tabset-1-3" aria-selected="false" href="">5th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-4" aria-controls="tabset-1-4" aria-selected="false" href="">6th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-5-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-5" aria-controls="tabset-1-5" aria-selected="false" href="">7th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-6-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-6" aria-controls="tabset-1-6" aria-selected="false" href="">8th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-7-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-7" aria-controls="tabset-1-7" aria-selected="false" href="">9th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-8-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-8" aria-controls="tabset-1-8" aria-selected="false" href="">10th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-9-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-9" aria-controls="tabset-1-9" aria-selected="false" href="">11th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-10-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-10" aria-controls="tabset-1-10" aria-selected="false" href="">12th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-11-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-11" aria-controls="tabset-1-11" aria-selected="false" href="">13th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-12-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-12" aria-controls="tabset-1-12" aria-selected="false" href="">14th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-13-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-13" aria-controls="tabset-1-13" aria-selected="false" href="">15th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-14-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-14" aria-controls="tabset-1-14" aria-selected="false" href="">16th Term</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-1-15-tab" data-bs-toggle="tab" data-bs-target="#tabset-1-15" aria-controls="tabset-1-15" aria-selected="false" href="">17th Term</a></li>
</ul>
<div class="tab-content">
<div id="tabset-1-1" class="tab-pane active" aria-labelledby="tabset-1-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb10" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">plot_parliament_term</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_num</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament_data</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties_data</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lang</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"en"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Filter the parliament data for the selected term and summarize by party</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament_data</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Term</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_num</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/summarise.html">summarise</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>n <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/context.html">n</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">ungroup</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> </span>
<span></span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Perform fuzzy join with parties data based on party name similarity</span></span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">fuzzyjoin</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/pkg/fuzzyjoin/man/stringdist_join.html">stringdist_inner_join</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties_data</span>, by <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Party"</span>,</span>
<span>                                                      max_dist <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>, distance_col <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"distance"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/group_by.html">group_by</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party.x</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/slice.html">slice_min</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">distance</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">|&gt;</span>   <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Ensure only the closest match is selected</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/rename.html">rename</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>Party <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party.x</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span></span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Conditionally adjust the data based on language</span></span>
<span>  <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lang</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"en"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">names</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Color</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">title_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Distribution of seats"</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Final formation of Hellenic Parliament"</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">caption_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'&lt;b&gt;Source:&lt;/b&gt; Hellenic Parliament | &lt;b&gt;Graphic:&lt;/b&gt; &lt;a href="https://stesiam.com/" target="_blank"&gt;stesiam.com&lt;/a&gt;'</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hover_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Representatives"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/select.html">select</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">names_el</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party_el</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Color</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">title_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Κατανομή θέσεων"</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Τελική μορφή Ελληνικού Κοινοβουλίου"</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">caption_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'&lt;b&gt;Πηγή:&lt;/b&gt; Ελληνικό Κοινοβούλιο | &lt;b&gt;Γράφημα:&lt;/b&gt; &lt;a href="https://stesiam.com/" target="_blank"&gt;stesiam.com&lt;/a&gt; '</span></span>
<span>    <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hover_text</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Βουλευτές"</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span>
<span></span>
<span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Create the highcharter plot for the specific term</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'item'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">title_text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">subtitle_text</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_caption.html">hc_caption</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">caption_text</span>,</span>
<span>      align <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'center'</span>,</span>
<span>      verticalAlign <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'bottom'</span>,</span>
<span>      y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>labelFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">'{name} &lt;span style="opacity: 0.4"&gt;{y}&lt;/span&gt;'</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">hover_text</span>,</span>
<span>      data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">purrr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://purrr.tidyverse.org/reference/pmap.html">pmap</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">if</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">lang</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"en"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>          <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">names</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Color</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">else</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>          <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">names_el</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Color</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">term_data_joined</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party_el</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span>,</span>
<span>        <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">list</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      keys <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"name"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"y"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"color"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"label"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span>,</span>
<span>        format <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"{point.label}"</span>,</span>
<span>        style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>textOutline <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"5px contrast"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      center <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"50%"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"88%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"170%"</span>,</span>
<span>      startAngle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span>,</span>
<span>      endAngle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">100</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_responsive.html">hc_responsive</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>  rules <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      condition <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>maxWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">600</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      chartOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        series <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            distance <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">30</span>,</span>
<span>            style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>              fontSize <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"12px"</span>,</span>
<span>              textOutline <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1px contrast"</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Outline for labels</span></span>
<span>            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>          <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>          center <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"50%"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"75%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Adjust center position for mobile</span></span>
<span>          size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"130%"</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># New condition for max width of 400px</span></span>
<span>      condition <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>maxWidth <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">400</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      chartOptions <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        series <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>          dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>            distance <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">20</span>,</span>
<span>            style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>              fontSize <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"9px"</span>,        <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Smaller font for smaller screens</span></span>
<span>              textOutline <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"1px contrast"</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Maintain outline</span></span>
<span>            <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>          <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>          center <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"50%"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"80%"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Further adjust center position for even smaller screens</span></span>
<span>          size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"110%"</span>   <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Adjust the size for smaller screens</span></span>
<span>        <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</details>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb11" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span>, lang <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"en"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-feb5f4d4757a34d6d364" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-feb5f4d4757a34d6d364">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Communist Party of Greece",13,"#FF6666","KKE"],["New Democracy",115,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",172,"#95bb72","PASOK"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-2" class="tab-pane" aria-labelledby="tabset-1-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb12" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span>, lang <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"el"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stderr">
<pre><code>Adding missing grouping variables: `Party`</code></pre>
</div>
<div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-5bc5b57f75fb6a1043f6" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-5bc5b57f75fb6a1043f6">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Κατανομή θέσεων"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Τελική μορφή Ελληνικού Κοινοβουλίου"},"caption":{"text":"<b>Πηγή:<\/b> Ελληνικό Κοινοβούλιο | <b>Γράφημα:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a> ","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Βουλευτές","data":[["Ανεξάρτητοι",1,"#ffffff","Ανεξάρτητοι"],["Κομμουνιστικό Κόμμα Ελλάδας",11,"#FF6666","ΚΚΕ"],["ΚΚΕ (εσωτερικού)",1,"#FF3366","ΚΚΕ (εσωτερικού)"],["Νέα Δημοκρατία",126,"#0492c2","ΝΔ"],["Πανελλήνιο Σοσιαλιστικό Κίνημα",161,"#95bb72","ΠΑΣΟΚ"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-3" class="tab-pane" aria-labelledby="tabset-1-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb14" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-3501387b92d1551a0357" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-3501387b92d1551a0357">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Democratic Renewal",1,"orange","DIANA"],["Independent",1,"#ffffff","INDEPENDENT"],["New Democracy",145,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",125,"#95bb72","PASOK"],["Coalition of the Radical Left",28,"#e27bb1","SYRIZA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-4" class="tab-pane" aria-labelledby="tabset-1-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb15" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-0cdc86413255d5f0e5a2" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-0cdc86413255d5f0e5a2">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Alternative Ecologists",1,"#808080","EO"],["Independent",2,"#ffffff","INDEPENDENT"],["New Democracy",148,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",128,"#95bb72","PASOK"],["Coalition of the Radical Left",21,"#e27bb1","SYRIZA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-5" class="tab-pane" aria-labelledby="tabset-1-5-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb16" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">7</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-d5f4e39a8494f167a572" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-d5f4e39a8494f167a572">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Alternative Ecologists",1,"#808080","EO"],["Independent",10,"#ffffff","INDEPENDENT"],["Communist Party of Greece",7,"#FF6666","KKE"],["New Democracy",150,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",121,"#95bb72","PASOK"],["Coalition of the Radical Left",11,"#e27bb1","SYRIZA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-6" class="tab-pane" aria-labelledby="tabset-1-6-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb17" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">8</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-0373318af586b5dcbe58" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-0373318af586b5dcbe58">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Communist Party of Greece",9,"#FF6666","KKE"],["New Democracy",110,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",170,"#95bb72","PASOK"],["Political Spring",11,"#808080","POLA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-7" class="tab-pane" aria-labelledby="tabset-1-7-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb18" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">9</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span>, lang <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"el"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output cell-output-stderr">
<pre><code>Adding missing grouping variables: `Party`</code></pre>
</div>
<div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-7d7ba17bb11ba7eaf38b" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-7d7ba17bb11ba7eaf38b">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Κατανομή θέσεων"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Τελική μορφή Ελληνικού Κοινοβουλίου"},"caption":{"text":"<b>Πηγή:<\/b> Ελληνικό Κοινοβούλιο | <b>Γράφημα:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a> ","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Βουλευτές","data":[["Δημοκρατικό Κοινωννικό Κίνημα",9,"#808080","ΔΗΚΚΙ"],["Ανεξάρτητοι",1,"#ffffff","Ανεξάρτητοι"],["Κομμουνιστικό Κόμμα Ελλάδας",11,"#FF6666","ΚΚΕ"],["Νέα Δημοκρατία",107,"#0492c2","ΝΔ"],["Πανελλήνιο Σοσιαλιστικό Κίνημα",162,"#95bb72","ΠΑΣΟΚ"],["Συνασπισμός Ριζοσπαστικής Αριστεράς",10,"#e27bb1","ΣΥΡΙΖΑ"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-8" class="tab-pane" aria-labelledby="tabset-1-8-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb20" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-e380ce77abe635ff6b2a" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-e380ce77abe635ff6b2a">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Independent",1,"#ffffff","INDEPENDENT"],["Communist Party of Greece",11,"#FF6666","KKE"],["New Democracy",125,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",157,"#95bb72","PASOK"],["Coalition of the Radical Left",6,"#e27bb1","SYRIZA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-9" class="tab-pane" aria-labelledby="tabset-1-9-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb21" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">11</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-b60f8458ddfe1eafe6a9" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-b60f8458ddfe1eafe6a9">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Independent",5,"#ffffff","INDEPENDENT"],["Communist Party of Greece",12,"#FF6666","KKE"],["New Democracy",164,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",113,"#95bb72","PASOK"],["Coalition of the Radical Left",6,"#e27bb1","SYRIZA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-10" class="tab-pane" aria-labelledby="tabset-1-10-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb22" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">12</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-69cdfc1739aa0de68942" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-69cdfc1739aa0de68942">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Communist Party of Greece",22,"#FF6666","KKE"],["Popular Orthodox Rally",10,"#808080","LAOS"],["New Democracy",152,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",102,"#95bb72","PASOK"],["Coalition of the Radical Left",14,"#e27bb1","SYRIZA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-11" class="tab-pane" aria-labelledby="tabset-1-11-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb23" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">13</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-5aea1a36994fdbd35e4b" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-5aea1a36994fdbd35e4b">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Independent Greeks",10,"#808080","ANEL"],["Democratic Left",10,"#808080","DHMAR"],["Independent",31,"#ffffff","INDEPENDENT"],["Communist Party of Greece",21,"#FF6666","KKE"],["Popular Orthodox Rally",16,"#808080","LAOS"],["New Democracy",72,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",129,"#95bb72","PASOK"],["Coalition of the Radical Left",12,"#e27bb1","SYRIZA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-12" class="tab-pane" aria-labelledby="tabset-1-12-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb24" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">14</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-1fd719be537e7a6dc13d" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-1fd719be537e7a6dc13d">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Independent Greeks",33,"#808080","ANEL"],["Democratic Left",19,"#808080","DHMAR"],["Communist Party of Greece",26,"#FF6666","KKE"],["New Democracy",108,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",41,"#95bb72","PASOK"],["Coalition of the Radical Left",52,"#e27bb1","SYRIZA"],["Golden Dawn",21,"#808080","XA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-13" class="tab-pane" aria-labelledby="tabset-1-13-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb25" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">15</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-1d926f924af046403d15" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-1d926f924af046403d15">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Independent Democratic MPs",17,"#808080","ADP"],["Independent Greeks",12,"#808080","ANEL"],["Democratic Left",11,"#808080","DHMAR"],["Independent",7,"#ffffff","INDEPENDENT"],["Communist Party of Greece",12,"#FF6666","KKE"],["New Democracy",127,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",28,"#95bb72","PASOK"],["Coalition of the Radical Left",71,"#e27bb1","SYRIZA"],["Golden Dawn",16,"#808080","XA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-14" class="tab-pane" aria-labelledby="tabset-1-14-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb26" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">16</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-161a89ca60c7bbb357b4" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-161a89ca60c7bbb357b4">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Independent Greeks",13,"#808080","ANEL"],["Communist Party of Greece",15,"#FF6666","KKE"],["Popular Unity",25,"#808080","LAE"],["New Democracy",76,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",13,"#95bb72","PASOK"],["The River",17,"#808080","POTAMI"],["Coalition of the Radical Left",124,"#e27bb1","SYRIZA"],["Golden Dawn",17,"#808080","XA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
<div id="tabset-1-15" class="tab-pane" aria-labelledby="tabset-1-15-tab">
<div class="callout callout-style-default callout-warning callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Warning
</div>
</div>
<div class="callout-body-container callout-body">
<p>As you can see on the next plot there are many MPs that are classified as independent (according to Hellenic’s Parliament website). Many of them are members of parties “ANEL” and “Enosi Kentroon”. However, a large wave of departures from the parties led to not fulfilling the conditions to be considered as parliamentary parties. For that reason members of these parties (that did not left) are considered independent.</p>
</div>
</div>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb27" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">plot_parliament_term</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">17</span>,<span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parties</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-c949a5583b4ad3506a4a" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-c949a5583b4ad3506a4a">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"item"},"title":{"text":"Distribution of seats"},"yAxis":{"title":{"text":null}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"}},"subtitle":{"text":"Final formation of Hellenic Parliament"},"caption":{"text":"<b>Source:<\/b> Hellenic Parliament | <b>Graphic:<\/b> <a href=\"https://stesiam.com/\" target=\"_blank\">stesiam.com<\/a>","align":"center","verticalAlign":"bottom","y":10},"legend":{"labelFormat":"{name} <span style=\"opacity: 0.4\">{y}<\/span>"},"series":[{"name":"Representatives","data":[["Independent",25,"#ffffff","INDEPENDENT"],["Communist Party of Greece",15,"#FF6666","KKE"],["New Democracy",77,"#0492c2","ND"],["Panhellenic Socialistic Mpvement",19,"#95bb72","PASOK"],["The River",5,"#808080","POTAMI"],["Coalition of the Radical Left",144,"#e27bb1","SYRIZA"],["Golden Dawn",16,"#808080","XA"]],"keys":["name","y","color","label"],"dataLabels":{"enabled":true,"format":"{point.label}","style":{"textOutline":"5px contrast"}},"center":["50%","88%"],"size":"170%","startAngle":-100,"endAngle":100}],"responsive":{"rules":[{"condition":{"maxWidth":600},"chartOptions":{"series":{"dataLabels":{"distance":-30,"style":{"fontSize":"12px","textOutline":"1px contrast"}},"center":["50%","75%"],"size":"130%"}}},{"condition":{"maxWidth":400},"chartOptions":{"series":{"dataLabels":{"distance":-20,"style":{"fontSize":"9px","textOutline":"1px contrast"}},"center":["50%","80%"],"size":"110%"}}}]}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</div>
</div>
</div>
</section><section id="most-elected-members-of-parliament" class="level1"><h1>Most elected members of parliament</h1>
<div class="cell" data-layout-valign="bottom">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb28" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#total_times_elected_freqs &lt;- function(input_constituency, min_times_elected){</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">total_times_elected_freqs_df</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">FullName</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">9</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  </span>
<span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#df = table(parliament$FullName)%&gt;% sort(decreasing = T) %&gt;% as.data.frame() %&gt;% filter(Freq&gt;=11)</span></span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">total_times_elected_freqs_df</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/reorder.factor.html">reorder</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">FullName</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>, fill <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>stat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"identity"</span>,width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.88</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>label<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, hjust <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1.5</span>, vjust<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>, color<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"white"</span>, size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggtheme.html">theme_minimal</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/scale_manual.html">scale_fill_manual</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>values <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KKE"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kke_color</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ND"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">nd_color</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PASOK"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pasok_color</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SYRIZA"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">syriza_color</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Most elected MPs on Greek Parliament (1981 - 2019) &lt;br&gt;</span></span>
<span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">       &lt;span style = 'font-size:10pt'&gt; A list that shows the most elected members of parliament (elected 11 times or more). &lt;br&gt; The following ones are members of &lt;span style = 'color:blue;'&gt;ND&lt;/span&gt;,  or &lt;span style = 'color:darkgreen;'&gt;PASOK&lt;/span&gt;&lt;/span&gt;."</span>,</span>
<span>       caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Source: **stesiam** | stesiam.github.io, 2022"</span>,</span>
<span>       x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Times elected"</span>,</span>
<span>       y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Members of Parliament"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/theme.html">theme</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>    plot.title.position <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"plot"</span>,</span>
<span>    plot.title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://wilkelab.org/ggtext/reference/element_textbox.html">element_textbox_simple</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      size <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">14</span>,</span>
<span>      lineheight <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1</span>,</span>
<span>      padding <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">margin</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5.5</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5.5</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5.5</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5.5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      margin <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/element.html">margin</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5.5</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      fill <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"cornsilk"</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/coord_flip.html">coord_flip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/fig-1.png" class="img-fluid figure-img" width="672"></p>
<figcaption>Most elected MPs</figcaption></figure>
</div>
</div>
</div>
</section><section id="most-elected-members-by-party" class="level1"><h1>Most elected members by party</h1>
<p>So far we have seen the most elected members of Greek parliament for the period 1981-2019. Ιt would be particularly interesting to study the same feature by party. However, finding the most elected member per party can be challenging on parties with relatively low representation on Greek parliament. That is the reason for choosing only some of those.</p>
<p>Concerning the implementation part, I see that I will make some visualizations with minimum changes (e.g., filter dataset based on party, change color, etc.) so, the creation of a function is justified. That way, I will not repeat same code, following one of the principles of programming (DRY - Don’t Repeat Yourself). On the following function we can see that I set 3 variables :</p>
<ul>
<li>
<code>Party</code> : I have to specify which data to filter</li>
<li>
<code>color</code> : In order to customize color of my barplots to be similar to each party’s color</li>
<li>
<code>times_elected_min</code> : A argument that I added up later. The problem with its absence is that I have to deal with parties that elect for example 150 MPs and some others just 10. If I set a universal number of elections to visualize I will have diagrams with many problems. Let’s suppose that I set a big value (e.g., 10). Then I would visualize my data for <em>ND</em> and <em>PASOK</em>, although parties with relatively low number of MPs would have only one or noone to show (<em>KKE</em> &amp; <em>SYRIZA</em>, respectively). On the other hand if I set a low value I create a new problem as there will be many MPs of and it creates the need to edit many more things (like width of bars). An argument like <code>times_elected_min</code> can adapt the specific characteristics of each party.</li>
</ul>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb29" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">party_plot</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">party</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">party_color</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">times_elected_min</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span>  </span>
<span>  <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">party_df</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">FullName</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/arrange.html">arrange</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">dplyr</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">::</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">times_elected_min</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  </span>
<span></span>
<span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/highchart.html">highchart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_chart.html">hc_chart</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>type <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"bar"</span>, inverted <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_title.html">hc_title</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Most elected MPs of {party}"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_subtitle.html">hc_subtitle</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://glue.tidyverse.org/reference/glue.html">glue</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_xAxis.html">hc_xAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      categories <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">party_df</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">FullName</span>,</span>
<span>      title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Members of Parliament"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>      labels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>        style <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>fontSize <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"11px"</span>, whiteSpace <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"normal"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>,</span>
<span>        useHTML <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span></span>
<span>      <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_yAxis.html">hc_yAxis</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>text <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Times elected"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_add_series.html">hc_add_series</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span></span>
<span>      name <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Times elected"</span>,</span>
<span>      data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">party_df</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">$</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>,</span>
<span>      color <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">party_color</span></span>
<span>    <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_plotOptions.html">hc_plotOptions</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>bar <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>dataLabels <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/list.html">list</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">TRUE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_tooltip.html">hc_tooltip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>pointFormat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"&lt;b&gt;{point.category}&lt;/b&gt;: {point.y} times elected"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>    <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://jkunst.com/highcharter/reference/hc_legend.html">hc_legend</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>enabled <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="cn" style="color: #8f5902;
background-color: null;
font-style: inherit;">FALSE</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>  <span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># Hides the legend</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</details>
</div>
<p>The visualizations are presented in alphabetical order.</p>
<section id="kke" class="level2"><h2 class="anchored" data-anchor-id="kke">KKE</h2>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb30" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">party_plot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KKE"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#FF6666"</span>, times_elected_min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-3f333ae60914f792faae" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-3f333ae60914f792faae">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar","inverted":true},"title":{"text":"Most elected MPs of KKE"},"yAxis":{"title":{"text":"Times elected"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"bar":{"dataLabels":{"enabled":true}}},"subtitle":{"text":[]},"xAxis":{"categories":["Papariga Alexandra","Kanelli Garyfallia (Liana)","Skyllakos Antonios","Gkiokas Ioannis","Karathanasopoulos Nikolaos","Manolakou Diamanto","Moraitis Nikolaos","Pafilis Athanasios","Skopelitis Stavros"],"title":{"text":"Members of Parliament"},"labels":{"style":{"fontSize":"11px","whiteSpace":"normal"},"useHTML":true}},"series":[{"data":[10,8,7,6,6,6,6,6,5],"name":"Times elected","color":"#FF6666"}],"tooltip":{"pointFormat":"<b>{point.category}<\/b>: {point.y} times elected"},"legend":{"enabled":false}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="nd" class="level2"><h2 class="anchored" data-anchor-id="nd">ND</h2>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb31" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">party_plot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ND"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#0492c2"</span>, times_elected_min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-8948a6dffb490cdd28e9" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-8948a6dffb490cdd28e9">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar","inverted":true},"title":{"text":"Most elected MPs of ND"},"yAxis":{"title":{"text":"Times elected"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"bar":{"dataLabels":{"enabled":true}}},"subtitle":{"text":[]},"xAxis":{"categories":["Karamanlis Konstantinos","Kefalogiannis Emmanouil","Meimarakis Evangelos - Vasileios","Polydoras Vyron","Lampropoulos Ioannis","Basiakos Evangelos","Benaki - Psarouda Anna Evangelou","Samaras Antonios","Sioufas Dimitrios","Tragakis Ioannis"],"title":{"text":"Members of Parliament"},"labels":{"style":{"fontSize":"11px","whiteSpace":"normal"},"useHTML":true}},"series":[{"data":[13,12,12,12,11,10,10,10,10,10],"name":"Times elected","color":"#0492c2"}],"tooltip":{"pointFormat":"<b>{point.category}<\/b>: {point.y} times elected"},"legend":{"enabled":false}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="pasok" class="level2"><h2 class="anchored" data-anchor-id="pasok">PASOK</h2>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb32" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">party_plot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PASOK"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#95bb72"</span>, times_elected_min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">10</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-d75f7e7645534d535806" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-d75f7e7645534d535806">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar","inverted":true},"title":{"text":"Most elected MPs of PASOK"},"yAxis":{"title":{"text":"Times elected"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"bar":{"dataLabels":{"enabled":true}}},"subtitle":{"text":[]},"xAxis":{"categories":["Kaklamanis Apostolos","Papandreou Georgios","Skandalidis Konstantinos","Chrysochoidis Michail","Pagkalos Theodoros","Petsalnikos Philippos","Skoulakis Emmanouil","Venizelos Evangelos"],"title":{"text":"Members of Parliament"},"labels":{"style":{"fontSize":"11px","whiteSpace":"normal"},"useHTML":true}},"series":[{"data":[13,13,12,11,11,10,10,10],"name":"Times elected","color":"#95bb72"}],"tooltip":{"pointFormat":"<b>{point.category}<\/b>: {point.y} times elected"},"legend":{"enabled":false}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section><section id="syriza" class="level2"><h2 class="anchored" data-anchor-id="syriza">SYRIZA</h2>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb33" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">party_plot</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SYRIZA"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#e27bb1"</span>, times_elected_min <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div class="highchart html-widget html-fill-item" id="htmlwidget-81f2899c784d7cbc8f8f" style="width:100%;height:464px;"></div>
<script type="application/json" data-for="htmlwidget-81f2899c784d7cbc8f8f">{"x":{"hc_opts":{"chart":{"reflow":true,"type":"bar","inverted":true},"title":{"text":"Most elected MPs of SYRIZA"},"yAxis":{"title":{"text":"Times elected"}},"credits":{"enabled":false},"exporting":{"enabled":false},"boost":{"enabled":false},"plotOptions":{"series":{"label":{"enabled":false},"turboThreshold":0},"treemap":{"layoutAlgorithm":"squarified"},"bar":{"dataLabels":{"enabled":true}}},"subtitle":{"text":[]},"xAxis":{"categories":["Dragasakis Ioannis","Dritsas Theodoros","Kourakis Anastasios (Tasos)","Kouvelis Fotios - Fanourios","Apostolou Evangelos","Kouroumplis Panagiotis ELEF.","Lafazanis Panagiotis","Syrmalenios Nikolaos","Tsipras Alexios"],"title":{"text":"Members of Parliament"},"labels":{"style":{"fontSize":"11px","whiteSpace":"normal"},"useHTML":true}},"series":[{"data":[9,6,6,6,5,5,5,5,5],"name":"Times elected","color":"#e27bb1"}],"tooltip":{"pointFormat":"<b>{point.category}<\/b>: {point.y} times elected"},"legend":{"enabled":false}},"theme":{"chart":{"backgroundColor":"transparent"},"colors":["#7cb5ec","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"]},"conf_opts":{"global":{"Date":null,"VMLRadialGradientURL":"http =//code.highcharts.com/list(version)/gfx/vml-radial-gradient.png","canvasToolsURL":"http =//code.highcharts.com/list(version)/modules/canvas-tools.js","getTimezoneOffset":null,"timezoneOffset":0,"useUTC":true},"lang":{"contextButtonTitle":"Chart context menu","decimalPoint":".","downloadCSV":"Download CSV","downloadJPEG":"Download JPEG image","downloadPDF":"Download PDF document","downloadPNG":"Download PNG image","downloadSVG":"Download SVG vector image","downloadXLS":"Download XLS","drillUpText":"◁ Back to {series.name}","exitFullscreen":"Exit from full screen","exportData":{"annotationHeader":"Annotations","categoryDatetimeHeader":"DateTime","categoryHeader":"Category"},"hideData":"Hide data table","invalidDate":null,"loading":"Loading...","months":["January","February","March","April","May","June","July","August","September","October","November","December"],"noData":"No data to display","numericSymbolMagnitude":1000,"numericSymbols":["k","M","G","T","P","E"],"printChart":"Print chart","resetZoom":"Reset zoom","resetZoomTitle":"Reset zoom level 1:1","shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"shortWeekdays":["Sat","Sun","Mon","Tue","Wed","Thu","Fri"],"thousandsSep":" ","viewData":"View data table","viewFullscreen":"View in full screen","weekdays":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]}},"type":"chart","fonts":[],"debug":false},"evals":[],"jsHooks":[]}</script>
</div>
</div>
</section></section><section id="most-elected-members-based-per-constituency" class="level1"><h1>Most elected members based per constituency</h1>
<p>So far we have seen :</p>
<ul>
<li>the composition of Greek Parliament</li>
<li>the most elected MPs on national level and</li>
<li>the most elected MPs on party level</li>
</ul>
<p>The last part of my analysis will investigate the most popular MPs on local level (per profecture).</p>
<p>Obviously, the same logic applies to party charts (same processes with minor changes), so the use of a function is almost mandatory (over fifty -50- cases !).</p>
<p>On my previous workflow I used table() function in order to take frequencies. That’s one easy way to go. Although I didn’t figured out to add characteristics from other columns (like party of the MP). Fir that reason I took the decision to use count() instead of table.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb34" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">constituency_freqs</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;-</span> <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">function</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">input_constituency</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">min_times_elected</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">{</span></span>
<span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">cont_df</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">parliament</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Constituency</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">==</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">input_constituency</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/count.html">count</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">FullName</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://dplyr.tidyverse.org/reference/filter.html">filter</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&gt;=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">min_times_elected</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"><a href="https://magrittr.tidyverse.org/reference/pipe.html">%&gt;%</a></span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/as.data.frame.html">as.data.frame</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span>  </span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>data <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">cont_df</span>, <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>x <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/stats/reorder.factor.html">reorder</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">FullName</span>, <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, y <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span>, fill <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">Party</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_bar.html">geom_bar</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>stat <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"identity"</span>,width <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.88</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/scale_manual.html">scale_fill_manual</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>values <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://rdrr.io/r/base/c.html">c</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ANEL"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#bcd2e8"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"INDEPENDENT"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#cccccc"</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"KKE"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">kke_color</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ND"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">nd_color</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"PASOK"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">pasok_color</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"SYRIZA"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">syriza_color</span>,<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"XA"</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#000000"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/geom_text.html">geom_text</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>label<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="va" style="color: #111111;
background-color: null;
font-style: inherit;">n</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span>, hjust <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1.5</span>, vjust<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>, color<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"white"</span>, size<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/ggtheme.html">theme_minimal</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>   <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span>title <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Most elected MPs"</span>,</span>
<span>       subtitle <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">""</span>,</span>
<span>       caption <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Source: stesiam | stesiam.github.io, 2022"</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">+</span></span>
<span>  <span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;"><a href="https://ggplot2.tidyverse.org/reference/coord_flip.html">coord_flip</a></span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span>
<span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">}</span></span></code></pre></div></div>
</details>
</div>
<p>Now I have frequencies and the party for every MP. That will be useful on my diagrams.</p>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb35" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#unique(parliament$Constituency) %&gt;% sort()</span></span></code></pre></div></div>
</details>
</div>
<section id="state" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="state">State</h2>
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb36" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"State"</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-31-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</section><section id="attica" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="attica">Attica</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-2-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-1" aria-controls="tabset-2-1" aria-selected="true" href="">Athens A</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-2" aria-controls="tabset-2-2" aria-selected="false" href="">Athens B</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-3" aria-controls="tabset-2-3" aria-selected="false" href="">Piraeus A</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-4" aria-controls="tabset-2-4" aria-selected="false" href="">Piraeus B</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-2-5-tab" data-bs-toggle="tab" data-bs-target="#tabset-2-5" aria-controls="tabset-2-5" aria-selected="false" href="">Of Attica (rest)</a></li>
</ul>
<div class="tab-content">
<div id="tabset-2-1" class="tab-pane active" aria-labelledby="tabset-2-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb37" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Athens A"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-32-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-2-2" class="tab-pane" aria-labelledby="tabset-2-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb38" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Athens B"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">7</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-33-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-2-3" class="tab-pane" aria-labelledby="tabset-2-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb39" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Piraeus A"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-34-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-2-4" class="tab-pane" aria-labelledby="tabset-2-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb40" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Piraeus B"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-35-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-2-5" class="tab-pane" aria-labelledby="tabset-2-5-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb41" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Of Attica (rest)"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-36-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="central-greece" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="central-greece">Central Greece</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-3-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-1" aria-controls="tabset-3-1" aria-selected="true" href="">Viotia</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-2" aria-controls="tabset-3-2" aria-selected="false" href="">Evrytania</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-3" aria-controls="tabset-3-3" aria-selected="false" href="">Fokida</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-3-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-3-4" aria-controls="tabset-3-4" aria-selected="false" href="">Fthiotida</a></li>
</ul>
<div class="tab-content">
<div id="tabset-3-1" class="tab-pane active" aria-labelledby="tabset-3-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb42" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Viotia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-37-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-3-2" class="tab-pane" aria-labelledby="tabset-3-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb43" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Evrytania"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-38-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-3-3" class="tab-pane" aria-labelledby="tabset-3-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb44" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Fokida"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-39-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-3-4" class="tab-pane" aria-labelledby="tabset-3-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb45" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Fthiotida"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-40-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="central-macedonia" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="central-macedonia">Central Macedonia</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-4-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-1" aria-controls="tabset-4-1" aria-selected="true" href="">Thessaloniki A</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-4-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-2" aria-controls="tabset-4-2" aria-selected="false" href="">Thessaloniki B</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-4-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-3" aria-controls="tabset-4-3" aria-selected="false" href="">Kilkis</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-4-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-4" aria-controls="tabset-4-4" aria-selected="false" href="">Pella</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-4-5-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-5" aria-controls="tabset-4-5" aria-selected="false" href="">Pieria</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-4-6-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-6" aria-controls="tabset-4-6" aria-selected="false" href="">Serres</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-4-7-tab" data-bs-toggle="tab" data-bs-target="#tabset-4-7" aria-controls="tabset-4-7" aria-selected="false" href="">Halkidiki</a></li>
</ul>
<div class="tab-content">
<div id="tabset-4-1" class="tab-pane active" aria-labelledby="tabset-4-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb46" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Thessaloniki A"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-41-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-4-2" class="tab-pane" aria-labelledby="tabset-4-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb47" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Thessaloniki B"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">6</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-42-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-4-3" class="tab-pane" aria-labelledby="tabset-4-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb48" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Kilkis"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-43-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-4-4" class="tab-pane" aria-labelledby="tabset-4-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb49" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Pella"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-44-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-4-5" class="tab-pane" aria-labelledby="tabset-4-5-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb50" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Pieria"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-45-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-4-6" class="tab-pane" aria-labelledby="tabset-4-6-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb51" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Serres"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-46-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-4-7" class="tab-pane" aria-labelledby="tabset-4-7-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb52" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Halkidiki"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-47-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="crete" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="crete">Crete</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-5-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-5-1" aria-controls="tabset-5-1" aria-selected="true" href="">Chania</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-5-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-5-2" aria-controls="tabset-5-2" aria-selected="false" href="">Heraklion</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-5-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-5-3" aria-controls="tabset-5-3" aria-selected="false" href="">Lasithi</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-5-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-5-4" aria-controls="tabset-5-4" aria-selected="false" href="">Rethymno</a></li>
</ul>
<div class="tab-content">
<div id="tabset-5-1" class="tab-pane active" aria-labelledby="tabset-5-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb53" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Chania"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-48-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-5-2" class="tab-pane" aria-labelledby="tabset-5-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb54" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#constituency_freqs("Irakleio",3)</span></span></code></pre></div></div>
</details>
</div>
</div>
<div id="tabset-5-3" class="tab-pane" aria-labelledby="tabset-5-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb55" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lasithi"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-50-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-5-4" class="tab-pane" aria-labelledby="tabset-5-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb56" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Rethymno"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-51-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="eastern-macedonia-and-thrace" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="eastern-macedonia-and-thrace">Eastern Macedonia and Thrace</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-6-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-6-1" aria-controls="tabset-6-1" aria-selected="true" href="">Drama</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-6-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-6-2" aria-controls="tabset-6-2" aria-selected="false" href="">Evros</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-6-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-6-3" aria-controls="tabset-6-3" aria-selected="false" href="">Kavala</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-6-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-6-4" aria-controls="tabset-6-4" aria-selected="false" href="">Xanthi</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-6-5-tab" data-bs-toggle="tab" data-bs-target="#tabset-6-5" aria-controls="tabset-6-5" aria-selected="false" href="">Rodopi</a></li>
</ul>
<div class="tab-content">
<div id="tabset-6-1" class="tab-pane active" aria-labelledby="tabset-6-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb57" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Drama"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-52-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-6-2" class="tab-pane" aria-labelledby="tabset-6-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb58" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Evros"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-53-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-6-3" class="tab-pane" aria-labelledby="tabset-6-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb59" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Kavala"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-54-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-6-4" class="tab-pane" aria-labelledby="tabset-6-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb60" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Xanthi"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-55-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-6-5" class="tab-pane" aria-labelledby="tabset-6-5-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb61" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Rodopi"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-56-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="epirus" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="epirus">Epirus</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-7-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-7-1" aria-controls="tabset-7-1" aria-selected="true" href="">Arta</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-7-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-7-2" aria-controls="tabset-7-2" aria-selected="false" href="">Ioannina</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-7-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-7-3" aria-controls="tabset-7-3" aria-selected="false" href="">Preveza</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-7-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-7-4" aria-controls="tabset-7-4" aria-selected="false" href="">Thesprotia</a></li>
</ul>
<div class="tab-content">
<div id="tabset-7-1" class="tab-pane active" aria-labelledby="tabset-7-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb62" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Arta"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-57-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-7-2" class="tab-pane" aria-labelledby="tabset-7-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb63" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ioannina"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">4</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-58-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-7-3" class="tab-pane" aria-labelledby="tabset-7-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb64" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Preveza"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-59-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-7-4" class="tab-pane" aria-labelledby="tabset-7-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb65" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Thesprotia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-60-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="ionian-islands" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="ionian-islands">Ionian Islands</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-8-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-8-1" aria-controls="tabset-8-1" aria-selected="true" href="">Corfu</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-8-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-8-2" aria-controls="tabset-8-2" aria-selected="false" href="">Kefallonia</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-8-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-8-3" aria-controls="tabset-8-3" aria-selected="false" href="">Lefkada</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-8-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-8-4" aria-controls="tabset-8-4" aria-selected="false" href="">Zakynthos</a></li>
</ul>
<div class="tab-content">
<div id="tabset-8-1" class="tab-pane active" aria-labelledby="tabset-8-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb66" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Corfu"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-61-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-8-2" class="tab-pane" aria-labelledby="tabset-8-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb67" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Kefallonia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-62-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-8-3" class="tab-pane" aria-labelledby="tabset-8-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb68" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lefkada"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-63-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-8-4" class="tab-pane" aria-labelledby="tabset-8-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb69" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Zakynthos"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-64-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="north-aegean" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="north-aegean">North Aegean</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-9-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-9-1" aria-controls="tabset-9-1" aria-selected="true" href="">Chios</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-9-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-9-2" aria-controls="tabset-9-2" aria-selected="false" href="">Lesvos</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-9-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-9-3" aria-controls="tabset-9-3" aria-selected="false" href="">Samos</a></li>
</ul>
<div class="tab-content">
<div id="tabset-9-1" class="tab-pane active" aria-labelledby="tabset-9-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb70" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Chios"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-65-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-9-2" class="tab-pane" aria-labelledby="tabset-9-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb71" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lesvos"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-66-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-9-3" class="tab-pane" aria-labelledby="tabset-9-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb72" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Samos"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-67-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="peloponnese" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="peloponnese">Peloponnese</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-10-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-10-1" aria-controls="tabset-10-1" aria-selected="true" href="">Argolida</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-10-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-10-2" aria-controls="tabset-10-2" aria-selected="false" href="">Arkadia</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-10-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-10-3" aria-controls="tabset-10-3" aria-selected="false" href="">Korinthia</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-10-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-10-4" aria-controls="tabset-10-4" aria-selected="false" href="">Lakonia</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-10-5-tab" data-bs-toggle="tab" data-bs-target="#tabset-10-5" aria-controls="tabset-10-5" aria-selected="false" href="">Messinia</a></li>
</ul>
<div class="tab-content">
<div id="tabset-10-1" class="tab-pane active" aria-labelledby="tabset-10-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb73" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Argolida"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-68-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-10-2" class="tab-pane" aria-labelledby="tabset-10-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb74" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Arcadia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-69-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-10-3" class="tab-pane" aria-labelledby="tabset-10-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb75" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Korinthia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-70-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-10-4" class="tab-pane" aria-labelledby="tabset-10-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb76" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Lakonia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-71-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-10-5" class="tab-pane" aria-labelledby="tabset-10-5-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb77" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Messinia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-72-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="south-aegean" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="south-aegean">South Aegean</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-11-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-11-1" aria-controls="tabset-11-1" aria-selected="true" href="">Dodecanese Islands</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-11-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-11-2" aria-controls="tabset-11-2" aria-selected="false" href="">Cyclades</a></li>
</ul>
<div class="tab-content">
<div id="tabset-11-1" class="tab-pane active" aria-labelledby="tabset-11-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb78" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Dodecanese Islands"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-73-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-11-2" class="tab-pane" aria-labelledby="tabset-11-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb79" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Cyclades"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-74-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="thessaly" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="thessaly">Thessaly</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-12-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-12-1" aria-controls="tabset-12-1" aria-selected="true" href="">Karditsa</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-12-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-12-2" aria-controls="tabset-12-2" aria-selected="false" href="">Larissa</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-12-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-12-3" aria-controls="tabset-12-3" aria-selected="false" href="">Magnesia</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-12-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-12-4" aria-controls="tabset-12-4" aria-selected="false" href="">Trikala</a></li>
</ul>
<div class="tab-content">
<div id="tabset-12-1" class="tab-pane active" aria-labelledby="tabset-12-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb80" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Karditsa"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-75-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-12-2" class="tab-pane" aria-labelledby="tabset-12-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb81" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Larissa"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-76-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-12-3" class="tab-pane" aria-labelledby="tabset-12-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb82" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Magnesia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-77-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-12-4" class="tab-pane" aria-labelledby="tabset-12-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb83" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Trikala"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-78-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="western-greece" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="western-greece">Western Greece</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-13-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-13-1" aria-controls="tabset-13-1" aria-selected="true" href="">Achaia</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-13-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-13-2" aria-controls="tabset-13-2" aria-selected="false" href="">Aitoloakarnania</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-13-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-13-3" aria-controls="tabset-13-3" aria-selected="false" href="">Ileia</a></li>
</ul>
<div class="tab-content">
<div id="tabset-13-1" class="tab-pane active" aria-labelledby="tabset-13-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb84" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Achaia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-79-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-13-2" class="tab-pane" aria-labelledby="tabset-13-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb85" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">#constituency_freqs("Aitoloakarnania",3)</span></span></code></pre></div></div>
</details>
</div>
</div>
<div id="tabset-13-3" class="tab-pane" aria-labelledby="tabset-13-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb86" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Ileia"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-81-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section><section id="western-macedonia" class="level2 unlisted"><h2 class="unlisted anchored" data-anchor-id="western-macedonia">Western Macedonia</h2>
<div class="tabset-margin-container"></div><div class="panel-tabset">
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" id="tabset-14-1-tab" data-bs-toggle="tab" data-bs-target="#tabset-14-1" aria-controls="tabset-14-1" aria-selected="true" href="">Florina</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-14-2-tab" data-bs-toggle="tab" data-bs-target="#tabset-14-2" aria-controls="tabset-14-2" aria-selected="false" href="">Grevena</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-14-3-tab" data-bs-toggle="tab" data-bs-target="#tabset-14-3" aria-controls="tabset-14-3" aria-selected="false" href="">Kastoria</a></li>
<li class="nav-item"><a class="nav-link" id="tabset-14-4-tab" data-bs-toggle="tab" data-bs-target="#tabset-14-4" aria-controls="tabset-14-4" aria-selected="false" href="">Kozani</a></li>
</ul>
<div class="tab-content">
<div id="tabset-14-1" class="tab-pane active" aria-labelledby="tabset-14-1-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb87" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Florina"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-82-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-14-2" class="tab-pane" aria-labelledby="tabset-14-2-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb88" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Grevena"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-83-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-14-3" class="tab-pane" aria-labelledby="tabset-14-3-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb89" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Kastoria"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-84-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
<div id="tabset-14-4" class="tab-pane" aria-labelledby="tabset-14-4-tab">
<div class="cell">
<details class="code-fold"><summary>Show the code</summary><div class="code-copy-outer-scaffold"><div class="sourceCode" id="cb90" style="background: #f1f3f5;"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu" style="color: #4758AB;
background-color: null;
font-style: inherit;">constituency_freqs</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">(</span><span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"Kozani"</span>,<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3</span><span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">)</span></span></code></pre></div></div>
</details><div class="cell-output-display">
<div>
<figure class="figure"><p><img src="https://stesiam.com/posts/eda-greek-parliament/index_files/figure-html/unnamed-chunk-85-1.png" class="img-fluid figure-img" width="672"></p>
</figure>
</div>
</div>
</div>
</div>
</div>
</div>
</section></section><div id="quarto-appendix" class="default"><section id="acknowledgments" class="level1 appendix"><h2 class="anchored quarto-appendix-heading">Acknowledgments</h2><div class="quarto-appendix-contents">
<p>Image by <a href="https://pixabay.com/users/leonhard_niederwimmer-1131094/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7402132">Leonhard Niederwimmer</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7402132">Pixabay</a> <br></p>
<p>Data are from <a href="https://github.com/stesiam/Greek-MPs-Dataset">mine repository on GitHub</a>. Original data are from <a href="https://www.hellenicparliament.gr"> Hellenic’s Parliament website</a></p>



</div></section><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0" data-line-spacing="2">
<div id="ref-lubridate2011" class="csl-entry">
Grolemund, G., &amp; Wickham, H. (2011). Dates and times made easy with <span class="nocase">lubridate</span>. <em>Journal of Statistical Software</em>, <em>40</em>(3), 1–25. Retrieved from <a href="https://www.jstatsoft.org/v40/i03/">https://www.jstatsoft.org/v40/i03/</a>
</div>
<div id="ref-R-glue" class="csl-entry">
Hester, J., &amp; Bryan, J. (2024). <em>Glue: Interpreted string literals</em>. Retrieved from <a href="https://glue.tidyverse.org/">https://glue.tidyverse.org/</a>
</div>
<div id="ref-R-highcharter" class="csl-entry">
Kunst, J. (2022). <em>Highcharter: A wrapper for the highcharts library</em>. Retrieved from <a href="https://jkunst.com/highcharter/">https://jkunst.com/highcharter/</a>
</div>
<div id="ref-R-reactable" class="csl-entry">
Lin, G. (2025). <em>Reactable: Interactive data tables for r</em>. Retrieved from <a href="https://glin.github.io/reactable/">https://glin.github.io/reactable/</a>
</div>
<div id="ref-R-tibble" class="csl-entry">
Müller, K., &amp; Wickham, H. (2026). <em>Tibble: Simple data frames</em>. Retrieved from <a href="https://tibble.tidyverse.org/">https://tibble.tidyverse.org/</a>
</div>
<div id="ref-R-base" class="csl-entry">
R Core Team. (2025). <em>R: A language and environment for statistical computing</em>. Vienna, Austria: R Foundation for Statistical Computing. Retrieved from <a href="https://www.R-project.org/">https://www.R-project.org/</a>
</div>
<div id="ref-R-lubridate" class="csl-entry">
Spinu, V., Grolemund, G., &amp; Wickham, H. (2024). <em>Lubridate: Make dealing with dates a little easier</em>. Retrieved from <a href="https://lubridate.tidyverse.org">https://lubridate.tidyverse.org</a>
</div>
<div id="ref-R-ggpol" class="csl-entry">
Tiedemann, F. (2020). <em>Ggpol: Visualizing social science data with ggplot2</em>. Retrieved from <a href="https://github.com/erocoar/ggpol">https://github.com/erocoar/ggpol</a>
</div>
<div id="ref-ggplot22016" class="csl-entry">
Wickham, H. (2016). <em>ggplot2: Elegant graphics for data analysis</em>. Springer-Verlag New York. Retrieved from <a href="https://ggplot2.tidyverse.org">https://ggplot2.tidyverse.org</a>
</div>
<div id="ref-R-tidyverse" class="csl-entry">
Wickham, H. (2023). <em>Tidyverse: Easily install and load the tidyverse</em>. Retrieved from <a href="https://tidyverse.tidyverse.org">https://tidyverse.tidyverse.org</a>
</div>
<div id="ref-R-forcats" class="csl-entry">
Wickham, H. (2025a). <em>Forcats: Tools for working with categorical variables (factors)</em>. Retrieved from <a href="https://forcats.tidyverse.org/">https://forcats.tidyverse.org/</a>
</div>
<div id="ref-R-stringr" class="csl-entry">
Wickham, H. (2025b). <em>Stringr: Simple, consistent wrappers for common string operations</em>. Retrieved from <a href="https://stringr.tidyverse.org">https://stringr.tidyverse.org</a>
</div>
<div id="ref-tidyverse2019" class="csl-entry">
Wickham, H., Averick, M., Bryan, J., Chang, W., McGowan, L. D., François, R., … Yutani, H. (2019). Welcome to the <span class="nocase">tidyverse</span>. <em>Journal of Open Source Software</em>, <em>4</em>(43), 1686. <a href="https://doi.org/10.21105/joss.01686">https://doi.org/10.21105/joss.01686</a>
</div>
<div id="ref-R-ggplot2" class="csl-entry">
Wickham, H., Chang, W., Henry, L., Pedersen, T. L., Takahashi, K., Wilke, C., … van den Brand, T. (2025). <em>ggplot2: Create elegant data visualisations using the grammar of graphics</em>. Retrieved from <a href="https://ggplot2.tidyverse.org">https://ggplot2.tidyverse.org</a>
</div>
<div id="ref-R-dplyr" class="csl-entry">
Wickham, H., François, R., Henry, L., Müller, K., &amp; Vaughan, D. (2023). <em>Dplyr: A grammar of data manipulation</em>. Retrieved from <a href="https://dplyr.tidyverse.org">https://dplyr.tidyverse.org</a>
</div>
<div id="ref-R-purrr" class="csl-entry">
Wickham, H., &amp; Henry, L. (2026). <em>Purrr: Functional programming tools</em>. Retrieved from <a href="https://purrr.tidyverse.org/">https://purrr.tidyverse.org/</a>
</div>
<div id="ref-R-readr" class="csl-entry">
Wickham, H., Hester, J., &amp; Bryan, J. (2025). <em>Readr: Read rectangular text data</em>. Retrieved from <a href="https://readr.tidyverse.org">https://readr.tidyverse.org</a>
</div>
<div id="ref-R-tidyr" class="csl-entry">
Wickham, H., Vaughan, D., &amp; Girlich, M. (2025). <em>Tidyr: Tidy messy data</em>. Retrieved from <a href="https://tidyr.tidyverse.org">https://tidyr.tidyverse.org</a>
</div>
<div id="ref-R-ggtext" class="csl-entry">
Wilke, C. O., &amp; Wiernik, B. M. (2022). <em>Ggtext: Improved text rendering support for ggplot2</em>. Retrieved from <a href="https://wilkelab.org/ggtext/">https://wilkelab.org/ggtext/</a>
</div>
<div id="ref-R-kableExtra" class="csl-entry">
Zhu, H. (2024). <em>kableExtra: Construct complex table with kable and pipe syntax</em>. Retrieved from <a href="http://haozhu233.github.io/kableExtra/">http://haozhu233.github.io/kableExtra/</a>
</div>
</div></section><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{2022,
  author = {, stesiam},
  title = {EDA on {Greek} {Parliament}},
  date = {2022-10-10},
  url = {https://stesiam.com/posts/eda-greek-parliament/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-2022" class="csl-entry quarto-appendix-citeas">
stesiam. (2022, October 10). EDA on Greek Parliament. Retrieved from <a href="https://stesiam.com/posts/eda-greek-parliament/">https://stesiam.com/posts/eda-greek-parliament/</a>
</div></div></section></div> ]]></description>
  <category>R</category>
  <category>EDA</category>
  <guid>https://stesiam.com/posts/eda-greek-parliament/</guid>
  <pubDate>Mon, 10 Oct 2022 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/eda-greek-parliament/images/houses-of-parliament.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>List of Quarto Websites</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/list-of-quarto-sites/</link>
  <description><![CDATA[ <section id="introduction" class="level2 page-columns page-full"><h2 class="anchored" data-anchor-id="introduction">Introduction</h2>
<div class="callout callout-style-default callout-note callout-titled">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon"></i>
</div>
<div class="callout-title-container flex-fill">
Note
</div>
</div>
<div class="callout-body-container callout-body">
<p>I have decided to also maintain this list as a project on the corresponding <i class="bi bi-github"></i> <a href="https://github.com/stesiam/Quarto-Websites">GitHub Repo page</a></p>
</div>
</div>
<p>At the time of writing, Quarto has surpassed other website-building packages in popularity (3.4k <i class="bi bi-star-fill"></i> stars), compared to packages like <a href="https://github.com/rstudio/blogdown">blogdown</a> (1.7k <i class="bi bi-star-fill"></i>) and <a href="https://github.com/rstudio/distill">distill</a> (400 <i class="bi bi-star-fill"></i>). Given Quarto’s growing popularity, I took the initiative to compile a list of websites built with it. This way, data analysts who use other site-building methods (e.g., distill, blogdown) will have the chance to see what a Quarto website can do. Additionally, this catalogue may also help those who have already added Quarto to their toolkit, as they can draw inspiration from a centralised collection of relevant examples.</p>

<div class="no-row-height column-margin column-container"><div class="">
<center>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><img src="https://stesiam.com/posts/list-of-quarto-sites/quarto.png" class="img-fluid figure-img"></p>
<figcaption>Quarto logo</figcaption></figure>
</div>
</center>
</div></div><p>Unfortunately, as is probably already obvious, this list cannot possibly include every Quarto website. For the most part, these are sites I have come across and liked. If you know of another site, or even your own, feel free to leave a comment or send me a message and I will add it as soon as possible.</p>
</section><section id="inspiration" class="level2 page-columns page-full"><h2 class="anchored" data-anchor-id="inspiration">Inspiration</h2>
<p>A few years earlier I decided to build a website so I would have a single place to showcase my projects rather than having them scattered across various repositories on GitHub. So I tried several solutions that needed to support Rmd files (R Markdown files). I ended up using <a href="https://github.com/rstudio/distill">distill</a>, and I genuinely loved it, as the website combined simplicity with elements that made it look quite professional. Despite whatever issues it had (many of which were later resolved by Quarto), I was quite satisfied. However, at that time I was a beginner programmer with fairly limited knowledge of HTML and CSS. This meant I could only make minimal modifications, and even those would take me a very long time. During the same period I discovered a website that catalogued <a href="[Distill websites together](https://distillery.rbind.io/showcase.html)">Distill websites</a>. That list helped me:</p>

<div class="no-row-height column-margin column-container"><div class="">
<center>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><img src="https://stesiam.com/posts/first-article/images/distill.png" height="100" class="figure-img"></p>
<figcaption>Distill logo</figcaption></figure>
</div>
</center>
</div></div><ul>
<li>Understand the capabilities and limitations of <a href="https://github.com/rstudio/distill">distill</a> package</li>
<li>Find motivation to get started by drawing inspiration from other people’s sites</li>
<li>Easily access interesting site features alongside their corresponding source code</li>
</ul>
<p>In 2022, <a href="https://posit.co/blog/announcing-quarto-a-new-scientific-and-technical-publishing-system/">Quarto was announced</a> and the landscape of writing and publishing articles, reports, and websites changed considerably. Several Distill users decided to make the switch and are already using Quarto for their personal websites (based on the Distill website list). Some may still be hesitant about this change, since Quarto is fairly new and there may be significant issues that haven’t been resolved yet. Another factor is the time required to learn how to use it, given that its <a href="https://quarto.org/docs/guide/">documentation</a> is particularly extensive. This is precisely why I believe this list is important: to make Quarto more accessible to new users and to encourage existing users to adopt new features.</p>

<div class="no-row-height column-margin column-container"><div class="">
<center>
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><img src="https://stesiam.com/posts/first-article/images/blogdown.png" height="100" class="figure-img"></p>
<figcaption>blogdown logo</figcaption></figure>
</div>
</center>
</div></div></section><section id="list-of-quarto-sites" class="level2"><h2 class="anchored" data-anchor-id="list-of-quarto-sites">List of Quarto Sites</h2>
<p>An indicative list of websites using Quarto is as follows:</p>
<div id="tbl-quarto-sites" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-tbl figure"><figcaption class="quarto-float-caption-top quarto-float-caption quarto-float-tbl" id="tbl-quarto-sites-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Table&nbsp;1: List of Quarto Websites
</figcaption><div aria-describedby="tbl-quarto-sites-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<table class="caption-top table">
<colgroup>
<col style="width: 33%">
<col style="width: 33%">
<col style="width: 33%">
</colgroup>
<thead><tr class="header">
<th style="text-align: center;">
 &nbsp; User</th>
<th style="text-align: center;">
 &nbsp; Website URL</th>
<th style="text-align: center;">
 &nbsp; Repository</th>
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/aeturrell" target="_blank">aeturell</a></td>
<td style="text-align: center;"><a href="https://www.aeturrell.com" target="_blank">aeturrell.com</a></td>
<td style="text-align: center;"><a href="https://github.com/aeturrell/home" target="_blank">home</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/alexpghayes" target="_blank">alexpghayes</a></td>
<td style="text-align: center;"><a href="https://www.alexpghayes.com/" target="_blank">alexpghayes.com</a></td>
<td style="text-align: center;"><a href="https://github.com/alexpghayes/quarto-blog" target="_blank">quarto-blog</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/almeidasilvaf" target="_blank">almeidasilvaf</a></td>
<td style="text-align: center;"><a href="https://almeidasilvaf.github.io/" target="_blank">almeidasilvaf.github.io/</a></td>
<td style="text-align: center;"><a href="https://github.com/almeidasilvaf/almeidasilvaf.github.io" target="_blank">almeidasilvaf.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/andreashandel" target="_blank">andreashandel</a></td>
<td style="text-align: center;"><a href="https://www.andreashandel.com/" target="_blank">andreashandel.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/andreashandel/andreashandelwebsite" target="_blank">andreashandelwebsite</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/andrewheiss" target="_blank">andrewheiss</a></td>
<td style="text-align: center;"><a href="https://www.andrewheiss.com/" target="_blank">andrewheiss.com</a></td>
<td style="text-align: center;"><a href="https://github.com/andrewheiss/ath-quarto" target="_blank">ath-quarto</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/andrewheiss" target="_blank">andrewheiss</a></td>
<td style="text-align: center;"><a href="https://nonprofitf22.classes.andrewheiss.com/" target="_blank">nonprofitf22.classes.andrewheiss.com</a></td>
<td style="text-align: center;"><a href="https://github.com/andrewheiss/nonprofitf22.classes.andrewheiss.com" target="_blank">nonprofitf22.classes.andrewheiss.com</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/aster-hu" target="_blank">aster-hu</a></td>
<td style="text-align: center;"><a href="https://asterhu.com/" target="_blank">asterhu.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/aster-hu/Asteroid_Blog" target="_blank">Asteroid_Blog</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/beatrizmilz" target="_blank">beatrizmilz</a></td>
<td style="text-align: center;"><a href="https://beamilz.com/" target="_blank">beamilz.com</a></td>
<td style="text-align: center;"><a href="https://github.com/beatrizmilz/blog-en/" target="_blank">blog-en</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/Bioconductor" target="_blank">Bioconductor</a></td>
<td style="text-align: center;"><a href="https://bioconductor.github.io/biocblog/" target="_blank">bioconductor.github.io/biocblog/</a></td>
<td style="text-align: center;"><a href="https://github.com/bioconductor/biocblog" target="_blank">biocblog</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/cgoo4" target="_blank">cgoo4</a></td>
<td style="text-align: center;"><a href="https://www.quantumjitter.com/" target="_blank">quantumjitter.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/cgoo4/quantumjitter" target="_blank">quantumjitter</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/CrumpLab" target="_blank">CrumpLab</a></td>
<td style="text-align: center;"><a href="https://crumplab.com/" target="_blank">crumplab.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/CrumpLab/CrumpLab.github.io" target="_blank">CrumpLab.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/currocam" target="_blank">currocam</a></td>
<td style="text-align: center;"><a href="https://currocam.github.io/" target="_blank">currocam.github.io/biocblog/</a></td>
<td style="text-align: center;"><a href="https://github.com/currocam/currocam.github.io" target="_blank">currocam.github.io</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/cynthiahqy" target="_blank">cynthiahqy</a></td>
<td style="text-align: center;"><a href="https://cynthiahqy.com/" target="_blank">cynthiahqy.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/cynthiahqy/digital-garden" target="_blank">digital-garden</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/daxkellie" target="_blank">daxkellie</a></td>
<td style="text-align: center;"><a href="https://daxkellie.com/" target="_blank">daxkellie.com</a></td>
<td style="text-align: center;"><a href="https://github.com/daxkellie/website-quarto" target="_blank">website-quarto</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/ddimmery" target="_blank">ddimmery</a></td>
<td style="text-align: center;"><a href="https://ddimmery.com/" target="_blank">ddimmery.com</a></td>
<td style="text-align: center;"><a href="https://github.com/ddimmery/quarto-website" target="_blank">quarto-website</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/djnavarro" target="_blank">djnavarro</a></td>
<td style="text-align: center;"><a href="blog.djnavarro.net/" target="_blank">blog.djnavarro.net/</a></td>
<td style="text-align: center;"><a href="https://github.com/djnavarro/quarto-blog" target="_blank">quarto-blog</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/drganghe" target="_blank">drganghe</a></td>
<td style="text-align: center;"><a href="https://drganghe.github.io/" target="_blank">drganghe.github.io</a></td>
<td style="text-align: center;"><a href="https://github.com/drganghe/drganghe.github.io" target="_blank">drganghe.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/ekholme" target="_blank">ekholme</a></td>
<td style="text-align: center;"><a href="https://www.ericekholm.com/" target="_blank">ericekholm.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/ekholme/ee-quarto-site" target="_blank">ee-quarto-site</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/EllaKaye" target="_blank">EllaKaye</a></td>
<td style="text-align: center;"><a href="https://ellakaye.co.uk/" target="_blank">ellakaye.co.uk/</a></td>
<td style="text-align: center;"><a href="https://github.com/EllaKaye/ellakaye.co.uk" target="_blank">ellakaye.co.uk </a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/EmilHvitfeldt" target="_blank">EmilHvitfeldt</a></td>
<td style="text-align: center;"><a href="https://emilhvitfeldt.com/" target="_blank">emilhvitfeldt.com</a></td>
<td style="text-align: center;"><a href="https://github.com/EmilHvitfeldt/emilhvitfeldt.com" target="_blank">emilhvitfeldt.com</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/epiforecasts" target="_blank">epiforecasts</a></td>
<td style="text-align: center;"><a href="https://epiforecasts.io/" target="_blank">epiforecasts.io/</a></td>
<td style="text-align: center;"><a href="https://github.com/epiforecasts/epiforecasts.github.io" target="_blank">epiforecasts.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/fusionet24" target="_blank">fusionet24</a></td>
<td style="text-align: center;"><a href="https://www.myyearindata.com/" target="_blank">myyearindata.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/fusionet24/myyearindata" target="_blank">myyearindata </a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/ivelasq" target="_blank">ivelasq</a></td>
<td style="text-align: center;"><a href="https://ivelasq.rbind.io/" target="_blank">ivelasq.rbind.io</a></td>
<td style="text-align: center;"><a href="https://github.com/ivelasq/pipedream" target="_blank">pipedream</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/JavOrraca" target="_blank">JavOrraca</a></td>
<td style="text-align: center;"><a href="https://www.javierorracadeatcu.com/" target="_blank">javierorracadeatcu.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/JavOrraca/quarto-blog" target="_blank">quarto-blog </a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/jbkunst" target="_blank">jbkunst</a></td>
<td style="text-align: center;"><a href="https://jkunst.com/blog/" target="_blank">jkunst.com/blog/</a></td>
<td style="text-align: center;"><a href="https://github.com/jbkunst/blog" target="_blank">blog</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/jessesadler" target="_blank">jessesadler</a></td>
<td style="text-align: center;"><a href="https://www.jessesadler.com/" target="_blank">jessesadler.com</a></td>
<td style="text-align: center;"><a href="https://github.com/jessesadler/quarto-blog" target="_blank">quarto-blog</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/jeweljohnsonj" target="_blank">jeweljohnsonj</a></td>
<td style="text-align: center;"><a href="https://sciquest.netlify.app/" target="_blank">sciquest.netlify.app//</a></td>
<td style="text-align: center;"><a href="https://github.com/jeweljohnsonj/SciQuest" target="_blank">SciQuest</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/jhelvy" target="_blank">jhelvy</a></td>
<td style="text-align: center;"><a href="https://www.jhelvy.com" target="_blank">jhelvy.com</a></td>
<td style="text-align: center;"><a href="https://github.com/jhelvy/jhelvy_quarto" target="_blank">jhelvy_quarto</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/joelnitta" target="_blank">joelnitta</a></td>
<td style="text-align: center;"><a href="https://www.joelnitta.com/" target="_blank">joelnitta.com</a></td>
<td style="text-align: center;"><a href="https://github.com/joelnitta/joelnitta-home" target="_blank">joelnitta-home</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/journalovi" target="_blank">journalovi</a></td>
<td style="text-align: center;"><a href="https://www.journalovi.org/" target="_blank">journalovi.org</a></td>
<td style="text-align: center;"><a href="https://github.com/journalovi/journalovi.github.io" target="_blank">journalovi.github.io</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/jthomasmock" target="_blank">jthomasmock</a></td>
<td style="text-align: center;"><a href="https://themockup.blog/" target="_blank">TheMockup.blog</a></td>
<td style="text-align: center;"><a href="https://github.com/jthomasmock/themockup-blog" target="_blank">themockup-blog</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/kathoffman" target="_blank">kathoffman</a></td>
<td style="text-align: center;"><a href="https://www.khstats.com/" target="_blank">khstats.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/kathoffman/khstats-quarto" target="_blank">khstats-quarto</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/kelly-sovacool" target="_blank">kelly-sovacool</a></td>
<td style="text-align: center;"><a href="https://sovacool.dev/" target="_blank">sovacool.dev//</a></td>
<td style="text-align: center;"><a href="https://github.com/kelly-sovacool/kelly-sovacool.github.io" target="_blank">kelly-sovacool.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/kurianbenoy" target="_blank">kurianbenoy</a></td>
<td style="text-align: center;"><a href="https://kurianbenoy.com/" target="_blank">kurianbenoy.com</a></td>
<td style="text-align: center;"><a href="https://github.com/kurianbenoy/kurianbenoy-website" target="_blank">kurianbenoy-website</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/magsol" target="_blank">magsol</a></td>
<td style="text-align: center;"><a href="http://magsol.github.io/" target="_blank">magsol.github.io/</a></td>
<td style="text-align: center;"><a href="https://github.com/magsol/magsol.github.io" target="_blank">magsol.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/marioangst" target="_blank">marioangst</a></td>
<td style="text-align: center;"><a href="https://marioangst.com/en/" target="_blank">marioangst.com/en/</a></td>
<td style="text-align: center;">–</td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/markusschanta" target="_blank">markusschanta</a></td>
<td style="text-align: center;"><a href="https://blog.markus.schanta.at/" target="_blank">blog.markus.schanta.at/</a></td>
<td style="text-align: center;"><a href="https://github.com/markusschanta/blog" target="_blank">blog</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/marvinschmitt" target="_blank">marvinschmitt</a></td>
<td style="text-align: center;"><a href="https://www.marvinschmitt.com/" target="_blank">marvinschmitt.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/marvinschmitt/marvinschmitt-dot-com" target="_blank">marvinschmitt-dot-com</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/matherion" target="_blank">matherion</a></td>
<td style="text-align: center;"><a href="https://behaviorchange.eu/" target="_blank">behaviorchange.eu/</a></td>
<td style="text-align: center;"><a href="https://gitlab.com/matherion/personal-website" target="_blank">personal-website</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/maxdrohde" target="_blank">maxdrohde</a></td>
<td style="text-align: center;"><a href="https://maximilianrohde.com/" target="_blank">maximilianrohde.com</a></td>
<td style="text-align: center;"><a href="https://github.com/maxdrohde/blog_quarto" target="_blank">blog_quarto</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/mcanouil" target="_blank">mcanouil</a></td>
<td style="text-align: center;"><a href="https://mickael.canouil.fr/" target="_blank">mickael.canouil.fr/</a></td>
<td style="text-align: center;"><a href="https://github.com/mcanouil/mickael.canouil.fr" target="_blank">mickael.canouil.fr</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/mdsumner" target="_blank">mdsumner</a></td>
<td style="text-align: center;"><a href="https://www.hypertidy.org/" target="_blank">hypertidy.org</a></td>
<td style="text-align: center;"><a href="https://github.com/mdsumner/quarto-blog" target="_blank">quarto-blog</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/Meghansaha" target="_blank">Meghansaha</a></td>
<td style="text-align: center;"><a href="https://thetidytrekker.com/" target="_blank">thetidytrekker.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/Meghansaha/thetidytrekker-quarto" target="_blank">thetidytrekker-quarto</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/mine-cetinkaya-rundel" target="_blank">mine-cetinkaya-rundel</a></td>
<td style="text-align: center;"><a href="https://mine-cetinkaya-rundel.github.io/quarto-tip-a-day/" target="_blank">A Quarto tip a day</a></td>
<td style="text-align: center;"><a href="https://github.com/mine-cetinkaya-rundel/quarto-tip-a-day" target="_blank">quarto-tip-a-day</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/miriamheiss" target="_blank">miriamheiss</a></td>
<td style="text-align: center;"><a href="https://www.miriamheiss.com/" target="_blank">miriamheiss.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/miriamheiss/miriam-blog" target="_blank">miriam-blog</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/mmhamdy" target="_blank">mmhamdy</a></td>
<td style="text-align: center;"><a href="https://hypothesis-space.netlify.app/" target="_blank">hypothesis-space.netlify.app/</a></td>
<td style="text-align: center;"><a href="https://github.com/mmhamdy/Hypothesis-Space" target="_blank">Hypothesis-Space</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/njlyon0" target="_blank">njlyon0</a></td>
<td style="text-align: center;"><a href="https://njlyon0.github.io/" target="_blank">njlyon0.github.io</a></td>
<td style="text-align: center;"><a href="https://github.com/njlyon0/njlyon0.github.io" target="_blank">njlyon0.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/nucleic-acid" target="_blank">nucleic-acid</a></td>
<td style="text-align: center;"><a href="https://jollydata.blog/" target="_blank">jollydata.blog</a></td>
<td style="text-align: center;"><a href="https://github.com/nucleic-acid/quarto-blog" target="_blank">quarto-blog</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/numbats" target="_blank">numbats</a></td>
<td style="text-align: center;"><a href="https://numbat.space/" target="_blank">numbat.space/</a></td>
<td style="text-align: center;"><a href="https://github.com/numbats/numbats-quarto-website" target="_blank">numbats-quarto-website</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/Openscapes" target="_blank">Openscapes</a></td>
<td style="text-align: center;"><a href="https://openscapes.github.io/quarto-website-tutorial/" target="_blank">openscapes.github.io/quarto-website-tutorial/</a></td>
<td style="text-align: center;"><a href="https://github.com/Openscapes/quarto-website-tutorial" target="_blank">quarto-website-tutorial</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/pat-alt" target="_blank">pat-alt</a></td>
<td style="text-align: center;"><a href="https://www.paltmeyer.com/" target="_blank">paltmeyer.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/pat-alt/pat-alt.github.io" target="_blank">pat-alt.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/paul-buerkner" target="_blank">paul-buerkner</a></td>
<td style="text-align: center;"><a href="https://paul-buerkner.github.io/" target="_blank">paul-buerkner.github.io/</a></td>
<td style="text-align: center;"><a href="https://github.com/paul-buerkner/paul-buerkner.github.io" target="_blank">paul-buerkner.github.io</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/pkollenda" target="_blank">pkollenda</a></td>
<td style="text-align: center;"><a href="https://www.philippkollenda.com/" target="_blank">philippkollenda.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/pkollenda/Website" target="_blank">Website</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/Possible-Institute" target="_blank">Possible-Institute</a></td>
<td style="text-align: center;"><a href="https://possible.institute/" target="_blank">possible.institute</a></td>
<td style="text-align: center;"><a href="https://github.com/Possible-Institute/website" target="_blank">website</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/quarto-dev%20%20" target="_blank">quarto-dev</a></td>
<td style="text-align: center;"><a href="https://quarto.org/" target="_blank">quarto.org</a></td>
<td style="text-align: center;"><a href="https://github.com/quarto-dev/quarto-web" target="_blank">quarto-web</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/rlbarter" target="_blank">rlbarter</a></td>
<td style="text-align: center;"><a href="https://www.rebeccabarter.com/" target="_blank">rebeccabarter.com</a></td>
<td style="text-align: center;"><a href="https://github.com/rlbarter/personal-website-quarto" target="_blank">personal-website-quarto</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/robertmitchellv" target="_blank">robertmitchellv</a></td>
<td style="text-align: center;"><a href="https://robertmitchellv.com/" target="_blank">robertmitchellv.com</a></td>
<td style="text-align: center;"><a href="https://github.com/robertmitchellv/robertmitchellv.github.io" target="_blank">robertmitchellv.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/robjhyndman" target="_blank">robjhyndman</a></td>
<td style="text-align: center;"><a href="https://robjhyndman.com/" target="_blank">robjhyndman.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/robjhyndman/robjhyndman.com" target="_blank">robjhyndman.com</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/rsangole" target="_blank">rsangole</a></td>
<td style="text-align: center;"><a href="https://rsangole.netlify.app/" target="_blank">rsangole.netlify.app/</a></td>
<td style="text-align: center;"><a href="https://github.com/rsangole/blog" target="_blank">blog</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/samanthacsik" target="_blank">samanthacsik</a></td>
<td style="text-align: center;"><a href="https://samanthacsik.github.io/" target="_blank">samanthacsik.github.io/</a></td>
<td style="text-align: center;"><a href="https://github.com/samanthacsik/samanthacsik.github.io" target="_blank">samanthacsik.github.io</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/seeM" target="_blank">seeM</a></td>
<td style="text-align: center;"><a href="https://wasimlorgat.com/" target="_blank">wasimlorgat.com</a></td>
<td style="text-align: center;"><a href="https://github.com/seeM/blog" target="_blank">blog</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/shamindras" target="_blank">shamindras</a></td>
<td style="text-align: center;"><a href="https://www.shamindras.com/" target="_blank">shamindras.com</a></td>
<td style="text-align: center;"><a href="https://github.com/shamindras/ss_personal_distill_blog" target="_blank">ss_personal_distill_blog</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/srvanderplas" target="_blank">srvanderplas</a></td>
<td style="text-align: center;"><a href="https://srvanderplas.github.io/" target="_blank">srvanderplas.github.io/</a></td>
<td style="text-align: center;"><a href="https://github.com/srvanderplas/srvanderplas.github.io" target="_blank">srvanderplas.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/StefanThoma" target="_blank">StefanThoma</a></td>
<td style="text-align: center;"><a href="https://stefanthoma.github.io/quarto-blog/" target="_blank">stefanthoma.github.io/quarto-blog/</a></td>
<td style="text-align: center;"><a href="https://github.com/StefanThoma/quarto-blog" target="_blank">quarto-blog</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/stesiam" target="_blank">stesiam</a></td>
<td style="text-align: center;"><a href="https://www.stesiam.com/" target="_blank">stesiam.com</a></td>
<td style="text-align: center;"><a href="https://github.com/stesiam/stesiam.github.io" target="_blank">stesiam.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/tidymodels" target="_blank">tidymodels</a></td>
<td style="text-align: center;"><a href="https://www.tidymodels.org/" target="_blank">tidymodels.org</a></td>
<td style="text-align: center;"><a href="https://github.com/tidymodels/tidymodels.org" target="_blank">tidymodels.org</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/laderast" target="_blank">laderast</a></td>
<td style="text-align: center;"><a href="https://laderast.github.io/" target="_blank">laderast.github.io/</a></td>
<td style="text-align: center;"><a href="https://github.com/laderast/laderast.github.io" target="_blank">laderast.github.io</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/vbaliga" target="_blank">vbaliga</a></td>
<td style="text-align: center;"><a href="https://vbaliga.github.io/" target="_blank">vbaliga.github.io</a></td>
<td style="text-align: center;"><a href="https://github.com/vbaliga/vbaliga.github.io" target="_blank">vbaliga.github.io</a></td>
</tr>
<tr class="odd">
<td style="text-align: center;"><a href="https://github.com/willingc" target="_blank">willingc</a></td>
<td style="text-align: center;"><a href="https://www.willingconsulting.com/" target="_blank">willingconsulting.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/willingc/willing-consulting-2022" target="_blank">willing-consulting-2022</a></td>
</tr>
<tr class="even">
<td style="text-align: center;"><a href="https://github.com/zekiakyol" target="_blank">zekiakyol</a></td>
<td style="text-align: center;"><a href="https://zekiakyol.com/" target="_blank">zekiakyol.com/</a></td>
<td style="text-align: center;"><a href="https://github.com/zekiakyol/personal-website" target="_blank">personal-website</a></td>
</tr>
</tbody>
</table>
</div>
</figure>
</div>
</section><section id="multilingual-websites" class="level2 page-columns page-full"><h2 class="anchored" data-anchor-id="multilingual-websites">Multilingual Websites</h2>
<p>Unfortunately, Quarto does not natively support the creation of multilingual websites. This can be problematic for those who wish to publish their content in their native language as well, which may differ from English. For now, the solution officially offered by Quarto is through project profiles, but the implementation seems quite complex to me and is barely covered in the relevant <a href="https://quarto.org/docs/projects/profiles.html">documentation</a> for this particular use case. If you are interested in developments regarding multilingual support in Quarto, you can check out the <a href="https://github.com/quarto-dev/quarto-cli/issues/275">discussion on this topic</a> on the project’s GitHub page. As of now, Quarto does not officially support multilingual websites, e-books, and so on in a straightforward manner.</p>

<div class="no-row-height column-margin column-container"><div class="">
<div class="quarto-figure quarto-figure-center">
<figure class="figure"><p><img src="https://stesiam.com/posts/list-of-quarto-sites/ropensci.webp" class="img-fluid figure-img"></p>
<figcaption>Λογότυπο του ROpenSci</figcaption></figure>
</div>
<p><a href="https://ropensci.org/">ROpenSci</a> is a Non-Profit Organisation founded in 2011. The organisation promotes a culture of collaboration in research, where data is openly available and software can be reused, so that research and its results are reliable, transparent, and easily reproducible. ROpenSci has created many important packages for the R language in order to advance its vision, many of which are vital to the R analyst community. Notable examples include <a href="https://docs.ropensci.org/babelquarto/">babelquarto</a>, which enables the creation of multilingual sites with Quarto, and {targets}, which helps organise code execution pipelines. For a full list of packages created and maintained by ROpenSci, you can <a href="https://ropensci.org/packages/all/">click here</a></p>
</div></div><p>Despite the lack of native support, the <a href="https://github.com/ropensci-review-tools/babelquarto">babelquarto</a> R package was created to address this problem and make building multilingual sites more feasible and user-friendly.Some websites have already integrated babelquarto into their workflow and now offer content in multiple languages - one of which is the site you are currently reading. A great example of a multilingual (babelquarto) website (japanese / english) is <a href="https://joelnitta.com/">Joel Nitta’s</a>.</p>
<p>Although there is no official support from Quarto, <a href="https://github.com/ropensci-review-tools/babelquarto">babelquarto</a> was created, an R package that attempts to solve this problem and make the creation of multilingual sites both possible and easy. Several sites have already integrated <a href="https://docs.ropensci.org/babelquarto/">babelquarto</a> into their workflow and now offer content in multiple languages. One of them is the very website you are reading right now! You can find its source code here. Another nice example of a multilingual site (Japanese / English) is that of <a href="https://joelnitta.com/">Joel Nitta</a> and its <a href="https://github.com/joelnitta/joelnitta-home">corresponding repository</a>.</p>
<p>I hope you found all of this interesting and, why not, that it convinced you to build your own Quarto website.</p>


</section><div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-citation"><h2 class="anchored quarto-appendix-heading">Citation</h2><div><div class="quarto-appendix-secondary-label">BibTeX citation:</div><pre class="sourceCode code-with-copy quarto-appendix-bibtex"><code class="sourceCode bibtex">@online{2022,
  author = {, stesiam},
  title = {List of {Quarto} {Websites}},
  date = {2022-08-10},
  url = {https://stesiam.com/posts/list-of-quarto-sites/},
  langid = {en}
}
</code></pre><div class="quarto-appendix-secondary-label">For attribution, please cite this work as:</div><div id="ref-2022" class="csl-entry quarto-appendix-citeas">
stesiam. 2022. <span>“List of Quarto Websites.”</span> August 10, 2022.
<a href="https://stesiam.com/posts/list-of-quarto-sites/">https://stesiam.com/posts/list-of-quarto-sites/</a>.
</div></div></section></div> ]]></description>
  <category>Quarto</category>
  <guid>https://stesiam.com/posts/list-of-quarto-sites/</guid>
  <pubDate>Wed, 10 Aug 2022 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/list-of-quarto-sites/quarto_websites.jpg" medium="image" type="image/jpeg"/>
</item>
<item>
  <title>Hello, Quarto</title>
  <dc:creator>stesiam </dc:creator>
  <link>https://stesiam.com/posts/first-article/</link>
  <description><![CDATA[ 






<section id="hello-quarto" class="level2">
<h2 class="anchored" data-anchor-id="hello-quarto">Hello, Quarto !</h2>
<p>I have finally built my website using <a href="https://quarto.org/">Quarto</a>. Currently, the page is hosted via <i class="fa-brands fa-github" aria-label="github"></i> <a href="https://pages.github.com/">GitHub Pages</a>.</p>
</section>
<section id="how-it-all-started" class="level2 page-columns page-full">
<h2 class="anchored" data-anchor-id="how-it-all-started">How it all started</h2>
<p>My encounter with Statistics was rather accidental. The first time I sat for the Panhellenic exams, I was admitted to the Department of Economics at the University of Peloponnese. Although I liked the idea of studying Economics, the prospect of relocating to another city (Tripoli) posed an enormous financial burden accompanied by great uncertainty, something I simply couldn’t afford. So, I chose to retake the Panhellenic exams the very next year. From what I remember, I had listed Economics and Computer Science departments first, followed by Statistics departments, prioritising those in the Attica region and then the rest of Greece. In the end, when the admission scores were announced, I found out I had been admitted to the Department of Statistics and Insurance Science at the University of Piraeus. Being, then, a student in a Statistics department, I began gaining my first relevant exposure through the university. During the first years of my studies I focused on theory in the fields of Statistics, Probability, Insurance, and Actuarial Science. This gave me a solid theoretical foundation. However, I was missing the most important trait for a Statistician: the ability to put my knowledge into practice and apply the corresponding statistical techniques in real-world settings. The university placed very little emphasis on this aspect. To illustrate, my year’s curriculum included only two courses on applied statistics using statistical software, namely Excel and SPSS. The SPSS course was decent, but it was by no means commensurate with the knowledge I had acquired, nor did it meet the modern demands of the job market. On top of that, SPSS as a piece of software has significant drawbacks that make it a poor choice, including the inability to customise your model, the lack of transparency in how results are produced, and of course its cost. During 2018-2019 I started looking for alternatives, as I absolutely loathed the software, or, to be more precise, the fact that I would have to pay for it. Among other things, I found free alternatives that followed the same logic as SPSS, such as <a href="https://www.gnu.org/software/pspp/">PSPP</a>, <a href="https://jasp-stats.org/">JASP</a>, and <a href="https://www.jamovi.org/">jamovi</a>. Personally, I consider the latter two to be perfectly respectable for simple analyses. In fact, I would recommend JASP and jamovi to anyone as a worthy alternative if they lacked programming skills and had no access to SPSS. It was around that time that I discovered there is a programming language focused on data analysis, R (also known by the hashtag #rstats).</p>

<div class="no-row-height column-margin column-container"><div class="">
<p><img src="https://stesiam.com/posts/first-article/images/stud_id_new.webp" class="img-fluid" alt="My student ID"> My student ID from the Statistics department in Piraeus. I may no longer look like the kid in the photo, but this is indeed my ID. The kid in that picture doesn’t know it yet, but some serious storms are heading his way in a few years, though things will get better (hopefully).</p>
</div></div></section>
<section id="from-spss-to-r" class="level2 page-columns page-full">
<h2 class="anchored" data-anchor-id="from-spss-to-r">From SPSS to R</h2>

<div class="no-row-height column-margin column-container"><div class="">
<p>Our university, like many universities around the world, offers its students free licences for various software. The problem is that the subscription expires as soon as you graduate.</p>
</div></div><p>Transitioning from a statistical suite to a programming language can be a traumatic experience, especially if it’s your first programming language. SPSS and its free alternatives accompanied me for a respectable period of time; however, the very defining strength of these applications gradually began turning into a weakness. These programs are designed so that individuals with basic knowledge and understanding of Statistics can carry out their own analyses. As I progressed through my studies, I kept learning more methodologies and techniques, until at some point I realised that these “ready-made” tools could only take me so far. They are undoubtedly useful, but they impose a ceiling on how deeply the user needs, or is allowed, to think. For anything beyond that ceiling, they either ignore it entirely because it’s considered too complex for the majority, or they adopt reasonable assumptions based on the data so that the average user doesn’t have to deal with theory or hypothesis testing. Where exactly that ceiling lies varies from application to application: some choose to be extremely simple and do a few things well for the everyday user (e.g., Excel), while others offer more options with greater complexity (e.g., SPSS, JASP, Weka). All of them, however, have their own limitations. As I worked with such software, I kept wondering what I would do if I wanted to set different parameters or apply a variation of a test I had read about in a recently published paper. That’s when I realised that, by continuing down this path, I would end up serving the software rather than my own purpose. My goal was clearly to master my Science, not a program or a statistical software suite. So, I decided to make the big switch.</p>
</section>
<section id="first-steps" class="level2 page-columns page-full">
<h2 class="anchored" data-anchor-id="first-steps">First steps</h2>
<p>My relationship with R began in 2018, with quite a few ups and downs. I can say that at first it felt peculiar, and for the most part I used it almost mechanically. In short, I was copying code and simply trying to understand what I was doing. To expose myself even further: if I wanted to check whether differences were statistically significant, I would Google it. Due to its idiosyncrasies as a language, I used it more as an analysis tool than as a programming language. My first uses of R involved some basic statistical tests, and I was impressed that I could now use a tool with theoretically unlimited capabilities compared to the “ready-made” programs. The whole journey, of course, was particularly interesting and involved many late nights. Despite all that, after countless error messages, I started to notice my gradual improvement. And I still hadn’t grasped what a good decision I had made, as I was unaware of the full extent of its capabilities. Over time, I discovered that you could create your own plots with the <code>{ggplot2}</code> package, and I was thrilled (admittedly a bit more than normal) when I learned that the BBC and the Financial Times use <code>{ggplot2}</code> to produce their impressive graphics. I then learned about other capabilities as well, the most notable being the creation of web applications and dashboards with the <code>{Shiny}</code> package, where the range of possibilities extended well beyond Statistics. Around the same time, I discovered Kaggle, a website dedicated to data science. I found it to be an incredibly useful platform, and that’s where I started publishing various notebook-articles, charts, and generally experimenting with R. Looking back today, after several years, my charts were abysmal, but back then I would look at them and feel proud. At least over time I improved, and I now have the self-awareness to admit that they were indeed terrible 😀. If you ask nicely, I might even upload one or two so you can see how clueless I was back then and we can all have a good laugh. Kaggle was extremely valuable. I learned a tremendous amount, and there were people working at major corporations who published solutions to real-world problems. To this day, competitions are posted and many share their solutions. The only problem is that Python gradually took over, and as a result the vast majority of content now covers only Python. This caused the R user community to shrink, with fewer and fewer R articles being published or being replaced by Python equivalents. Because of that, I made an interesting decision…</p>

<div class="no-row-height column-margin column-container"><div class="">
<p><img src="https://stesiam.com/posts/first-article/images/Rlogo.svg" class="img-fluid" alt="Logo of R programming language"> The R language is a programming language that specializes in data analysis and statistics. It was created in 1993 by Ross Ihaka and Robert Gentleman.</p>
</div></div></section>
<section id="out-of-platform" class="level2">
<h2 class="anchored" data-anchor-id="out-of-platform">Out of platform</h2>
<p>A few years ago I decided to build my own website so I could host my articles myself. First, I had to decide how to create it. There were many options, and I experimented with various approaches and tools. One solution would have been a conventional website built with WordPress, but that would have been costly since I would need to host it on a server and cover the associated expenses (roughly $10/month) for a decent and secure VPS plan. That wasn’t worth it. Being the cheapskate that I am, I looked for a more affordable way, and as it turns out, there is one. During that period I discovered static websites and the fact that a blog doesn’t actually need a server. Examples include Hugo with the help of the {blogdown} package and {distill}, which were decent solutions but came with significant issues. On the one hand, Hugo is built on a language I don’t know (Go), so if I wanted to make changes or add new functionality it would have been impossible. Moreover, my previous site, built with Distill, wasn’t mobile-friendly (non-responsive), as it would hide the menu button on small screens. Quarto solved many of the problems these two approaches had, and nowadays a great many people use it for their websites. Yes, Quarto still has some shortcomings compared to other established site-building frameworks (e.g., Astro), but right now it’s the best option for anyone working in analysis languages (R, Python, Julia) who wants to publish articles based on their work. Its main advantage, in my opinion, is the ability to execute an analysis file and export it directly as an article. If I were using another static site builder like Astro, I would have to run my code separately each time, paste the results or charts into the site, and rebuild, which would make the whole process unproductive.</p>
<div id="fig-website-R-packages" class="quarto-layout-panel">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-website-R-packages-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div class="quarto-layout-row">
<div class="quarto-layout-cell-subref quarto-layout-cell" data-ref-parent="fig-website-R-packages" style="flex-basis: 50.0%;justify-content: flex-start;">
<div id="fig-distill-logo" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-subfloat-fig figure">
<div aria-describedby="fig-distill-logo-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="https://stesiam.com/posts/first-article/images/distill.png" data-ref-parent="fig-website-R-packages" height="200" class="figure-img">
</div>
<figcaption class="quarto-float-caption-bottom quarto-subfloat-caption quarto-subfloat-fig" id="fig-distill-logo-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
(a) Distill logo
</figcaption>
</figure>
</div>
</div>
<div class="quarto-layout-cell-subref quarto-layout-cell" data-ref-parent="fig-website-R-packages" style="flex-basis: 50.0%;justify-content: flex-start;">
<div id="fig-blogdown-logo" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-subfloat-fig figure">
<div aria-describedby="fig-blogdown-logo-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<img src="https://stesiam.com/posts/first-article/images/blogdown.png" data-ref-parent="fig-website-R-packages" height="200" class="figure-img">
</div>
<figcaption class="quarto-float-caption-bottom quarto-subfloat-caption quarto-subfloat-fig" id="fig-blogdown-logo-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
(b) Blogdown logo
</figcaption>
</figure>
</div>
</div>
</div>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-website-R-packages-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;1: R Packages for building websites with R (before Quarto)
</figcaption>
</figure>
</div>
</section>
<section id="website-goals" class="level2">
<h2 class="anchored" data-anchor-id="website-goals">Website goals</h2>
<p>Since this is my first article on the website, I’d like to lay out my goals for it. So, here’s what I plan to do:</p>
<ul>
<li>Write articles and carry out machine learning analyses (using R and Python)</li>
<li>Publish explanatory articles (e.g., “How to make your Quarto site” etc.)</li>
<li>Showcase my activities / projects (mainly my <code>{Shiny}</code> applications, etc.)</li>
<li>Publish material and articles in Greek, since there isn’t a large audience in Greece and I want that to change</li>
<li>Solve exam papers, or at least similar exercises, using R</li>
<li>And much more …, so stay tuned!</li>
</ul>

</section>

<div id="quarto-appendix" class="default"><section id="acknowledgments" class="level3 appendix"><h2 class="anchored quarto-appendix-heading">Acknowledgments</h2><div class="quarto-appendix-contents">

<p>Image by <a href="https://pixabay.com/users/rebeck96-819254/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=760358">R. E. Beck</a> from <a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=760358">Pixabay</a></p>



</div></section><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent" data-entry-spacing="0" data-line-spacing="2">
<div id="ref-Allaire_Quarto_2022" class="csl-entry">
Allaire, J. J., Teague, C., Scheidegger, C., Xie, Y., &amp; Dervieux, C. (2022). <em><span>Quarto</span></em>. <a href="https://doi.org/10.5281/zenodo.5960048">https://doi.org/10.5281/zenodo.5960048</a>
</div>
<div id="ref-distill2022" class="csl-entry">
Dervieux, C., Allaire, J., Iannone, R., Presmanes Hill, A., &amp; Xie, Y. (2022). <em>Distill: ’R markdown’ format for scientific and technical writing</em>. Retrieved from <a href="https://CRAN.R-project.org/package=distill">https://CRAN.R-project.org/package=distill</a>
</div>
<div id="ref-blogdown2022" class="csl-entry">
Xie, Y., Dervieux, C., &amp; Hill, A. P. (2022). <em>Blogdown: Create blogs and websites with r markdown</em>. Retrieved from <a href="https://github.com/rstudio/blogdown">https://github.com/rstudio/blogdown</a>
</div>
</div></section></div> ]]></description>
  <category>General</category>
  <guid>https://stesiam.com/posts/first-article/</guid>
  <pubDate>Wed, 27 Jul 2022 00:00:00 GMT</pubDate>
  <media:content url="https://stesiam.com/posts/first-article/welcome_sign.jpg" medium="image" type="image/jpeg"/>
</item>
</channel>
</rss>
