bedarfsanalyse/01-quarto-interactive.html

343 lines
705 KiB
HTML
Raw Permalink 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-0.9.624">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>Untitled</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="01-quarto-interactive_files/libs/clipboard/clipboard.min.js"></script>
<script src="01-quarto-interactive_files/libs/quarto-html/quarto.js"></script>
<script src="01-quarto-interactive_files/libs/quarto-html/popper.min.js"></script>
<script src="01-quarto-interactive_files/libs/quarto-html/tippy.umd.min.js"></script>
<script src="01-quarto-interactive_files/libs/quarto-html/anchor.min.js"></script>
<link href="01-quarto-interactive_files/libs/quarto-html/tippy.css" rel="stylesheet">
<link href="01-quarto-interactive_files/libs/quarto-html/quarto-syntax-highlighting.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<script src="01-quarto-interactive_files/libs/bootstrap/bootstrap.min.js"></script>
<link href="01-quarto-interactive_files/libs/bootstrap/bootstrap-icons.css" rel="stylesheet">
<link href="01-quarto-interactive_files/libs/bootstrap/bootstrap.min.css" rel="stylesheet">
<script type="module" src="01-quarto-interactive_files/libs/quarto-ojs/quarto-ojs-runtime.js"></script>
<link href="01-quarto-interactive_files/libs/quarto-ojs/quarto-ojs.css" rel="stylesheet">
<script type="ojs-define">
{"contents":[{"name":"data","value":[{"id":24,"submitdate":null,"lastpage":5,"startlanguage":"de-informal","seed":"1604305522","G1Q01":2,"G1Q02":3,"G1Q02_other":null,"G1Q03":null,"G1Q04":2,"G1Q05":1,"G1Q06_SQ001":1,"G1Q06_SQ002":1,"G2Q01":4,"G2Q02":1,"G2Q02_other":null,"G2Q03_SQ001":1,"G2Q03_SQ002":2,"G2Q03_SQ003":2,"G2Q03_SQ004":2,"G2Q03_other":null,"G2Q03b":null,"G2Q05_SQ001":1,"G2Q05_SQ002":2,"G2Q05_SQ013":1,"G2Q05_SQ003":1,"G2Q05_SQ004":2,"G2Q05_SQ005":1,"G2Q05_SQ006":1,"G2Q05_SQ007":2,"G2Q05_SQ008":2,"G2Q05_SQ009":2,"G2Q05_SQ010":2,"G2Q05_SQ011":2,"G2Q05_SQ012":2,"G2Q05_other":null,"G2Q06_SQ001":2,"G2Q06_SQ002":null,"G2Q06_SQ013":1,"G2Q06_SQ003":1,"G2Q06_SQ004":null,"G2Q06_SQ005":2,"G2Q06_SQ006":2,"G2Q06_SQ007":null,"G2Q06_SQ008":null,"G2Q06_SQ009":null,"G2Q06_SQ010":null,"G2Q06_SQ011":null,"G2Q06_SQ012":null,"G2Q06_other":null,"G2Q07":2,"G2Q07_other":null,"G2Q08":4,"G2Q09_SQ001":1,"G2Q09_SQ002":1,"G2Q09_SQ003":2,"G2Q09_SQ004":2,"G2Q09_SQ005":2,"G2Q09_other":null,"G2Q10_SQ001":2,"G2Q10_SQ002":2,"G2Q10_SQ003":null,"G2Q10_SQ004":null,"G2Q10_SQ005":null,"G2Q10_other":null,"G2Q04_SQ001":5,"G2Q04_SQ002":5,"G2Q04_SQ003":5,"G2Q11_SQ001":null,"G2Q11_SQ002":5,"G2Q11_SQ003":5,"G2Q11_SQ004":5,"G2Q11_SQ005":5,"G02Q12":1,"G03Q01":3,"G3Q01_SQ001":2,"G3Q01_SQ002":2,"G3Q01_SQ003":1,"G3Q01_SQ004":2,"G3Q01_SQ005":2,"G3Q01_SQ006":2,"G3Q01_SQ007":2,"G3Q01_SQ009":2,"G3Q01_SQ008":1,"G3Q01_SQ010":1,"G3Q01_SQ011":1,"G3Q01_SQ012":2,"G3Q01_other":null,"G3Q02_SQ001":1,"G3Q02_SQ002":2,"G3Q02_SQ003":null,"G3Q02_SQ004":2,"G3Q02_SQ005":2,"G3Q02_SQ006":1,"G3Q02_SQ007":1,"G3Q02_SQ009":null,"G3Q02_SQ008":1,"G3Q02_SQ010":null,"G3Q02_SQ011":null,"G3Q02_SQ012":2,"G3Q02_other":null,"G03Q03_SQ001":null,"G03Q03_SQ002":null,"G03Q03_SQ003":null,"G03Q03_SQ004":null,"G03Q03_SQ005":null,"G03Q03_SQ006":null,"G03Q03_SQ007":null,"G03Q03_SQ008":null,"G03Q03_SQ010":null,"G03Q03_SQ009":null,"G03Q03_SQ011":null,"G03Q03_SQ012":null,"G03Q03_SQ013":null,"G03Q03_SQ014":null,"G03Q03_SQ015":null,"G03Q03_other":null,"G03Q03b_SQ001":2,"G03Q03b_SQ002":2,"G03Q03b_SQ003":2,"G03Q03b_SQ004":2,"G03Q03b_SQ005":2,"G03Q03b_SQ006":2,"G03Q03b_SQ007":2,"G03Q03b_SQ008":2,"G03Q03b_SQ010":2,"G03Q03b_SQ009":2,"G03Q03b_SQ011":2,"G03Q03b_SQ012":2,"G03Q03b_SQ013":2,"G03Q03b_SQ014":2,"G03Q03b_SQ015":2,"G03Q03b_other":null,"G3Q03":3,"G3Q03_other":null,"G3Q04_SQ001":4,"G3Q04_SQ002":2,"G3Q04_SQ003":3,"G3Q04_SQ004":2,"G3Q05":3,"G4Q01_SQ001":4,"G4Q01_SQ002":3,"G4Q01_SQ005":3,"G4Q01_SQ003":3,"G4Q01_SQ004":3,"G4Q02":3,"G4Q03":null,"G4Q04_SQ001":null,"G4Q04_SQ002":null,"G4Q04_SQ003":null,"G4Q04_SQ004":null,"G4Q04_SQ005":null,"G4Q04_SQ006":null,"G4Q04_other":null,"G4Q05_SQ001":null,"G4Q05_SQ002":null,"G4Q05_SQ003":null,"G4Q05_SQ004":null,"G4Q05_SQ005":null,"G4Q05_SQ006":null,"G4Q05_other":null,"G4Q06":null,"G4Q07_SQ001":null,"G4Q07_SQ002":null,"G4Q07_SQ003":null,"G4Q07_SQ004":null,"G4Q07_SQ005":null,"G4Q07_SQ006":null,"G4Q07_other":null,"G4Q08_SQ001":null,"G4Q08_SQ002":null,"G4Q08_SQ003":null,"G4Q08_SQ004":null,"G4Q08_SQ005":null,"G4Q08_SQ006":null,"G4Q08_SQ007":null,"G4Q08_other":null,"G4Q09_SQ001":2,"G4Q09_SQ002":2,"G4Q09_SQ003":2,"G4Q09_SQ004":2,"G4Q09_SQ008":2,"G4Q09_SQ009":2,"G4Q09_SQ006":2,"G4Q09_SQ005":1,"G4Q09_SQ007":2,"G4Q09_SQ010":2,"G4Q09_other":null,"G5Q01":null,"G5Q02":null,"G5Q03":null,"G5Q04_SQ001":2,"G5Q04_SQ002":2,"G5Q04_SQ003":2,"G5Q04_SQ004":2,"G5Q04_SQ005":2,"G5Q04_SQ006":2,"G5Q04_SQ007":2,"G5Q04_SQ008":2,"G5Q04_SQ009":2,"G5Q04_SQ010":2,"G5Q04_SQ011":2,"G5Q04_SQ012":2,"G5Q04_SQ013":2,"G5Q04_SQ014":2,"G5Q05_SQ001":2,"G5Q05_SQ002":2,"G5Q05_SQ003":2,"G5Q05_SQ004":2},{"id":25,"submitdate":null,"lastpage":3,"startlanguage":"de-informal","seed":"701102343","G1Q01":2,"G1Q02":3,"G1Q02_other":null,"G1Q03":null,"G1Q04":3,"G1Q05":1,"G1Q06_SQ001":1,"G1Q06_SQ002":1,"G2Q01":2,"G2Q02":2,"G2Q02_other":null,"G2Q03_SQ001":1,"G2Q03_SQ002":2,"G2Q03_SQ003":2,"G2Q03_SQ004":2,"G2Q03_other":null,"G2Q03b":null,"G2Q05_SQ001":1,"G2Q05_SQ002":2,"G2Q05_SQ013":2,"G2Q05_SQ003":2,"G2Q05_SQ004":2,"G2Q05_SQ005":2,"G2Q05_SQ006":2,"G2Q05_SQ007":2,"G2Q05_SQ008":2,"G2Q05_SQ009":2,"G2Q05_SQ010":2,"G2Q05_SQ011":2,"G2Q05_S
</script>
<script type="ojs-define">
{"contents":[{"name":"varnames","value":["id","submitdate","lastpage","startlanguage","seed","G1Q01","G1Q02","G1Q02_other","G1Q03","G1Q04","G1Q05","G1Q06_SQ001","G1Q06_SQ002","G2Q01","G2Q02","G2Q02_other","G2Q03_SQ001","G2Q03_SQ002","G2Q03_SQ003","G2Q03_SQ004","G2Q03_other","G2Q03b","G2Q05_SQ001","G2Q05_SQ002","G2Q05_SQ013","G2Q05_SQ003","G2Q05_SQ004","G2Q05_SQ005","G2Q05_SQ006","G2Q05_SQ007","G2Q05_SQ008","G2Q05_SQ009","G2Q05_SQ010","G2Q05_SQ011","G2Q05_SQ012","G2Q05_other","G2Q06_SQ001","G2Q06_SQ002","G2Q06_SQ013","G2Q06_SQ003","G2Q06_SQ004","G2Q06_SQ005","G2Q06_SQ006","G2Q06_SQ007","G2Q06_SQ008","G2Q06_SQ009","G2Q06_SQ010","G2Q06_SQ011","G2Q06_SQ012","G2Q06_other","G2Q07","G2Q07_other","G2Q08","G2Q09_SQ001","G2Q09_SQ002","G2Q09_SQ003","G2Q09_SQ004","G2Q09_SQ005","G2Q09_other","G2Q10_SQ001","G2Q10_SQ002","G2Q10_SQ003","G2Q10_SQ004","G2Q10_SQ005","G2Q10_other","G2Q04_SQ001","G2Q04_SQ002","G2Q04_SQ003","G2Q11_SQ001","G2Q11_SQ002","G2Q11_SQ003","G2Q11_SQ004","G2Q11_SQ005","G02Q12","G03Q01","G3Q01_SQ001","G3Q01_SQ002","G3Q01_SQ003","G3Q01_SQ004","G3Q01_SQ005","G3Q01_SQ006","G3Q01_SQ007","G3Q01_SQ009","G3Q01_SQ008","G3Q01_SQ010","G3Q01_SQ011","G3Q01_SQ012","G3Q01_other","G3Q02_SQ001","G3Q02_SQ002","G3Q02_SQ003","G3Q02_SQ004","G3Q02_SQ005","G3Q02_SQ006","G3Q02_SQ007","G3Q02_SQ009","G3Q02_SQ008","G3Q02_SQ010","G3Q02_SQ011","G3Q02_SQ012","G3Q02_other","G03Q03_SQ001","G03Q03_SQ002","G03Q03_SQ003","G03Q03_SQ004","G03Q03_SQ005","G03Q03_SQ006","G03Q03_SQ007","G03Q03_SQ008","G03Q03_SQ010","G03Q03_SQ009","G03Q03_SQ011","G03Q03_SQ012","G03Q03_SQ013","G03Q03_SQ014","G03Q03_SQ015","G03Q03_other","G03Q03b_SQ001","G03Q03b_SQ002","G03Q03b_SQ003","G03Q03b_SQ004","G03Q03b_SQ005","G03Q03b_SQ006","G03Q03b_SQ007","G03Q03b_SQ008","G03Q03b_SQ010","G03Q03b_SQ009","G03Q03b_SQ011","G03Q03b_SQ012","G03Q03b_SQ013","G03Q03b_SQ014","G03Q03b_SQ015","G03Q03b_other","G3Q03","G3Q03_other","G3Q04_SQ001","G3Q04_SQ002","G3Q04_SQ003","G3Q04_SQ004","G3Q05","G4Q01_SQ001","G4Q01_SQ002","G4Q01_SQ005","G4Q01_SQ003","G4Q01_SQ004","G4Q02","G4Q03","G4Q04_SQ001","G4Q04_SQ002","G4Q04_SQ003","G4Q04_SQ004","G4Q04_SQ005","G4Q04_SQ006","G4Q04_other","G4Q05_SQ001","G4Q05_SQ002","G4Q05_SQ003","G4Q05_SQ004","G4Q05_SQ005","G4Q05_SQ006","G4Q05_other","G4Q06","G4Q07_SQ001","G4Q07_SQ002","G4Q07_SQ003","G4Q07_SQ004","G4Q07_SQ005","G4Q07_SQ006","G4Q07_other","G4Q08_SQ001","G4Q08_SQ002","G4Q08_SQ003","G4Q08_SQ004","G4Q08_SQ005","G4Q08_SQ006","G4Q08_SQ007","G4Q08_other","G4Q09_SQ001","G4Q09_SQ002","G4Q09_SQ003","G4Q09_SQ004","G4Q09_SQ008","G4Q09_SQ009","G4Q09_SQ006","G4Q09_SQ005","G4Q09_SQ007","G4Q09_SQ010","G4Q09_other","G5Q01","G5Q02","G5Q03","G5Q04_SQ001","G5Q04_SQ002","G5Q04_SQ003","G5Q04_SQ004","G5Q04_SQ005","G5Q04_SQ006","G5Q04_SQ007","G5Q04_SQ008","G5Q04_SQ009","G5Q04_SQ010","G5Q04_SQ011","G5Q04_SQ012","G5Q04_SQ013","G5Q04_SQ014","G5Q05_SQ001","G5Q05_SQ002","G5Q05_SQ003","G5Q05_SQ004"]}]}
</script>
<script type="ojs-define">
{"contents":[{"name":"qlabels","value":["id","submitdate","lastpage","startlanguage","seed","Hat deine Organisation eine anerkannte Gemeinnützigkeit?","Welche Rechtsform hat die Organisation? ","[Sonstiges] Welche Rechtsform hat die Organisation? ","Wie viele Mitglieder hat dein Verein? Wenn du es nicht weißt, kannst du gerne schätzen.","Wie viele hauptamtlich Mitarbeitende hat deine Organisation?  Wenn du es nicht weißt, kannst du gerne schätzen.","Wie viele Personen arbeiten regelmäßig aktiv ehrenamtlich mit? Wenn du es nicht weißt, kannst du gerne schätzen.","[Ehrenamtlich engagiert] Welche Rolle(n) hast du in der Organisation? ","[Hauptamtlich] Welche Rolle(n) hast du in der Organisation? ","Welche Rolle spielt Digitalisierung deiner Einschätzung nach in deiner Organisation? ","Wer kümmert sich um eure digitale Infrastruktur? (Programme einrichten, andere unterstützen, Dienste zu nutzen etc.)","[Sonstiges] Wer kümmert sich um eure digitale Infrastruktur? (Programme einrichten, andere unterstützen, Dienste zu nutzen etc.)","[Hauptverantwortlich für die IT-Infrastruktur] Ich selbst bin ...","[Mitverantwortlich für die IT-Infrastruktur] Ich selbst bin ...","[Nicht verantwortlich, nutze sie aber] Ich selbst bin ...","[Ich nutze die IT-Infrastruktur unserer Organisation nicht ] Ich selbst bin ...","[Sonstiges] Ich selbst bin ...","Nutzt du mit deinem Team eins oder mehrere der folgenden Tools? - Gemeinsame Chatgruppen (z.B. Signal oder Whatsapp)- Gemeinsame digitale Dokumentenablage (z.B. in einer Cloud)- Eine über deine Organisation eingerichtete E-Mailadresse- Videocalls","[Videotelefonie (z.B. Zoom, Microsoft Teams, BigBlueButton, etc.)] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Gemeinsame Dokumentenablage in Cloud (z.B. Google Drive, OneDrive, Nextcloud, etc.)] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Gemeinsame Dokumentenablage auf lokalem Server] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Gemeinsame Dokumentenbearbeitung (z.B. Pad, Google Sheets)] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Messenger/Chat (Whatsapp, Signal, Slack etc.)] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Projektmanagement Tool (z.B. Trello, Asana, etc.)] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[E-Mail] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Umfragetool (z.B. LamaPoll, easy feedback, etc.)] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Terminumfrage (z.B. Doodle)] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Gemeinsamer Kalender] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Digitales Whiteboard (z.B. Miro, Padlet, etc.)] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Lernplattform (z.B. moodle, ilias, etc.)] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[CRM/Mitgliederverwaltung] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Sonstiges] Folgende digitale Anwendungen nutzen wir im Alltag mindestens dann und wann ","[Videotelefonie (z.B. Zoom, Microsoft Teams, BigBlueButton, etc.)] Folgende digitale Anwendungen sind für uns dabei am wichtigsten.","[Gemeinsame Dokumentenablage/ Coud (z.B. Google Drive, OneDrive, Nextcloud, etc.)] Folgende digitale Anwendungen sind für uns dabei am wichtigsten.","[Gemeinsame Dokumentenablage auf lokalem Server] Folgende digitale Anwendungen sind für uns dabei am wichtigsten.","[Gemeinsame Dokumentenbearbeitung (z.B. Pad, Google Sheets)] Folgende digitale Anwendungen sind für uns dabei am wichtigsten.","[Messenger/Chat (Whatsapp, Signal, Slack etc.)] Folgende digitale Anwendungen sind für uns dabei am wichtigsten.","[Projektmanagement Tool (z.B. Trello, Asana, etc.)] Folgende digitale Anwendungen sind für
</script>
</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">Untitled</h1>
</div>
<div class="quarto-title-meta">
</div>
</header>
<section id="r-import-data" class="level1">
<h1>R: Import Data</h1>
<div class="cell">
<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="fu">library</span>(tidyverse)</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="co"># install.packages("here)</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="cell">
<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>data <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>
</div>
<section id="r-transpose-data-for-ojs" class="level2">
<h2 class="anchored" data-anchor-id="r-transpose-data-for-ojs">R: Transpose Data for OJS</h2>
<div class="cell">
<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>data_ojs <span class="ot">&lt;-</span> data <span class="sc">%&gt;%</span> <span class="fu">transpose</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</section>
</section>
<section id="exploration" class="level1">
<h1>Exploration</h1>
<section id="r-expose-data-to-js" class="level2">
<h2 class="anchored" data-anchor-id="r-expose-data-to-js">R: Expose Data to JS</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ojs_define</span>(<span class="at">data =</span> data_ojs)</span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="fu">ojs_define</span>(<span class="at">varnames =</span> <span class="fu">names</span>(data))</span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="fu">ojs_define</span>(<span class="at">qlabels =</span> <span class="fu">attributes</span>(data)<span class="sc">$</span>variable.labels)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
</section>
</section>
<section id="r-ojs-interaction" class="level1">
<h1>R + OJS: Interaction</h1>
<section id="ojs-dropdown" class="level2">
<h2 class="anchored" data-anchor-id="ojs-dropdown">OJS: Dropdown</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb5" data-startfrom="41" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 40;"><span id="cb5-41"><a href="#cb5-41" aria-hidden="true" tabindex="-1"></a>viewof varname_selected <span class="op">=</span> Inputs<span class="op">.</span><span class="fu">select</span>(varnames<span class="op">,</span></span>
<span id="cb5-42"><a href="#cb5-42" aria-hidden="true" tabindex="-1"></a> {<span class="dt">label</span><span class="op">:</span> <span class="st">"Filter nach:"</span>}</span>
<span id="cb5-43"><a href="#cb5-43" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display">
<div id="ojs-cell-1" data-nodetype="declaration">
</div>
</div>
</div>
<div class="cell">
<div class="sourceCode cell-code" id="cb6" data-startfrom="47" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 46;"><span id="cb6-47"><a href="#cb6-47" aria-hidden="true" tabindex="-1"></a>viewof filter_val <span class="op">=</span> Inputs<span class="op">.</span><span class="fu">select</span>(varnames<span class="op">,</span></span>
<span id="cb6-48"><a href="#cb6-48" aria-hidden="true" tabindex="-1"></a> {<span class="dt">label</span><span class="op">:</span> <span class="st">"Filter nach:"</span>}</span>
<span id="cb6-49"><a href="#cb6-49" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display">
<div id="ojs-cell-2" data-nodetype="declaration">
</div>
</div>
</div>
</section>
<section id="ojs-table" class="level2">
<h2 class="anchored" data-anchor-id="ojs-table">OJS: Table</h2>
<div class="cell">
<div class="sourceCode cell-code" id="cb7" data-startfrom="55" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 54;"><span id="cb7-55"><a href="#cb7-55" aria-hidden="true" tabindex="-1"></a>viewof tableData <span class="op">=</span> Inputs<span class="op">.</span><span class="fu">table</span>(</span>
<span id="cb7-56"><a href="#cb7-56" aria-hidden="true" tabindex="-1"></a> data<span class="op">,</span></span>
<span id="cb7-57"><a href="#cb7-57" aria-hidden="true" tabindex="-1"></a> {</span>
<span id="cb7-58"><a href="#cb7-58" aria-hidden="true" tabindex="-1"></a> <span class="dt">sort</span><span class="op">:</span> varname_selected<span class="op">,</span> <span class="dt">required</span><span class="op">:</span> <span class="kw">false</span></span>
<span id="cb7-59"><a href="#cb7-59" aria-hidden="true" tabindex="-1"></a> }</span>
<span id="cb7-60"><a href="#cb7-60" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display">
<div id="ojs-cell-3" data-nodetype="declaration">
</div>
</div>
</div>
</section>
<section id="main-dynamic-ggplot" class="level2">
<h2 class="anchored" data-anchor-id="main-dynamic-ggplot">MAIN: Dynamic ggplot</h2>
<div class="cell">
<div class="sourceCode cell-code hidden" id="cb8" data-startfrom="67" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 66;"><span id="cb8-67"><a href="#cb8-67" aria-hidden="true" tabindex="-1"></a>viewof var_x <span class="op">=</span> Inputs<span class="op">.</span><span class="fu">select</span>(varnames<span class="op">,</span></span>
<span id="cb8-68"><a href="#cb8-68" aria-hidden="true" tabindex="-1"></a> {<span class="dt">label</span><span class="op">:</span> <span class="st">"X Variable"</span>}</span>
<span id="cb8-69"><a href="#cb8-69" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display">
<div id="ojs-cell-4" data-nodetype="declaration">
</div>
</div>
</div>
<div class="cell">
<div class="sourceCode cell-code hidden" id="cb9" data-startfrom="75" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 74;"><span id="cb9-75"><a href="#cb9-75" aria-hidden="true" tabindex="-1"></a>viewof var_y <span class="op">=</span> Inputs<span class="op">.</span><span class="fu">select</span>(varnames<span class="op">,</span></span>
<span id="cb9-76"><a href="#cb9-76" aria-hidden="true" tabindex="-1"></a> {<span class="dt">label</span><span class="op">:</span> <span class="st">"Y Variable"</span>}</span>
<span id="cb9-77"><a href="#cb9-77" aria-hidden="true" tabindex="-1"></a>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display">
<div id="ojs-cell-5" data-nodetype="declaration">
</div>
</div>
</div>
<div class="cell">
<div class="sourceCode cell-code hidden" id="cb10" data-startfrom="82" data-source-offset="0"><pre class="sourceCode js code-with-copy"><code class="sourceCode javascript" style="counter-reset: source-line 81;"><span id="cb10-82"><a href="#cb10-82" aria-hidden="true" tabindex="-1"></a>chart <span class="op">=</span> Plot<span class="op">.</span><span class="fu">plot</span>({</span>
<span id="cb10-83"><a href="#cb10-83" aria-hidden="true" tabindex="-1"></a> <span class="dt">inset</span><span class="op">:</span> <span class="dv">8</span><span class="op">,</span></span>
<span id="cb10-84"><a href="#cb10-84" aria-hidden="true" tabindex="-1"></a> <span class="dt">grid</span><span class="op">:</span> <span class="kw">true</span><span class="op">,</span></span>
<span id="cb10-85"><a href="#cb10-85" aria-hidden="true" tabindex="-1"></a> <span class="dt">marks</span><span class="op">:</span> [</span>
<span id="cb10-86"><a href="#cb10-86" aria-hidden="true" tabindex="-1"></a> Plot<span class="op">.</span><span class="fu">dot</span>(data<span class="op">,</span></span>
<span id="cb10-87"><a href="#cb10-87" aria-hidden="true" tabindex="-1"></a> Plot<span class="op">.</span><span class="fu">group</span>({<span class="dt">r</span><span class="op">:</span> <span class="st">"count"</span><span class="op">,</span> <span class="dt">fill</span><span class="op">:</span> <span class="st">"count"</span>}<span class="op">,</span> {<span class="dt">x</span><span class="op">:</span> var_x<span class="op">,</span> <span class="dt">y</span><span class="op">:</span> var_y})</span>
<span id="cb10-88"><a href="#cb10-88" aria-hidden="true" tabindex="-1"></a> )</span>
<span id="cb10-89"><a href="#cb10-89" aria-hidden="true" tabindex="-1"></a> ]<span class="op">,</span></span>
<span id="cb10-90"><a href="#cb10-90" aria-hidden="true" tabindex="-1"></a> <span class="dt">color</span><span class="op">:</span> {</span>
<span id="cb10-91"><a href="#cb10-91" aria-hidden="true" tabindex="-1"></a> <span class="dt">type</span><span class="op">:</span> <span class="st">"linear"</span><span class="op">,</span></span>
<span id="cb10-92"><a href="#cb10-92" aria-hidden="true" tabindex="-1"></a> <span class="dt">range</span><span class="op">:</span> [<span class="st">"steelblue"</span><span class="op">,</span> <span class="st">"orange"</span>] <span class="co">// uses d3.interpolateRgb</span></span>
<span id="cb10-93"><a href="#cb10-93" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span>
<span id="cb10-94"><a href="#cb10-94" aria-hidden="true" tabindex="-1"></a> <span class="dt">r</span><span class="op">:</span> {</span>
<span id="cb10-95"><a href="#cb10-95" aria-hidden="true" tabindex="-1"></a> <span class="dt">range</span><span class="op">:</span> [<span class="dv">0</span><span class="op">,</span> <span class="dv">20</span>]</span>
<span id="cb10-96"><a href="#cb10-96" aria-hidden="true" tabindex="-1"></a> }<span class="op">,</span></span>
<span id="cb10-97"><a href="#cb10-97" aria-hidden="true" tabindex="-1"></a>})</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display">
<div id="ojs-cell-6" data-nodetype="declaration">
</div>
</div>
</div>
</section>
</section>
</main>
<!-- /main column -->
<script type="ojs-module-contents">
{"contents":[{"methodName":"interpret","cellName":"ojs-cell-1","inline":false,"source":"viewof varname_selected = Inputs.select(varnames,\n {label: \"Filter nach:\"}\n)\n"},{"methodName":"interpret","cellName":"ojs-cell-2","inline":false,"source":"viewof filter_val = Inputs.select(varnames,\n {label: \"Filter nach:\"}\n)\n"},{"methodName":"interpret","cellName":"ojs-cell-3","inline":false,"source":"viewof tableData = Inputs.table(\n data,\n {\n sort: varname_selected, required: false\n }\n)\n"},{"methodName":"interpret","cellName":"ojs-cell-4","inline":false,"source":"viewof var_x = Inputs.select(varnames,\n {label: \"X Variable\"}\n)\n"},{"methodName":"interpret","cellName":"ojs-cell-5","inline":false,"source":"viewof var_y = Inputs.select(varnames,\n {label: \"Y Variable\"}\n)\n"},{"methodName":"interpret","cellName":"ojs-cell-6","inline":false,"source":"chart = Plot.plot({\n inset: 8,\n grid: true,\n marks: [\n Plot.dot(data,\n Plot.group({r: \"count\", fill: \"count\"}, {x: var_x, y: var_y})\n )\n ],\n color: {\n type: \"linear\",\n range: [\"steelblue\", \"orange\"] // uses d3.interpolateRgb\n },\n r: {\n range: [0, 20]\n },\n})\n"},{"methodName":"interpretQuiet","source":"shinyInput('varname_selected')"},{"methodName":"interpretQuiet","source":"shinyInput('filter_val')"},{"methodName":"interpretQuiet","source":"shinyInput('tableData')"},{"methodName":"interpretQuiet","source":"shinyInput('var_x')"},{"methodName":"interpretQuiet","source":"shinyInput('var_y')"}]}
</script>
<script type="module">
window._ojs.paths.runtimeToDoc = "..\..\..";
window._ojs.paths.runtimeToRoot = "..\..\..";
window._ojs.paths.docToRoot = "";
window._ojs.selfContained = false;
window._ojs.runtime.interpretFromScriptTags();
</script>
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
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>