bedarfsanalyse/00-exploration.html

569 lines
42 KiB
HTML
Raw Normal View History

2022-08-22 12:18:44 +02:00
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.0.38">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Local-IT Bedarfsanalyse</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<script src="00-exploration_files/libs/clipboard/clipboard.min.js"></script>
<script src="00-exploration_files/libs/quarto-html/quarto.js"></script>
<script src="00-exploration_files/libs/quarto-html/popper.min.js"></script>
<script src="00-exploration_files/libs/quarto-html/tippy.umd.min.js"></script>
<script src="00-exploration_files/libs/quarto-html/anchor.min.js"></script>
<link href="00-exploration_files/libs/quarto-html/tippy.css" rel="stylesheet">
<link href="00-exploration_files/libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="00-exploration_files/libs/bootstrap/bootstrap.min.js"></script>
<link href="00-exploration_files/libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="00-exploration_files/libs/bootstrap/bootstrap.min.css" rel="stylesheet" id="quarto-bootstrap" data-mode="light">
</head>
<body class="fullcontent">
<div id="quarto-content" class="page-columns page-rows-contents page-layout-article">
<main class="content" id="quarto-document-content">
<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title">Local-IT Bedarfsanalyse</h1>
</div>
<div class="quarto-title-meta">
</div>
</header>
<section id="analyse" class="level1">
<h1>Analyse</h1>
<details>
<summary>
Datenbereinigung
</summary>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Datenbereinigung </span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(tidyverse)</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(janitor)</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a>survey_raw <span class="ot">&lt;-</span> readr<span class="sc">::</span><span class="fu">read_rds</span>(here<span class="sc">::</span><span class="fu">here</span>(<span class="st">"data"</span>, <span class="st">"processed"</span>, <span class="st">"survey_with_labels.rds"</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
</div>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb2"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>survey <span class="ot">&lt;-</span> survey_raw <span class="sc">%&gt;%</span> </span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">mutate</span>(</span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a> <span class="co"># G1Q06_SQ001 = ehrenamtlich engagiert fix missings</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a> <span class="at">G1Q06_SQ001 =</span> <span class="fu">case_when</span>(<span class="fu">is.na</span>(G1Q06_SQ001) <span class="sc">&amp;</span> G1Q04 <span class="sc">==</span> <span class="st">"Keine"</span> <span class="sc">~</span> <span class="st">"Ja"</span>,</span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a> <span class="cn">TRUE</span> <span class="sc">~</span> <span class="fu">as.character</span>(G1Q06_SQ001)</span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a> ),</span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a> <span class="co"># G1Q06_SQ002 = hauptamtlich engagiert fix missings</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a> <span class="at">G1Q06_SQ002 =</span> <span class="fu">case_when</span>(<span class="fu">is.na</span>(G1Q06_SQ002) <span class="sc">&amp;</span> G1Q04 <span class="sc">==</span> <span class="st">"Keine"</span> <span class="sc">~</span> <span class="st">"Nicht gewählt"</span>,</span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a> <span class="cn">TRUE</span> <span class="sc">~</span> <span class="fu">as.character</span>(G1Q06_SQ002)</span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a> ),</span>
<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a> <span class="at">G1Q06_SQ001 =</span> <span class="fu">as_factor</span>(G1Q06_SQ001),</span>
<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a> <span class="at">G1Q06_SQ002 =</span> <span class="fu">as_factor</span>(G1Q06_SQ002),</span>
<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a> <span class="co"># generate one variable that combines the multiple choice information about the role of the respondent </span></span>
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a> <span class="at">role_respondent =</span> <span class="fu">case_when</span>(</span>
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a> <span class="co"># decision: Teilnehmende die beide Rollen angegeben haben werden zu hauptamtlich gezählt (es sind nur 6 und eine binary Variable ist besser geeignet für Gruppenvergleiche)</span></span>
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a> G1Q06_SQ001 <span class="sc">==</span> <span class="st">"Ja"</span> <span class="sc">&amp;</span> G1Q06_SQ002 <span class="sc">==</span> <span class="st">"Ja"</span> <span class="sc">~</span> <span class="st">"ehrenamtlich"</span>, </span>
<span id="cb2-17"><a href="#cb2-17" aria-hidden="true" tabindex="-1"></a> G1Q06_SQ001 <span class="sc">==</span> <span class="st">"Ja"</span> <span class="sc">~</span> <span class="st">"ehrenamtlich"</span>,</span>
<span id="cb2-18"><a href="#cb2-18" aria-hidden="true" tabindex="-1"></a> G1Q06_SQ002 <span class="sc">==</span> <span class="st">"Ja"</span> <span class="sc">~</span> <span class="st">"hauptamlich"</span>,</span>
<span id="cb2-19"><a href="#cb2-19" aria-hidden="true" tabindex="-1"></a> <span class="co"># decision: Teilnehmende die keine der Kategorien angegeben haben werden zu NA anstatt eine vierte Kategorie "keine" einzuführen, da das wahrcheinlich nicht von Interesse ist.</span></span>
<span id="cb2-20"><a href="#cb2-20" aria-hidden="true" tabindex="-1"></a> G1Q06_SQ001 <span class="sc">==</span> <span class="st">"Nicht gewählt"</span> <span class="sc">&amp;</span> G1Q06_SQ002 <span class="sc">==</span> <span class="st">"Nicht gewählt"</span> <span class="sc">~</span> <span class="cn">NA_character_</span>,</span>
<span id="cb2-21"><a href="#cb2-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">is.na</span>(G1Q06_SQ001) <span class="sc">&amp;</span> <span class="fu">is.na</span>(G1Q06_SQ002) <span class="sc">~</span> <span class="cn">NA_character_</span>,</span>
<span id="cb2-22"><a href="#cb2-22" aria-hidden="true" tabindex="-1"></a> <span class="cn">TRUE</span> <span class="sc">~</span> <span class="st">"error"</span>)</span>
<span id="cb2-23"><a href="#cb2-23" aria-hidden="true" tabindex="-1"></a> )</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
</div>
<section id="g1q06_sq001-filter" class="level2">
<h2 class="anchored" data-anchor-id="g1q06_sq001-filter">G1Q06_SQ001 filter</h2>
<p>Wir sind daran interessiert zu wissen, ob die Teilnehmenden selbst ehrenamtlich, hauptamtlich oder in beiden Positionen arbeiten. Diese Information findet sich in der Frage <code>G1Q06</code>: “Welche Rolle(n) haben sie in der Organisation. Die Filterführung des Fragebogens hat allerdings dazu geführt, dass Personen die angegeben haben, dass in ihrer Organisation keine hauptamtlichen Mitarbeiten vorhanden, sind die <code>G1Q06</code> Frage nicht bekommen haben, da schon klar ist, dass sie dann ehrenamtlich sind. Dadurch haben sie momentan Missings auf den Variablen die zur <code>G1Q06</code> Frage gehören. Die logische Verbindung zwischen <code>G1Q04</code> und <code>G1Q06</code> wollen wir also im Nachhinein recoden.</p>
<div class="cell" data-inlcude="false">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>survey_raw <span class="sc">%&gt;%</span> <span class="fu">tabyl</span>(G1Q04, G1Q06_SQ001)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stdout">
<pre><code> G1Q04 Ja Nicht gewählt NA_
Keine 0 0 36
&lt; 5 10 22 0
5-10 9 16 0
11-50 2 29 0
&gt; 50 5 21 0
&lt;NA&gt; 0 8 26</code></pre>
</div>
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="co">#TODO wurde der Filter auch für G1Q05 gesetzt? Sieht nicht so aus ()</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>survey_raw <span class="sc">%&gt;%</span> <span class="fu">tabyl</span>(G1Q05, G1Q06_SQ002)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stdout">
<pre><code> G1Q05 Ja Nicht gewählt NA_
Keine 7 0 1
&lt; 5 9 0 5
5 - 10 10 8 15
11 - 50 26 4 10
&gt; 50 41 8 5
&lt;NA&gt; 1 8 26</code></pre>
</div>
</div>
<p>36 Personen haben angegeben, dass sich keine Hauptamtlichen in der Org. befinden -&gt; die wollen wir recodieren</p>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>survey <span class="sc">%&gt;%</span> <span class="fu">tabyl</span>(G1Q06_SQ001, G1Q06_SQ002)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stdout">
<pre><code> G1Q06_SQ001 Ja Nicht gewählt NA_
Ja 6 56 0
Nicht gewählt 88 8 0
&lt;NA&gt; 0 0 26</code></pre>
</div>
</div>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb9"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>testthat<span class="sc">::</span><span class="fu">expect_equal</span>(survey <span class="sc">%&gt;%</span> <span class="fu">filter</span>(role_respondent <span class="sc">==</span> <span class="st">"error"</span>) <span class="sc">%&gt;%</span> <span class="fu">nrow</span>(), <span class="dv">0</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
</div>
</section></details>
</section>
<section id="stichprobe" class="level1">
<h1>Stichprobe</h1>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb10"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="co"># </span><span class="al">TODO</span><span class="co">: Analyse der Missings (wie weit sind Fragebögen ausgefuellt? schmeißen wir sie alle weg?)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
</div>
<section id="rolle-der-befragten-personen" class="level2">
<h2 class="anchored" data-anchor-id="rolle-der-befragten-personen">Rolle der befragten Personen</h2>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb11"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a>survey <span class="sc">%&gt;%</span> <span class="fu">count</span>(role_respondent)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stdout">
<pre><code> role_respondent n
1 ehrenamtlich 62
2 hauptamlich 88
3 &lt;NA&gt; 34</code></pre>
</div>
</div>
</section>
<section id="anzahl-hauptamtlicher-und-ehrenamtlicher" class="level2">
<h2 class="anchored" data-anchor-id="anzahl-hauptamtlicher-und-ehrenamtlicher">Anzahl Hauptamtlicher und Ehrenamtlicher</h2>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb13"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="co"># facet wrap plot: beide Fragen haben die gleiche Skala</span></span>
<span id="cb13-2"><a href="#cb13-2" aria-hidden="true" tabindex="-1"></a>tmp_long <span class="ot">&lt;-</span> survey <span class="sc">%&gt;%</span> </span>
<span id="cb13-3"><a href="#cb13-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">select</span>(id, G1Q05, G1Q04) <span class="sc">%&gt;%</span> </span>
<span id="cb13-4"><a href="#cb13-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">pivot_longer</span>(<span class="sc">-</span>id, <span class="at">names_to =</span> <span class="st">"var"</span>, <span class="at">values_to =</span> <span class="st">"value"</span>)</span>
<span id="cb13-5"><a href="#cb13-5" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb13-6"><a href="#cb13-6" aria-hidden="true" tabindex="-1"></a>tmp_long <span class="sc">%&gt;%</span> </span>
<span id="cb13-7"><a href="#cb13-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">ggplot</span>(<span class="fu">aes</span>(<span class="at">x =</span> value)) <span class="sc">+</span></span>
<span id="cb13-8"><a href="#cb13-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_bar</span>()<span class="sc">+</span></span>
<span id="cb13-9"><a href="#cb13-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">facet_wrap</span>(<span class="sc">~</span>var)<span class="sc">+</span></span>
<span id="cb13-10"><a href="#cb13-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">caption =</span> <span class="st">"G1Q04 Anzahl Hauptamtlicher</span><span class="sc">\n</span><span class="st">G1Q05 Anzahl Ehrenamtlicher"</span>, </span>
<span id="cb13-11"><a href="#cb13-11" aria-hidden="true" tabindex="-1"></a> <span class="at">title =</span> <span class="st">"Anzahl Hauptamtlicher (G1Q04) </span><span class="sc">\n</span><span class="st"> und Anzahl Ehrenamtlicher (G1Q05)"</span>)<span class="sc">+</span></span>
<span id="cb13-12"><a href="#cb13-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">coord_flip</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<p><img src="00-exploration_files/figure-html/unnamed-chunk-5-1.png" class="img-fluid" width="672"></p>
</div>
</div>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb14"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a>create_dot_plot <span class="ot">&lt;-</span> <span class="cf">function</span>(data, x_var, y_var) {</span>
<span id="cb14-2"><a href="#cb14-2" aria-hidden="true" tabindex="-1"></a> tmp <span class="ot">&lt;-</span> data <span class="sc">%&gt;%</span> </span>
<span id="cb14-3"><a href="#cb14-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">count</span>({{ x_var }}, {{ y_var }}) <span class="sc">%&gt;%</span> </span>
<span id="cb14-4"><a href="#cb14-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">drop_na</span>({{ x_var }}, {{ y_var }})</span>
<span id="cb14-5"><a href="#cb14-5" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb14-6"><a href="#cb14-6" aria-hidden="true" tabindex="-1"></a> x_var_pos <span class="ot">&lt;-</span> <span class="fu">which</span>(<span class="fu">attributes</span>(survey)<span class="sc">$</span>names <span class="sc">==</span> <span class="fu">enexpr</span>(x_var))</span>
<span id="cb14-7"><a href="#cb14-7" aria-hidden="true" tabindex="-1"></a> x_var_lab <span class="ot">&lt;-</span> <span class="fu">attributes</span>(survey)<span class="sc">$</span>variable.labels[x_var_pos] <span class="sc">%&gt;%</span> </span>
<span id="cb14-8"><a href="#cb14-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">str_replace</span>(<span class="at">pattern =</span> <span class="st">"</span><span class="sc">\\</span><span class="st">?.+$"</span>, <span class="at">replacement =</span> <span class="st">"?"</span>) </span>
<span id="cb14-9"><a href="#cb14-9" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb14-10"><a href="#cb14-10" aria-hidden="true" tabindex="-1"></a> y_var_pos <span class="ot">&lt;-</span> <span class="fu">which</span>(<span class="fu">attributes</span>(survey)<span class="sc">$</span>names <span class="sc">==</span> <span class="fu">enexpr</span>(y_var))</span>
<span id="cb14-11"><a href="#cb14-11" aria-hidden="true" tabindex="-1"></a> y_var_lab <span class="ot">&lt;-</span> <span class="fu">attributes</span>(survey)<span class="sc">$</span>variable.labels[y_var_pos] <span class="sc">%&gt;%</span> </span>
<span id="cb14-12"><a href="#cb14-12" aria-hidden="true" tabindex="-1"></a> <span class="fu">str_replace</span>(<span class="at">pattern =</span> <span class="st">"</span><span class="sc">\\</span><span class="st">?.+$"</span>, <span class="at">replacement =</span> <span class="st">"?"</span>) </span>
<span id="cb14-13"><a href="#cb14-13" aria-hidden="true" tabindex="-1"></a> </span>
<span id="cb14-14"><a href="#cb14-14" aria-hidden="true" tabindex="-1"></a> <span class="co"># plot</span></span>
<span id="cb14-15"><a href="#cb14-15" aria-hidden="true" tabindex="-1"></a> <span class="fu">ggplot</span>(tmp) <span class="sc">+</span></span>
<span id="cb14-16"><a href="#cb14-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">aes</span>(<span class="at">x =</span> {{ x_var }},</span>
<span id="cb14-17"><a href="#cb14-17" aria-hidden="true" tabindex="-1"></a> <span class="at">y =</span> {{ y_var }},</span>
<span id="cb14-18"><a href="#cb14-18" aria-hidden="true" tabindex="-1"></a> <span class="at">size =</span> n,</span>
<span id="cb14-19"><a href="#cb14-19" aria-hidden="true" tabindex="-1"></a> <span class="at">label =</span> n) <span class="sc">+</span></span>
<span id="cb14-20"><a href="#cb14-20" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_point</span>() <span class="sc">+</span></span>
<span id="cb14-21"><a href="#cb14-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">caption =</span> glue<span class="sc">::</span><span class="fu">glue</span>(<span class="st">"{enexpr(x_var)}: {x_var_lab} </span><span class="sc">\n</span><span class="st"> {enexpr(y_var)}: {y_var_lab}"</span>)) <span class="sc">+</span></span>
<span id="cb14-22"><a href="#cb14-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">scale_fill_viridis_c</span>() <span class="sc">+</span></span>
<span id="cb14-23"><a href="#cb14-23" aria-hidden="true" tabindex="-1"></a> <span class="fu">theme_minimal</span>()</span>
<span id="cb14-24"><a href="#cb14-24" aria-hidden="true" tabindex="-1"></a>}</span>
<span id="cb14-25"><a href="#cb14-25" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb14-26"><a href="#cb14-26" aria-hidden="true" tabindex="-1"></a><span class="fu">create_dot_plot</span>(survey, G1Q04, G1Q05)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<p><img src="00-exploration_files/figure-html/unnamed-chunk-6-1.png" class="img-fluid" width="672"></p>
</div>
</div>
</section>
</section>
<section id="hypothesen" class="level1">
<h1>Hypothesen</h1>
<ol type="1">
<li>Grundsätzlich</li>
</ol>
<p>Gibt es signifikante Zusammenhänge zwischen - G1Q04 Anzahl Hauptamtlicher - G1Q05 Anzahl Ehrenamtlicher - G5Q04 Bereich (Sport/ Bidung etc) Und allen anderen Fragen.</p>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb15"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a>tmp <span class="ot">&lt;-</span> survey_raw <span class="sc">%&gt;%</span> </span>
<span id="cb15-2"><a href="#cb15-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">count</span>(G1Q05, G1Q04) <span class="sc">%&gt;%</span> </span>
<span id="cb15-3"><a href="#cb15-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">drop_na</span>(G1Q05, G1Q04)</span>
<span id="cb15-4"><a href="#cb15-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb15-5"><a href="#cb15-5" aria-hidden="true" tabindex="-1"></a><span class="fu">ggplot</span>(tmp) <span class="sc">+</span></span>
<span id="cb15-6"><a href="#cb15-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">aes</span>(<span class="at">x =</span> G1Q05, <span class="at">y =</span> G1Q04, <span class="at">fill =</span> n) <span class="sc">+</span></span>
<span id="cb15-7"><a href="#cb15-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_tile</span>(<span class="at">size =</span> <span class="fl">1.2</span>) <span class="sc">+</span></span>
<span id="cb15-8"><a href="#cb15-8" aria-hidden="true" tabindex="-1"></a><span class="fu">labs</span>(<span class="at">y =</span> <span class="st">"Anzahl Hauptamtlicher"</span>, <span class="at">x =</span> <span class="st">"Anzahl Ehrenamtlicher"</span>) <span class="sc">+</span> </span>
<span id="cb15-9"><a href="#cb15-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">scale_fill_viridis_c</span>()<span class="sc">+</span></span>
<span id="cb15-10"><a href="#cb15-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">theme_minimal</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<p><img src="00-exploration_files/figure-html/unnamed-chunk-7-1.png" class="img-fluid" width="672"></p>
</div>
</div>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb16"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ggplot</span>(tmp) <span class="sc">+</span></span>
<span id="cb16-2"><a href="#cb16-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">aes</span>(<span class="at">x =</span> G1Q05, <span class="at">y =</span> G1Q04, <span class="at">size =</span> n) <span class="sc">+</span></span>
<span id="cb16-3"><a href="#cb16-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_point</span>() <span class="sc">+</span></span>
<span id="cb16-4"><a href="#cb16-4" aria-hidden="true" tabindex="-1"></a><span class="fu">labs</span>(<span class="at">y =</span> <span class="st">"Anzahl Hauptamtlicher"</span>, <span class="at">x =</span> <span class="st">"Anzahl Ehrenamtlicher"</span>) <span class="sc">+</span> </span>
<span id="cb16-5"><a href="#cb16-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">scale_fill_viridis_c</span>()<span class="sc">+</span></span>
<span id="cb16-6"><a href="#cb16-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">theme_minimal</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<p><img src="00-exploration_files/figure-html/unnamed-chunk-8-1.png" class="img-fluid" width="672"></p>
</div>
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb17"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a>p <span class="ot">&lt;-</span> survey_raw <span class="sc">%&gt;%</span></span>
<span id="cb17-2"><a href="#cb17-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">count</span>(G4Q02, G1Q04) <span class="sc">%&gt;%</span></span>
<span id="cb17-3"><a href="#cb17-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">drop_na</span>() <span class="sc">%&gt;%</span> </span>
<span id="cb17-4"><a href="#cb17-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">ggplot</span>() <span class="sc">+</span></span>
<span id="cb17-5"><a href="#cb17-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">aes</span>(<span class="at">x =</span> G4Q02, <span class="at">y =</span> G1Q04, <span class="at">size =</span> n) <span class="sc">+</span></span>
<span id="cb17-6"><a href="#cb17-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_point</span>() <span class="sc">+</span></span>
<span id="cb17-7"><a href="#cb17-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">y =</span> <span class="st">"Anzahl Hauptamtlicher"</span>, <span class="at">x =</span> <span class="st">"Nutzung"</span>) <span class="sc">+</span></span>
<span id="cb17-8"><a href="#cb17-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">coord_flip</span>()<span class="sc">+</span></span>
<span id="cb17-9"><a href="#cb17-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">theme_light</span>() </span>
<span id="cb17-10"><a href="#cb17-10" aria-hidden="true" tabindex="-1"></a>p</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<p><img src="00-exploration_files/figure-html/unnamed-chunk-8-2.png" class="img-fluid" width="672"></p>
</div>
</div>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb18"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a>survey_raw <span class="sc">%&gt;%</span> </span>
<span id="cb18-2"><a href="#cb18-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">select</span>(G4Q02, G1Q04) <span class="sc">%&gt;%</span> </span>
<span id="cb18-3"><a href="#cb18-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">drop_na</span>() <span class="sc">%&gt;%</span> </span>
<span id="cb18-4"><a href="#cb18-4" aria-hidden="true" tabindex="-1"></a> janitor<span class="sc">::</span><span class="fu">tabyl</span>(G4Q02, G1Q04) <span class="sc">%&gt;%</span> </span>
<span id="cb18-5"><a href="#cb18-5" aria-hidden="true" tabindex="-1"></a> janitor<span class="sc">::</span><span class="fu">adorn_totals</span>() <span class="sc">%&gt;%</span> </span>
<span id="cb18-6"><a href="#cb18-6" aria-hidden="true" tabindex="-1"></a> janitor<span class="sc">::</span><span class="fu">adorn_percentages</span>() <span class="sc">%&gt;%</span> </span>
<span id="cb18-7"><a href="#cb18-7" aria-hidden="true" tabindex="-1"></a> janitor<span class="sc">::</span><span class="fu">adorn_pct_formatting</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stdout">
<pre><code> G4Q02 Keine &lt; 5 5-10 11-50
nutzen wir in unserer Organisation aktuell 40.5% 21.4% 11.9% 11.9%
haben wir mal genutzt oder ausprobiert 25.0% 18.8% 18.8% 31.2%
nutzen wir nicht in unserer Organisation 15.8% 28.9% 21.1% 18.4%
ich weiß nicht ob wir sie nutzen oder genutzt haben 6.2% 18.8% 6.2% 37.5%
ich kenne den Begriff nicht 0.0% 33.3% 33.3% 33.3%
Total 24.3% 23.5% 15.7% 20.9%
&gt; 50
14.3%
6.2%
15.8%
31.2%
0.0%
15.7%</code></pre>
</div>
</div>
<p>Erklärungsansaetze für Ergebnisse: - Sampling Bias in der Umfrage -</p>
<section id="anzahl-ehrenamtliche" class="level2">
<h2 class="anchored" data-anchor-id="anzahl-ehrenamtliche">Anzahl ehrenamtliche</h2>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb20"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb20-1"><a href="#cb20-1" aria-hidden="true" tabindex="-1"></a>survey_raw <span class="sc">%&gt;%</span></span>
<span id="cb20-2"><a href="#cb20-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">count</span>(G4Q02) <span class="sc">%&gt;%</span></span>
<span id="cb20-3"><a href="#cb20-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">drop_na</span>() <span class="sc">%&gt;%</span> </span>
<span id="cb20-4"><a href="#cb20-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">ggplot</span>(<span class="fu">aes</span>(<span class="at">x =</span> G4Q02, <span class="at">y =</span> n))<span class="sc">+</span></span>
<span id="cb20-5"><a href="#cb20-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_col</span>()<span class="sc">+</span></span>
<span id="cb20-6"><a href="#cb20-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">coord_flip</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<p><img src="00-exploration_files/figure-html/unnamed-chunk-10-1.png" class="img-fluid" width="672"></p>
</div>
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb21"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb21-1"><a href="#cb21-1" aria-hidden="true" tabindex="-1"></a>survey_raw <span class="sc">%&gt;%</span></span>
<span id="cb21-2"><a href="#cb21-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">count</span>(G4Q02, G1Q05) <span class="sc">%&gt;%</span></span>
<span id="cb21-3"><a href="#cb21-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">drop_na</span>() <span class="sc">%&gt;%</span> </span>
<span id="cb21-4"><a href="#cb21-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">ggplot</span>() <span class="sc">+</span></span>
<span id="cb21-5"><a href="#cb21-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">aes</span>(<span class="at">x =</span> G4Q02, <span class="at">y =</span> G1Q05, <span class="at">size =</span> n) <span class="sc">+</span></span>
<span id="cb21-6"><a href="#cb21-6" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_point</span>() <span class="sc">+</span></span>
<span id="cb21-7"><a href="#cb21-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">y =</span> <span class="st">"Anzahl Ehrenamtlicher"</span>, <span class="at">x =</span> <span class="st">"Nutzung"</span>) <span class="sc">+</span></span>
<span id="cb21-8"><a href="#cb21-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">coord_flip</span>()<span class="sc">+</span></span>
<span id="cb21-9"><a href="#cb21-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">theme_minimal</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output-display">
<p><img src="00-exploration_files/figure-html/unnamed-chunk-10-2.png" class="img-fluid" width="672"></p>
</div>
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb22"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb22-1"><a href="#cb22-1" aria-hidden="true" tabindex="-1"></a>survey_raw <span class="sc">%&gt;%</span> </span>
<span id="cb22-2"><a href="#cb22-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">select</span>(G4Q02, G1Q05) <span class="sc">%&gt;%</span> </span>
<span id="cb22-3"><a href="#cb22-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">drop_na</span>() <span class="sc">%&gt;%</span> </span>
<span id="cb22-4"><a href="#cb22-4" aria-hidden="true" tabindex="-1"></a> janitor<span class="sc">::</span><span class="fu">tabyl</span>(G4Q02, G1Q05) <span class="sc">%&gt;%</span> </span>
<span id="cb22-5"><a href="#cb22-5" aria-hidden="true" tabindex="-1"></a> janitor<span class="sc">::</span><span class="fu">adorn_totals</span>() <span class="sc">%&gt;%</span> </span>
<span id="cb22-6"><a href="#cb22-6" aria-hidden="true" tabindex="-1"></a> janitor<span class="sc">::</span><span class="fu">adorn_percentages</span>(<span class="at">denominator =</span> <span class="st">"col"</span>) <span class="sc">%&gt;%</span> </span>
<span id="cb22-7"><a href="#cb22-7" aria-hidden="true" tabindex="-1"></a> janitor<span class="sc">::</span><span class="fu">adorn_pct_formatting</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stdout">
<pre><code> G4Q02 Keine &lt; 5 5 - 10
nutzen wir in unserer Organisation aktuell 33.3% 45.5% 37.0%
haben wir mal genutzt oder ausprobiert 0.0% 0.0% 11.1%
nutzen wir nicht in unserer Organisation 50.0% 36.4% 44.4%
ich weiß nicht ob wir sie nutzen oder genutzt haben 16.7% 18.2% 7.4%
ich kenne den Begriff nicht 0.0% 0.0% 0.0%
Total 100.0% 100.0% 100.0%
11 - 50 &gt; 50
40.7% 30.2%
22.2% 16.3%
25.9% 27.9%
7.4% 20.9%
3.7% 4.7%
100.0% 100.0%</code></pre>
</div>
</div>
<p>Chi-Square Test, um zu sehen, ob zw. den zwei kategorialen Variablen ein signifikanter Zusammenhang besteht:</p>
<div class="cell">
<details>
<summary>Show the code</summary>
<div class="sourceCode cell-code" id="cb24"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb24-1"><a href="#cb24-1" aria-hidden="true" tabindex="-1"></a><span class="fu">chisq.test</span>(survey<span class="sc">$</span>G4Q02, survey<span class="sc">$</span>G1Q05)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</details>
<div class="cell-output cell-output-stderr">
<pre><code>Warning in stats::chisq.test(x, y, ...): Chi-squared approximation may be
incorrect</code></pre>
</div>
<div class="cell-output cell-output-stdout">
<pre><code>
Pearson's Chi-squared test
data: survey$G4Q02 and survey$G1Q05
X-squared = 12.462, df = 16, p-value = 0.7116</code></pre>
</div>
</div>
<p>Werden Cluster sichtbar?</p>
<ol start="2" type="1">
<li>Für welche Organisationen ist SKA interessant? Hypothesen:</li>
<li>Große Organisationen mit vielen Hauptamtlichen und eigenen IT Abteilungen haben kein Interessen an Open Source Lösungen sondern entscheiden sich für bekannte, teure propritäre Tools</li>
<li>Organisationen mit eigenen IT Abteilungen haben Wissen und Kompetenz selbst Open Source Lösungen aufzusetzen (also Zugang) und nutzen sie somit häufiger.</li>
</ol>
<p>G2Q02 Wer kümmert sich um eure digitale Infrastruktur G1Q04 Wie viele hauptamtlich Mitarbeitende hat deine Organisation? In Korrelation zu Bisherige Erfahrung mit Open Source (G4Q02) oder der Wichtigkeit bestimmter Eigenschaften des Tools (G03Q03 und G03Q03b)</p>
</section>
</section>
</main>
<!-- /main column -->
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
const toggleBodyColorMode = (bsSheetEl) => {
const mode = bsSheetEl.getAttribute("data-mode");
const bodyEl = window.document.querySelector("body");
if (mode === "dark") {
bodyEl.classList.add("quarto-dark");
bodyEl.classList.remove("quarto-light");
} else {
bodyEl.classList.add("quarto-light");
bodyEl.classList.remove("quarto-dark");
}
}
const toggleBodyColorPrimary = () => {
const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
if (bsSheetEl) {
toggleBodyColorMode(bsSheetEl);
}
}
toggleBodyColorPrimary();
const icon = "";
const anchorJS = new window.AnchorJS();
anchorJS.options = {
placement: 'right',
icon: icon
};
anchorJS.add('.anchored');
const clipboard = new window.ClipboardJS('.code-copy-button', {
target: function(trigger) {
return trigger.previousElementSibling;
}
});
clipboard.on('success', function(e) {
// button target
const button = e.trigger;
// don't keep focus
button.blur();
// flash "checked"
button.classList.add('code-copy-button-checked');
var currentTitle = button.getAttribute("title");
button.setAttribute("title", "Copied!");
setTimeout(function() {
button.setAttribute("title", currentTitle);
button.classList.remove('code-copy-button-checked');
}, 1000);
// clear code selection
e.clearSelection();
});
function tippyHover(el, contentFn) {
const config = {
allowHTML: true,
content: contentFn,
maxWidth: 500,
delay: 100,
arrow: false,
appendTo: function(el) {
return el.parentElement;
},
interactive: true,
interactiveBorder: 10,
theme: 'quarto',
placement: 'bottom-start'
};
window.tippy(el, config);
}
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
for (var i=0; i<noterefs.length; i++) {
const ref = noterefs[i];
tippyHover(ref, function() {
let href = ref.getAttribute('href');
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
return note.innerHTML;
});
}
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
for (var i=0; i<bibliorefs.length; i++) {
const ref = bibliorefs[i];
const cites = ref.parentNode.getAttribute('data-cites').split(' ');
tippyHover(ref, function() {
var popup = window.document.createElement('div');
cites.forEach(function(cite) {
var citeDiv = window.document.createElement('div');
citeDiv.classList.add('hanging-indent');
citeDiv.classList.add('csl-entry');
var biblioDiv = window.document.getElementById('ref-' + cite);
if (biblioDiv) {
citeDiv.innerHTML = biblioDiv.innerHTML;
}
popup.appendChild(citeDiv);
});
return popup.innerHTML;
});
}
});
</script>
</div> <!-- /content -->
</body></html>