diff --git a/nfdi-in-emacs-with-orgmode.html b/nfdi-in-emacs-with-orgmode.html
index 4fadc376cc2a40e9835b9ee4a422dcef3ff8f7bb..bf3207d4284c5b10db8f3e14308af5871e4bc5fc 100644
--- a/nfdi-in-emacs-with-orgmode.html
+++ b/nfdi-in-emacs-with-orgmode.html
@@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
-<!-- 2023-09-15 Fri 14:30 -->
+<!-- 2023-09-17 Sun 00:06 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Data Processing, Code Documentation and Beyond @@latex:\\@@ @@html:<br>@@ (Emacs and org-mode)</title>
@@ -24,33 +24,33 @@
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
-<li><a href="#org9ef2115">1. Overview</a></li>
-<li><a href="#org05e9f20">2. Introduce</a></li>
-<li><a href="#org2d891c8">3. Prepare</a>
+<li><a href="#orge8fbcab">1. Overview</a></li>
+<li><a href="#orgd7eeaf8">2. Introduce</a></li>
+<li><a href="#org6d162bd">3. Prepare</a>
<ul>
-<li><a href="#org6e9d324">3.1. Data retrieval using SPARQL</a></li>
-<li><a href="#orga2cbc91">3.2. Data cleaning using shell</a></li>
+<li><a href="#org3e7a80a">3.1. Data retrieval using SPARQL</a></li>
+<li><a href="#org23a687d">3.2. Data cleaning using shell</a></li>
</ul>
</li>
-<li><a href="#org713a609">4. Process</a>
+<li><a href="#org4b6e209">4. Process</a>
<ul>
-<li><a href="#org4016d49">4.1. Data Aggregation with Python</a></li>
-<li><a href="#org1303490">4.2. Counting Elements with awk</a></li>
-<li><a href="#org2751f39">4.3. Network Disply with R</a></li>
+<li><a href="#orge3daa90">4.1. Data Aggregation with Python</a></li>
+<li><a href="#org40afcd3">4.2. Counting Elements with awk</a></li>
+<li><a href="#org56ee722">4.3. Network Disply with R</a></li>
</ul>
</li>
-<li><a href="#org9a8308f">5. Preserve</a>
+<li><a href="#orge20e0aa">5. Preserve</a>
<ul>
-<li><a href="#org0cb4e4a">5.1. Manual export</a></li>
-<li><a href="#org2b4872a">5.2. Automatic batch process</a></li>
+<li><a href="#org89ae948">5.1. Manual export</a></li>
+<li><a href="#orgccb6683">5.2. Automatic batch process</a></li>
</ul>
</li>
</ul>
</div>
</div>
-<div id="outline-container-org9ef2115" class="outline-2">
-<h2 id="org9ef2115"><span class="section-number-2">1.</span> Overview</h2>
+<div id="outline-container-orge8fbcab" class="outline-2">
+<h2 id="orge8fbcab"><span class="section-number-2">1.</span> Overview</h2>
<div class="outline-text-2" id="text-1">
<p>
This document provides insights into an efficient way handling data.
@@ -63,11 +63,11 @@ way of processing and documenting data workflow and analyses.
<p>
The paper is divided into three main steps, focussing on first preparing, second
-processing and last presevering the data and its documentation (fig. <a href="#org2da95dd">1</a>).
+processing and last presevering the data and its documentation (fig. <a href="#org2abe7ec">1</a>).
</p>
-<div id="org2da95dd" class="figure">
+<div id="org2abe7ec" class="figure">
<p><img src="img/nfdi-in-emacs-best-practice-overview.png" alt="nfdi-in-emacs-best-practice-overview.png" width="100%" />
</p>
<p><span class="figure-number">Figure 1: </span>Workflow of the document. Source <a href="https://excalidraw.com/#room=8617c3374a9c2c2c895b,a_SoKClI-tyAxWfSgzThWQ">Excalidraw</a>.</p>
@@ -76,8 +76,8 @@ processing and last presevering the data and its documentation (fig. <a href="#o
</div>
-<div id="outline-container-org05e9f20" class="outline-2">
-<h2 id="org05e9f20"><span class="section-number-2">2.</span> Introduce</h2>
+<div id="outline-container-orgd7eeaf8" class="outline-2">
+<h2 id="orgd7eeaf8"><span class="section-number-2">2.</span> Introduce</h2>
<div class="outline-text-2" id="text-2">
<p>
What is Emacs and <b>org-mode</b>? Well, where to start? You may not have heard of
@@ -140,8 +140,8 @@ since this combines a well documented way of analysing a data set.
</div>
-<div id="outline-container-org2d891c8" class="outline-2">
-<h2 id="org2d891c8"><span class="section-number-2">3.</span> Prepare</h2>
+<div id="outline-container-org6d162bd" class="outline-2">
+<h2 id="org6d162bd"><span class="section-number-2">3.</span> Prepare</h2>
<div class="outline-text-2" id="text-3">
<p>
For our demonstration, we are going to create a dataset from openly available
@@ -151,8 +151,8 @@ some simple analysis tasks on it.
</div>
-<div id="outline-container-org6e9d324" class="outline-3">
-<h3 id="org6e9d324"><span class="section-number-3">3.1.</span> Data retrieval using SPARQL</h3>
+<div id="outline-container-org3e7a80a" class="outline-3">
+<h3 id="org3e7a80a"><span class="section-number-3">3.1.</span> Data retrieval using SPARQL</h3>
<div class="outline-text-3" id="text-3-1">
<p>
The data we are interested in exists on Wikidata. Wikidata is similar to
@@ -183,7 +183,7 @@ If you like how to do this in more detail, have a look at (<a href="#citeproc_bi
</p>
<div class="org-src-container">
-<label class="org-src-name"><span class="listing-number">Listing 1: </span>Retrieving the dataset from wikidata</label><pre class="src src-sparql" id="orgae45131"><span class="linenr">1: </span><span class="org-keyword">SELECT</span> <span class="org-variable-name">?wLabel</span> <span class="org-variable-name">?pLabel</span>
+<label class="org-src-name"><span class="listing-number">Listing 1: </span>Retrieving the dataset from wikidata</label><pre class="src src-sparql" id="org20d5b71"><span class="linenr">1: </span><span class="org-keyword">SELECT</span> <span class="org-variable-name">?wLabel</span> <span class="org-variable-name">?pLabel</span>
<span class="linenr">2: </span><span class="org-keyword">WHERE</span>
<span class="linenr">3: </span>{
<span id="coderef-consortium" class="coderef-off"><span class="linenr">4: </span> <span class="org-variable-name">?p</span> wdt:P31 wd:Q98270496 . (consortium)</span>
@@ -195,7 +195,7 @@ If you like how to do this in more detail, have a look at (<a href="#citeproc_bi
</pre>
</div>
-<table id="org84a4629" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+<table id="org5079e0a" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 1:</span> Result of the query for NFDI consortia and their institutions.</caption>
<colgroup>
@@ -467,11 +467,11 @@ If you like how to do this in more detail, have a look at (<a href="#citeproc_bi
-<div id="outline-container-orga2cbc91" class="outline-3">
-<h3 id="orga2cbc91"><span class="section-number-3">3.2.</span> Data cleaning using shell</h3>
+<div id="outline-container-org23a687d" class="outline-3">
+<h3 id="org23a687d"><span class="section-number-3">3.2.</span> Data cleaning using shell</h3>
<div class="outline-text-3" id="text-3-2">
<p>
-The data we got from listing <a href="#orgae45131">1</a> is good but it needs further cleaning.
+The data we got from listing <a href="#org20d5b71">1</a> is good but it needs further cleaning.
</p>
<p>
@@ -486,11 +486,11 @@ SPARQL query, as an input variable to this cell (<code>:var input=raw-dataset</c
</p>
<div class="org-src-container">
-<label class="org-src-name"><span class="listing-number">Listing 2: </span>Cleaning the raw data using good old <code>sed</code> and a regex pattern.</label><pre class="src src-sh" id="org866cd5d"><span class="org-type"><span class="org-tree-sitter-hl-faceXfunctionXcall"><span class="org-tree-sitter-hl-faceXfunctionXbuiltin">echo</span></span></span> <span class="org-tree-sitter-hl-faceXstring">"</span><span class="org-tree-sitter-hl-faceXstring"><span class="org-tree-sitter-hl-faceXpunctuationXspecial"><span class="org-constant">$</span></span></span><span class="org-tree-sitter-hl-faceXstring"><span class="org-tree-sitter-hl-faceXproperty"><span class="org-variable-name">input</span></span></span><span class="org-tree-sitter-hl-faceXstring">"</span> <span class="org-tree-sitter-hl-faceXoperator">|</span> <span class="org-tree-sitter-hl-faceXfunctionXcall">sed</span> <span class="org-tree-sitter-hl-faceXconstant">-E</span> <span class="org-tree-sitter-hl-faceXstring">'/Q[0-9]+/d'</span>
+<label class="org-src-name"><span class="listing-number">Listing 2: </span>Cleaning the raw data using good old <code>sed</code> and a regex pattern.</label><pre class="src src-sh" id="org6353068"><span class="org-type"><span class="org-tree-sitter-hl-faceXfunctionXcall"><span class="org-tree-sitter-hl-faceXfunctionXbuiltin">echo</span></span></span> <span class="org-tree-sitter-hl-faceXstring">"</span><span class="org-tree-sitter-hl-faceXstring"><span class="org-tree-sitter-hl-faceXpunctuationXspecial"><span class="org-constant">$</span></span></span><span class="org-tree-sitter-hl-faceXstring"><span class="org-tree-sitter-hl-faceXproperty"><span class="org-variable-name">input</span></span></span><span class="org-tree-sitter-hl-faceXstring">"</span> <span class="org-tree-sitter-hl-faceXoperator">|</span> <span class="org-tree-sitter-hl-faceXfunctionXcall">sed</span> <span class="org-tree-sitter-hl-faceXconstant">-E</span> <span class="org-tree-sitter-hl-faceXstring">'/Q[0-9]+/d'</span>
</pre>
</div>
-<table id="org78b1ff9" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+<table id="org0251484" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 2:</span> Cleaned data set which will be used for ruther processing.</caption>
<colgroup>
@@ -735,19 +735,19 @@ SPARQL query, as an input variable to this cell (<code>:var input=raw-dataset</c
</div>
</div>
-<div id="outline-container-org713a609" class="outline-2">
-<h2 id="org713a609"><span class="section-number-2">4.</span> Process</h2>
+<div id="outline-container-org4b6e209" class="outline-2">
+<h2 id="org4b6e209"><span class="section-number-2">4.</span> Process</h2>
<div class="outline-text-2" id="text-4">
</div>
-<div id="outline-container-org4016d49" class="outline-3">
-<h3 id="org4016d49"><span class="section-number-3">4.1.</span> Data Aggregation with Python</h3>
+<div id="outline-container-orge3daa90" class="outline-3">
+<h3 id="orge3daa90"><span class="section-number-3">4.1.</span> Data Aggregation with Python</h3>
<div class="outline-text-3" id="text-4-1">
<p>
The great thing about org mode is that we can seamlessly switch between
-languages! Our original query (listing <a href="#orgae45131">1</a>) was written in SPARQL, which returned
-a kind of table (tab. <a href="#org84a4629">1</a>). We then took that table and ran a shell command on it. Now,
+languages! Our original query (listing <a href="#org20d5b71">1</a>) was written in SPARQL, which returned
+a kind of table (tab. <a href="#org5079e0a">1</a>). We then took that table and ran a shell command on it. Now,
we’re going to take the output of that shell command (cf. tab.
-<a href="#org78b1ff9">2</a>) and run
+<a href="#org0251484">2</a>) and run
some python code on it.
</p>
@@ -758,7 +758,7 @@ some python code on it.
</div>
<div class="org-src-container">
-<label class="org-src-name"><span class="listing-number">Listing 3: </span>Counting the number of consortia involved in one institution.</label><pre class="src src-python" id="org6856d4c"><span class="linenr"> 1: </span><span class="org-tree-sitter-hl-faceXkeyword">import</span> pandas <span class="org-tree-sitter-hl-faceXkeyword">as</span> pd
+<label class="org-src-name"><span class="listing-number">Listing 3: </span>Counting the number of consortia involved in one institution.</label><pre class="src src-python" id="org4c8d7fe"><span class="linenr"> 1: </span><span class="org-tree-sitter-hl-faceXkeyword">import</span> pandas <span class="org-tree-sitter-hl-faceXkeyword">as</span> pd
<span class="linenr"> 2: </span>
<span class="linenr"> 3: </span><span class="org-tree-sitter-hl-faceXcomment"># The data comes into the cell as a list of lists.</span>
<span class="linenr"> 4: </span><span class="org-tree-sitter-hl-faceXcomment"># We can pick it apart into a DataFrame object</span>
@@ -770,16 +770,17 @@ some python code on it.
<span class="linenr">10: </span> df
<span class="linenr">11: </span> .<span class="org-tree-sitter-hl-faceXproperty"><span class="org-tree-sitter-hl-faceXmethodXcall">groupby</span></span>(<span class="org-tree-sitter-hl-faceXstring">"wLabel"</span>)
<span class="linenr">12: </span> .<span class="org-tree-sitter-hl-faceXproperty"><span class="org-tree-sitter-hl-faceXmethodXcall">size</span></span>()
-<span class="linenr">13: </span> .<span class="org-tree-sitter-hl-faceXproperty"><span class="org-tree-sitter-hl-faceXmethodXcall">reset_index</span></span>(<span class="org-tree-sitter-hl-faceXlabel">name</span><span class="org-tree-sitter-hl-faceXoperator">=</span><span class="org-tree-sitter-hl-faceXstring">"Count"</span>))
-<span class="linenr">14: </span>
-<span class="linenr">15: </span><span class="org-tree-sitter-hl-faceXcomment"># Return our dataframe in a way that org will</span>
-<span class="linenr">16: </span><span class="org-tree-sitter-hl-faceXcomment"># display it as an org table</span>
-<span class="linenr">17: </span><span class="org-tree-sitter-hl-faceXkeyword">return</span> [<span class="org-tree-sitter-hl-faceXfunctionXcall"><span class="org-tree-sitter-hl-faceXfunctionXbuiltin">list</span></span>(institutions_by_consortia.<span class="org-tree-sitter-hl-faceXproperty">columns</span>),
-<span class="linenr">18: </span> <span class="org-tree-sitter-hl-faceXconstantXbuiltin">None</span>, <span class="org-tree-sitter-hl-faceXoperator">*</span><span class="org-tree-sitter-hl-faceXfunctionXcall"><span class="org-tree-sitter-hl-faceXfunctionXbuiltin">map</span></span>(list, institutions_by_consortia.<span class="org-tree-sitter-hl-faceXproperty">values</span>)]
+<span class="linenr">13: </span> .<span class="org-tree-sitter-hl-faceXproperty"><span class="org-tree-sitter-hl-faceXmethodXcall">sort_values</span></span>(<span class="org-tree-sitter-hl-faceXlabel">ascending</span><span class="org-tree-sitter-hl-faceXoperator">=</span><span class="org-tree-sitter-hl-faceXconstantXbuiltin">False</span>)
+<span class="linenr">14: </span> .<span class="org-tree-sitter-hl-faceXproperty"><span class="org-tree-sitter-hl-faceXmethodXcall">reset_index</span></span>(<span class="org-tree-sitter-hl-faceXlabel">name</span><span class="org-tree-sitter-hl-faceXoperator">=</span><span class="org-tree-sitter-hl-faceXstring">"Count"</span>))
+<span class="linenr">15: </span>
+<span class="linenr">16: </span><span class="org-tree-sitter-hl-faceXcomment"># Return our dataframe in a way that org will</span>
+<span class="linenr">17: </span><span class="org-tree-sitter-hl-faceXcomment"># display it as an org table</span>
+<span class="linenr">18: </span><span class="org-tree-sitter-hl-faceXkeyword">return</span> [<span class="org-tree-sitter-hl-faceXfunctionXcall"><span class="org-tree-sitter-hl-faceXfunctionXbuiltin">list</span></span>(institutions_by_consortia.<span class="org-tree-sitter-hl-faceXproperty">columns</span>),
+<span class="linenr">19: </span> <span class="org-tree-sitter-hl-faceXconstantXbuiltin">None</span>, <span class="org-tree-sitter-hl-faceXoperator">*</span><span class="org-tree-sitter-hl-faceXfunctionXcall"><span class="org-tree-sitter-hl-faceXfunctionXbuiltin">map</span></span>(list, institutions_by_consortia.<span class="org-tree-sitter-hl-faceXproperty">values</span>)]
</pre>
</div>
-<table id="org86a1496" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+<table id="org25d7232" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 3:</span> Overview of institutions and the count of their associated consortia.</caption>
<colgroup>
@@ -794,21 +795,209 @@ some python code on it.
</tr>
</thead>
<tbody>
+<tr>
+<td class="org-left">Bavarian Academy of Sciences and Humanities</td>
+<td class="org-right">7</td>
+</tr>
+
+<tr>
+<td class="org-left">Bavarian State Archives</td>
+<td class="org-right">4</td>
+</tr>
+
+<tr>
+<td class="org-left">Academy of Sciences and Literature Mainz</td>
+<td class="org-right">4</td>
+</tr>
+
+<tr>
+<td class="org-left">Alfred Wegener Institute for Polar and Marine Research</td>
+<td class="org-right">3</td>
+</tr>
+
+<tr>
+<td class="org-left">Berlin State Library</td>
+<td class="org-right">2</td>
+</tr>
+
+<tr>
+<td class="org-left">Bavarian State Library</td>
+<td class="org-right">2</td>
+</tr>
+
+<tr>
+<td class="org-left">Bavarian Natural History Collections</td>
+<td class="org-right">2</td>
+</tr>
+
+<tr>
+<td class="org-left">BERD@NFDI</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Beilstein Institute for the Advancement of Chemical Sciences</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Beethoven House</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Bavarian State Research Center for Agriculture</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Bavarian State Archaeological Collection</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Bavarian Forest National Park</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Bauhaus-Universität Weimar</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Bach-Archiv Leipzig</td>
+<td class="org-right">1</td>
+</tr>
+
<tr>
<td class="org-left">Academy of Sciences and Humanities in Hamburg</td>
<td class="org-right">1</td>
</tr>
+<tr>
+<td class="org-left">Association of Population Based Cancer Registries in Germany</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Association of German Architects</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Association for Technology and Construction in Agriculture</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Association for Data-Intensive Radio Astronomy</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Arthistoricum</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Archäologisches Museum Hamburg und Stadtmuseum Harburg</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Archäologische Kommission für Niedersachsen</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Archivschule Marburg</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Arbeitskreis Provenienzforschung e.V.</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Arachnologische Gesellschaft</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Anthropological Society (Munich)</td>
+<td class="org-right">1</td>
+</tr>
+
+<tr>
+<td class="org-left">Association of states archaeologists</td>
+<td class="org-right">1</td>
+</tr>
+</tbody>
+</table>
+
+<p>
+There is also a “native way” getting the counting done by using the package
+<code>org-aggregate</code><sup><a id="fnr.2" class="footref" href="#fn.2" role="doc-backlink">2</a></sup>.
+</p>
+
+
+<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+
+
+<colgroup>
+<col class="org-left" />
+
+<col class="org-right" />
+</colgroup>
+<thead>
+<tr>
+<th scope="col" class="org-left">wLabel</th>
+<th scope="col" class="org-right">count()</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="org-left">Bavarian Academy of Sciences and Humanities</td>
+<td class="org-right">7</td>
+</tr>
+
<tr>
<td class="org-left">Academy of Sciences and Literature Mainz</td>
<td class="org-right">4</td>
</tr>
+<tr>
+<td class="org-left">Bavarian State Archives</td>
+<td class="org-right">4</td>
+</tr>
+
<tr>
<td class="org-left">Alfred Wegener Institute for Polar and Marine Research</td>
<td class="org-right">3</td>
</tr>
+<tr>
+<td class="org-left">Bavarian Natural History Collections</td>
+<td class="org-right">2</td>
+</tr>
+
+<tr>
+<td class="org-left">Bavarian State Library</td>
+<td class="org-right">2</td>
+</tr>
+
+<tr>
+<td class="org-left">Berlin State Library</td>
+<td class="org-right">2</td>
+</tr>
+
+<tr>
+<td class="org-left">Academy of Sciences and Humanities in Hamburg</td>
+<td class="org-right">1</td>
+</tr>
+
<tr>
<td class="org-left">Anthropological Society (Munich)</td>
<td class="org-right">1</td>
@@ -884,36 +1073,16 @@ some python code on it.
<td class="org-right">1</td>
</tr>
-<tr>
-<td class="org-left">Bavarian Academy of Sciences and Humanities</td>
-<td class="org-right">7</td>
-</tr>
-
<tr>
<td class="org-left">Bavarian Forest National Park</td>
<td class="org-right">1</td>
</tr>
-<tr>
-<td class="org-left">Bavarian Natural History Collections</td>
-<td class="org-right">2</td>
-</tr>
-
<tr>
<td class="org-left">Bavarian State Archaeological Collection</td>
<td class="org-right">1</td>
</tr>
-<tr>
-<td class="org-left">Bavarian State Archives</td>
-<td class="org-right">4</td>
-</tr>
-
-<tr>
-<td class="org-left">Bavarian State Library</td>
-<td class="org-right">2</td>
-</tr>
-
<tr>
<td class="org-left">Bavarian State Research Center for Agriculture</td>
<td class="org-right">1</td>
@@ -928,25 +1097,21 @@ some python code on it.
<td class="org-left">Beilstein Institute for the Advancement of Chemical Sciences</td>
<td class="org-right">1</td>
</tr>
-
-<tr>
-<td class="org-left">Berlin State Library</td>
-<td class="org-right">2</td>
-</tr>
</tbody>
</table>
</div>
</div>
-<div id="outline-container-org1303490" class="outline-3">
-<h3 id="org1303490"><span class="section-number-3">4.2.</span> Counting Elements with awk</h3>
+
+<div id="outline-container-org40afcd3" class="outline-3">
+<h3 id="org40afcd3"><span class="section-number-3">4.2.</span> Counting Elements with awk</h3>
<div class="outline-text-3" id="text-4-2">
<p>
We’re not limited to python though. Here we’re going to perform a very similar
aggregation, but grouping by consortia to get the number of institutes at each.
-Like the listing <a href="#org6856d4c">3</a> above, we are going to use the output of
-listing <a href="#org866cd5d">2</a> (cf. tab.
-<a href="#org78b1ff9">2</a>) to perform this operation.
+Like the listing <a href="#org4c8d7fe">3</a> above, we are going to use the output of
+listing <a href="#org6353068">2</a> (cf. tab.
+<a href="#org0251484">2</a>) to perform this operation.
Instead of python, we’re going to use <code>awk</code> for our data processing.
</p>
@@ -960,7 +1125,7 @@ results.
<div class="org-src-container">
-<label class="org-src-name"><span class="listing-number">Listing 4: </span>Calculating the number of involved institions in one specific consortium.</label><pre class="src src-awk" id="orgaf32318"><span class="linenr"> 1: </span><span class="org-keyword">BEGIN</span> {
+<label class="org-src-name"><span class="listing-number">Listing 4: </span>Calculating the number of involved institions in one specific consortium.</label><pre class="src src-awk" id="orgb0021f3"><span class="linenr"> 1: </span><span class="org-keyword">BEGIN</span> {
<span class="linenr"> 2: </span><span class="org-comment-delimiter"># </span><span class="org-comment">before the evaluating process of the data begins</span>
<span class="linenr"> 3: </span><span class="org-comment-delimiter"># </span><span class="org-comment">this block is taken in account</span>
<span class="linenr"> 4: </span><span class="org-comment-delimiter"># </span><span class="org-comment">set the separator to tab</span>
@@ -1005,8 +1170,8 @@ NFDI4Earth (3 institutions).
-<div id="outline-container-org2751f39" class="outline-3">
-<h3 id="org2751f39"><span class="section-number-3">4.3.</span> Network Disply with R</h3>
+<div id="outline-container-org56ee722" class="outline-3">
+<h3 id="org56ee722"><span class="section-number-3">4.3.</span> Network Disply with R</h3>
<div class="outline-text-3" id="text-4-3">
<p>
How about something a little more visual than some tables? We can also create
@@ -1018,19 +1183,19 @@ embedding the results in the output.
<p>
And while we’re at it, how about another language? This time we’ll use R to make
a simple network plot of our data. Again, we’re still using the output from
-listiing <a href="#org866cd5d">2</a> (which is tab.
-<a href="#org78b1ff9">2</a>) to do this.
+listiing <a href="#org6353068">2</a> (which is tab.
+<a href="#org0251484">2</a>) to do this.
</p>
<p>
-The result is a nice visualization of a network (fig. <a href="#org2604bc0">2</a>).
+The result is a nice visualization of a network (fig. <a href="#orgbb3a07d">2</a>).
Such a visualization can help to detect outliers faster.
</p>
<div class="org-src-container">
-<label class="org-src-name"><span class="listing-number">Listing 5: </span>Network of all institutions and their related consortia.</label><pre class="src src-R" id="orgfa29fc2"><span class="linenr"> 1: </span><span class="org-comment-delimiter"># </span><span class="org-comment">making sure the required package is installed</span>
+<label class="org-src-name"><span class="listing-number">Listing 5: </span>Network of all institutions and their related consortia.</label><pre class="src src-R" id="org223485e"><span class="linenr"> 1: </span><span class="org-comment-delimiter"># </span><span class="org-comment">making sure the required package is installed</span>
<span class="linenr"> 2: </span><span class="org-ess-keyword">if</span> (!<span class="org-ess-modifiers">require</span>(<span class="org-string">"igraph"</span>)) install.packages(<span class="org-string">"igraph"</span>)
<span class="linenr"> 3: </span><span class="org-ess-modifiers">library</span>(<span class="org-string">"igraph"</span>)
<span class="linenr"> 4: </span><span class="org-comment-delimiter"># </span><span class="org-comment">making a more robust outcome by stating a seed number</span>
@@ -1053,7 +1218,7 @@ Such a visualization can help to detect outliers faster.
</div>
-<div id="org2604bc0" class="figure">
+<div id="orgbb3a07d" class="figure">
<p><img src="img/nfdi-network.png" alt="nfdi-network.png" width="70%" />
</p>
<p><span class="figure-number">Figure 2: </span>Network of NFDI consortia (red) and institutions (blue).</p>
@@ -1064,8 +1229,8 @@ Such a visualization can help to detect outliers faster.
-<div id="outline-container-org9a8308f" class="outline-2">
-<h2 id="org9a8308f"><span class="section-number-2">5.</span> Preserve</h2>
+<div id="outline-container-orge20e0aa" class="outline-2">
+<h2 id="orge20e0aa"><span class="section-number-2">5.</span> Preserve</h2>
<div class="outline-text-2" id="text-5">
<p>
There are two ways exporting this document in multiple documents.
@@ -1076,8 +1241,8 @@ different formats, which are more suitable for different occasions.
</div>
-<div id="outline-container-org0cb4e4a" class="outline-3">
-<h3 id="org0cb4e4a"><span class="section-number-3">5.1.</span> Manual export</h3>
+<div id="outline-container-org89ae948" class="outline-3">
+<h3 id="org89ae948"><span class="section-number-3">5.1.</span> Manual export</h3>
<div class="outline-text-3" id="text-5-1">
<p>
The common approach is to invoke the commands for exporting into a certain
@@ -1089,10 +1254,10 @@ C-e</code> and then select which export format you would like to have.
<p>
-In tab. <a href="#org37edb52">4</a> you find a quick overview of some basic formats.
+In tab. <a href="#org76c8487">4</a> you find a quick overview of some basic formats.
</p>
-<table id="org37edb52" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
+<table id="org76c8487" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<caption class="t-above"><span class="table-number">Table 4:</span> Overview of various individual export functions.</caption>
<colgroup>
@@ -1134,16 +1299,16 @@ In tab. <a href="#org37edb52">4</a> you find a quick overview of some basic form
-<div id="outline-container-org2b4872a" class="outline-3">
-<h3 id="org2b4872a"><span class="section-number-3">5.2.</span> Automatic batch process</h3>
+<div id="outline-container-orgccb6683" class="outline-3">
+<h3 id="orgccb6683"><span class="section-number-3">5.2.</span> Automatic batch process</h3>
<div class="outline-text-3" id="text-5-2">
<p>
In a batch process the file is opened with a clean and neutral version of emacs
-and will be exported (see listing <a href="#orgd03def7">6</a>).
+and will be exported (see listing <a href="#orge662ffc">6</a>).
</p>
<div class="org-src-container">
-<label class="org-src-name"><span class="listing-number">Listing 6: </span>Exporting file into various formats</label><pre class="src src-emacs-lisp" id="orgd03def7"><span class="linenr"> 1: </span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-keyword">let</span> <span class="org-rainbow-delimiters-depth-2">(</span><span class="org-rainbow-delimiters-depth-3">(</span>org-file <span class="org-rainbow-delimiters-depth-4">(</span><span class="org-constant">find-file-noselect</span> filename<span class="org-rainbow-delimiters-depth-4">)</span><span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span>
+<label class="org-src-name"><span class="listing-number">Listing 6: </span>Exporting file into various formats</label><pre class="src src-emacs-lisp" id="orge662ffc"><span class="linenr"> 1: </span><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-keyword">let</span> <span class="org-rainbow-delimiters-depth-2">(</span><span class="org-rainbow-delimiters-depth-3">(</span>org-file <span class="org-rainbow-delimiters-depth-4">(</span><span class="org-constant">find-file-noselect</span> filename<span class="org-rainbow-delimiters-depth-4">)</span><span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span>
<span class="linenr"> 2: </span> <span class="org-rainbow-delimiters-depth-2">(</span><span class="org-keyword">with-current-buffer</span> org-file
<span class="linenr"> 3: </span> <span class="org-rainbow-delimiters-depth-3">(</span><span class="org-function-name">org-html-export-to-html</span><span class="org-rainbow-delimiters-depth-3">)</span>
<span class="linenr"> 4: </span> <span class="org-rainbow-delimiters-depth-3">(</span><span class="org-constant">message</span> <span class="org-string">"HTML export successful."</span><span class="org-rainbow-delimiters-depth-3">)</span>
@@ -1177,12 +1342,16 @@ and will be exported (see listing <a href="#orgd03def7">6</a>).
There might be people having a different opinion.
</p></div></div>
+<div class="footdef"><sup><a id="fn.2" class="footnum" href="#fnr.2" role="doc-backlink">2</a></sup> <div class="footpara" role="doc-footnote"><p class="footpara">
+<a href="https://github.com/tbanel/orgaggregate">https://github.com/tbanel/orgaggregate</a>
+</p></div></div>
+
</div>
</div></div>
<div id="postamble" class="status">
<p class="author">Author: Jonathan A. Hartman | Lukas C. Bossert</p>
-<p class="date">Created: 2023-09-15 Fri 14:30</p>
+<p class="date">Created: 2023-09-17 Sun 00:06</p>
</div>
</body>
</html>
\ No newline at end of file
diff --git a/nfdi-in-emacs-with-orgmode.org b/nfdi-in-emacs-with-orgmode.org
index ed8d9590baaa001f61e8ef0f84a3b5f8e7d98f3e..4fa63f6266a9d066691f983a95a9fe20aeeb954e 100644
--- a/nfdi-in-emacs-with-orgmode.org
+++ b/nfdi-in-emacs-with-orgmode.org
@@ -96,7 +96,7 @@ If you like how to do this in more detail, have a look at [cite:@Bossert2023Wiki
#+name: raw-dataset
#+caption: Retrieving the dataset from wikidata
-#+BEGIN_SRC sparql -n -k :url https://query.wikidata.org/sparql :cache yes :exports both
+#+BEGIN_SRC sparql -n -k :url https://query.wikidata.org/sparql :format text/csv :cache yes :exports both
SELECT ?wLabel ?pLabel
WHERE
{
@@ -267,6 +267,7 @@ institutions_by_consortia = (
df
.groupby("wLabel")
.size()
+ .sort_values(ascending=False)
.reset_index(name="Count"))
# Return our dataframe in a way that org will
@@ -281,34 +282,72 @@ return [list(institutions_by_consortia.columns),
#+RESULTS: python-aggregation
| wLabel | Count |
|--------------------------------------------------------------+-------|
-| Academy of Sciences and Humanities in Hamburg | 1 |
-| Academy of Sciences and Literature Mainz | 4 |
-| Alfred Wegener Institute for Polar and Marine Research | 3 |
-| Anthropological Society (Munich) | 1 |
-| Arachnologische Gesellschaft | 1 |
-| Arbeitskreis Provenienzforschung e.V. | 1 |
-| Archivschule Marburg | 1 |
-| Archäologische Kommission für Niedersachsen | 1 |
-| Archäologisches Museum Hamburg und Stadtmuseum Harburg | 1 |
-| Arthistoricum | 1 |
-| Association for Data-Intensive Radio Astronomy | 1 |
-| Association for Technology and Construction in Agriculture | 1 |
-| Association of German Architects | 1 |
-| Association of Population Based Cancer Registries in Germany | 1 |
-| Association of states archaeologists | 1 |
-| BERD@NFDI | 1 |
-| Bach-Archiv Leipzig | 1 |
-| Bauhaus-Universität Weimar | 1 |
| Bavarian Academy of Sciences and Humanities | 7 |
-| Bavarian Forest National Park | 1 |
-| Bavarian Natural History Collections | 2 |
-| Bavarian State Archaeological Collection | 1 |
| Bavarian State Archives | 4 |
+| Academy of Sciences and Literature Mainz | 4 |
+| Alfred Wegener Institute for Polar and Marine Research | 3 |
+| Berlin State Library | 2 |
| Bavarian State Library | 2 |
-| Bavarian State Research Center for Agriculture | 1 |
-| Beethoven House | 1 |
+| Bavarian Natural History Collections | 2 |
+| BERD@NFDI | 1 |
| Beilstein Institute for the Advancement of Chemical Sciences | 1 |
-| Berlin State Library | 2 |
+| Beethoven House | 1 |
+| Bavarian State Research Center for Agriculture | 1 |
+| Bavarian State Archaeological Collection | 1 |
+| Bavarian Forest National Park | 1 |
+| Bauhaus-Universität Weimar | 1 |
+| Bach-Archiv Leipzig | 1 |
+| Academy of Sciences and Humanities in Hamburg | 1 |
+| Association of Population Based Cancer Registries in Germany | 1 |
+| Association of German Architects | 1 |
+| Association for Technology and Construction in Agriculture | 1 |
+| Association for Data-Intensive Radio Astronomy | 1 |
+| Arthistoricum | 1 |
+| Archäologisches Museum Hamburg und Stadtmuseum Harburg | 1 |
+| Archäologische Kommission für Niedersachsen | 1 |
+| Archivschule Marburg | 1 |
+| Arbeitskreis Provenienzforschung e.V. | 1 |
+| Arachnologische Gesellschaft | 1 |
+| Anthropological Society (Munich) | 1 |
+| Association of states archaeologists | 1 |
+
+There is also a "native way" getting the counting done by using the package
+=org-aggregate=[fn:2].
+
+#+ATTR_LaTeX: :environment longtable
+#+BEGIN: aggregate :table "result-clean-dataset" :cols "wLabel count();^A" :exports none
+| wLabel | count() |
+|--------------------------------------------------------------+---------|
+| Bavarian Academy of Sciences and Humanities | 7 |
+| Academy of Sciences and Literature Mainz | 4 |
+| Bavarian State Archives | 4 |
+| Alfred Wegener Institute for Polar and Marine Research | 3 |
+| Bavarian Natural History Collections | 2 |
+| Bavarian State Library | 2 |
+| Berlin State Library | 2 |
+| Academy of Sciences and Humanities in Hamburg | 1 |
+| Anthropological Society (Munich) | 1 |
+| Arachnologische Gesellschaft | 1 |
+| Arbeitskreis Provenienzforschung e.V. | 1 |
+| Archivschule Marburg | 1 |
+| Archäologische Kommission für Niedersachsen | 1 |
+| Archäologisches Museum Hamburg und Stadtmuseum Harburg | 1 |
+| Arthistoricum | 1 |
+| Association for Data-Intensive Radio Astronomy | 1 |
+| Association for Technology and Construction in Agriculture | 1 |
+| Association of German Architects | 1 |
+| Association of Population Based Cancer Registries in Germany | 1 |
+| Association of states archaeologists | 1 |
+| BERD@NFDI | 1 |
+| Bach-Archiv Leipzig | 1 |
+| Bauhaus-Universität Weimar | 1 |
+| Bavarian Forest National Park | 1 |
+| Bavarian State Archaeological Collection | 1 |
+| Bavarian State Research Center for Agriculture | 1 |
+| Beethoven House | 1 |
+| Beilstein Institute for the Advancement of Chemical Sciences | 1 |
+#+END:
+
** Counting Elements with awk
@@ -478,6 +517,7 @@ and will be exported (see listing [[batch-export]]).
#+print_bibliography:
* Footnotes
-# this is section is not printed out.
+
[fn:1] There might be people having a different opinion.
+[fn:2] https://github.com/tbanel/orgaggregate
diff --git a/nfdi-in-emacs-with-orgmode.pdf b/nfdi-in-emacs-with-orgmode.pdf
index f31cab25b0a5c7b8f4950615fc9637e6aa08da46..694249327b5a0cfa64f1c7c42c4358f2e5cc47bd 100644
Binary files a/nfdi-in-emacs-with-orgmode.pdf and b/nfdi-in-emacs-with-orgmode.pdf differ
diff --git a/nfdi-in-emacs-with-orgmode.tex b/nfdi-in-emacs-with-orgmode.tex
index edcdadd486a7a9cd8b1456ab1f4b7a3183139534..c440e10ef02f61bc04d0f2b75bcef96c8eb9c6d7 100644
--- a/nfdi-in-emacs-with-orgmode.tex
+++ b/nfdi-in-emacs-with-orgmode.tex
@@ -1,4 +1,4 @@
-% Created 2023-09-15 Fri 14:30
+% Created 2023-09-17 Sun 00:10
% Intended LaTeX compiler: lualatex
\documentclass[11pt]{article}
\usepackage{graphicx}
@@ -46,7 +46,7 @@
\section{Overview}
-\label{sec:org9446d62}
+\label{sec:orgb1baff2}
This document provides insights into an efficient way handling data.
We show not only how to retrieve data from an publicly accesible webpge but also
how the data can be processed afterwards. We admit that in the examples shown
@@ -65,7 +65,7 @@ processing and last presevering the data and its documentation (fig. \ref{workfl
\section{Introduce}
-\label{sec:org428c6d0}
+\label{sec:org72a1101}
What is Emacs and \textbf{org-mode}? Well, where to start? You may not have heard of
Emacs or org-mode, yet. Usually it is considered to a tool for geeks, \ldots{}.. this
might be kind of true, but once you noticed the myriard ways of using
@@ -110,7 +110,7 @@ since this combines a well documented way of analysing a data set.
\section{Prepare}
-\label{sec:orgc64c42e}
+\label{sec:org2fdb5a0}
For our demonstration, we are going to create a dataset from openly available
data on the German National Research Data Infrastructure (\textbf{NFDI}) and perform
@@ -118,7 +118,7 @@ some simple analysis tasks on it.
\subsection{Data retrieval using SPARQL}
-\label{sec:orgec9d828}
+\label{sec:org1e83c85}
The data we are interested in exists on Wikidata. Wikidata is similar to
Wikipedia, but rather than long form articles, the data is stored as structured
data. This allows machines to easily access and traverse these pages with query
@@ -227,7 +227,7 @@ Berlin State Library & NFDI4Memory\\[0pt]
\subsection{Data cleaning using shell}
-\label{sec:org557f301}
+\label{sec:org3315362}
The data we got from listing \ref{raw-dataset} is good but it needs further cleaning.
We can see several entries in our data that look like ``Q1234567'' - These are Q
@@ -309,10 +309,10 @@ Berlin State Library & NFDI4Memory\\[0pt]
\end{longtable}
\section{Process}
-\label{sec:org0792556}
+\label{sec:org7477678}
\subsection{Data Aggregation with Python}
-\label{sec:orgfc6e1a0}
+\label{sec:org650a249}
The great thing about org mode is that we can seamlessly switch between
languages! Our original query (listing \ref{raw-dataset}) was written in SPARQL, which returned
@@ -340,6 +340,7 @@ institutions_by_consortia = (
df
.groupby("wLabel")
.size()
+ .sort_values(ascending=False)
.reset_index(name="Count"))
# Return our dataframe in a way that org will
@@ -367,9 +368,51 @@ wLabel & Count \\[0pt]
\endfoot
\endlastfoot
\hline
+Bavarian Academy of Sciences and Humanities & 7\\[0pt]
+Bavarian State Archives & 4\\[0pt]
+Academy of Sciences and Literature Mainz & 4\\[0pt]
+Alfred Wegener Institute for Polar and Marine Research & 3\\[0pt]
+Berlin State Library & 2\\[0pt]
+Bavarian State Library & 2\\[0pt]
+Bavarian Natural History Collections & 2\\[0pt]
+BERD@NFDI & 1\\[0pt]
+Beilstein Institute for the Advancement of Chemical Sciences & 1\\[0pt]
+Beethoven House & 1\\[0pt]
+Bavarian State Research Center for Agriculture & 1\\[0pt]
+Bavarian State Archaeological Collection & 1\\[0pt]
+Bavarian Forest National Park & 1\\[0pt]
+Bauhaus-Universität Weimar & 1\\[0pt]
+Bach-Archiv Leipzig & 1\\[0pt]
Academy of Sciences and Humanities in Hamburg & 1\\[0pt]
+Association of Population Based Cancer Registries in Germany & 1\\[0pt]
+Association of German Architects & 1\\[0pt]
+Association for Technology and Construction in Agriculture & 1\\[0pt]
+Association for Data-Intensive Radio Astronomy & 1\\[0pt]
+Arthistoricum & 1\\[0pt]
+Archäologisches Museum Hamburg und Stadtmuseum Harburg & 1\\[0pt]
+Archäologische Kommission für Niedersachsen & 1\\[0pt]
+Archivschule Marburg & 1\\[0pt]
+Arbeitskreis Provenienzforschung e.V. & 1\\[0pt]
+Arachnologische Gesellschaft & 1\\[0pt]
+Anthropological Society (Munich) & 1\\[0pt]
+Association of states archaeologists & 1\\[0pt]
+\end{longtable}
+
+There is also a ``native way'' getting the counting done by using the package
+\texttt{org-aggregate}\footnote{\url{https://github.com/tbanel/orgaggregate}}.
+
+\begin{center}
+\begin{tabular}{lr}
+wLabel & count()\\[0pt]
+\hline
+Bavarian Academy of Sciences and Humanities & 7\\[0pt]
Academy of Sciences and Literature Mainz & 4\\[0pt]
+Bavarian State Archives & 4\\[0pt]
Alfred Wegener Institute for Polar and Marine Research & 3\\[0pt]
+Bavarian Natural History Collections & 2\\[0pt]
+Bavarian State Library & 2\\[0pt]
+Berlin State Library & 2\\[0pt]
+Academy of Sciences and Humanities in Hamburg & 1\\[0pt]
Anthropological Society (Munich) & 1\\[0pt]
Arachnologische Gesellschaft & 1\\[0pt]
Arbeitskreis Provenienzforschung e.V. & 1\\[0pt]
@@ -385,20 +428,17 @@ Association of states archaeologists & 1\\[0pt]
BERD@NFDI & 1\\[0pt]
Bach-Archiv Leipzig & 1\\[0pt]
Bauhaus-Universität Weimar & 1\\[0pt]
-Bavarian Academy of Sciences and Humanities & 7\\[0pt]
Bavarian Forest National Park & 1\\[0pt]
-Bavarian Natural History Collections & 2\\[0pt]
Bavarian State Archaeological Collection & 1\\[0pt]
-Bavarian State Archives & 4\\[0pt]
-Bavarian State Library & 2\\[0pt]
Bavarian State Research Center for Agriculture & 1\\[0pt]
Beethoven House & 1\\[0pt]
Beilstein Institute for the Advancement of Chemical Sciences & 1\\[0pt]
-Berlin State Library & 2\\[0pt]
-\end{longtable}
+\end{tabular}
+\end{center}
+
\subsection{Counting Elements with awk}
-\label{sec:org10f508b}
+\label{sec:orgf0aaa45}
We’re not limited to python though. Here we’re going to perform a very similar
aggregation, but grouping by consortia to get the number of institutes at each.
@@ -457,7 +497,7 @@ NFDI4Earth (3 institutions).
\subsection{Network Disply with R}
-\label{sec:org2a39f3e}
+\label{sec:org5c9cd23}
How about something a little more visual than some tables? We can also create
plots and visuals, generating them with the code contained in the document and
@@ -508,7 +548,7 @@ plot(NFDI_network, # loading data frame
\section{Preserve}
-\label{sec:orge2cb62b}
+\label{sec:org36352f8}
There are two ways exporting this document in multiple documents.
@@ -518,7 +558,7 @@ different formats, which are more suitable for different occasions.
\subsection{Manual export}
-\label{sec:org5536073}
+\label{sec:org56ebae6}
The common approach is to invoke the commands for exporting into a certain
format individually and by hand.
Org-mode has a great build in exporting mechanism which converts the document
@@ -545,7 +585,7 @@ ASCII & \texttt{SPC m e t a} & \texttt{C-c C-e t a}\\[0pt]
\subsection{Automatic batch process}
-\label{sec:org1a9fea8}
+\label{sec:org64e2378}
In a batch process the file is opened with a clean and neutral version of emacs
and will be exported (see listing \ref{batch-export}).
diff --git a/nfdi-in-emacs-with-orgmode.txt b/nfdi-in-emacs-with-orgmode.txt
index d35c5e1cc42a725df14100262d98d105923fa263..5beb885356cc16731aa9abd36d794df0e5883226 100644
--- a/nfdi-in-emacs-with-orgmode.txt
+++ b/nfdi-in-emacs-with-orgmode.txt
@@ -289,49 +289,85 @@ _________________
| 10 df
| 11 .groupby("wLabel")
| 12 .size()
- | 13 .reset_index(name="Count"))
- | 14
- | 15 # Return our dataframe in a way that org will
- | 16 # display it as an org table
- | 17 return [list(institutions_by_consortia.columns),
- | 18 None, *map(list, institutions_by_consortia.values)]
+ | 13 .sort_values(ascending=False)
+ | 14 .reset_index(name="Count"))
+ | 15
+ | 16 # Return our dataframe in a way that org will
+ | 17 # display it as an org table
+ | 18 return [list(institutions_by_consortia.columns),
+ | 19 None, *map(list, institutions_by_consortia.values)]
`----
Listing 3: Counting the number of consortia involved in one
institution.
wLabel Count
---------------------------------------------------------------------
- Academy of Sciences and Humanities in Hamburg 1
- Academy of Sciences and Literature Mainz 4
- Alfred Wegener Institute for Polar and Marine Research 3
- Anthropological Society (Munich) 1
- Arachnologische Gesellschaft 1
- Arbeitskreis Provenienzforschung e.V. 1
- Archivschule Marburg 1
- Archäologische Kommission für Niedersachsen 1
- Archäologisches Museum Hamburg und Stadtmuseum Harburg 1
- Arthistoricum 1
- Association for Data-Intensive Radio Astronomy 1
- Association for Technology and Construction in Agriculture 1
- Association of German Architects 1
- Association of Population Based Cancer Registries in Germany 1
- Association of states archaeologists 1
- BERD@NFDI 1
- Bach-Archiv Leipzig 1
- Bauhaus-Universität Weimar 1
Bavarian Academy of Sciences and Humanities 7
- Bavarian Forest National Park 1
- Bavarian Natural History Collections 2
- Bavarian State Archaeological Collection 1
Bavarian State Archives 4
+ Academy of Sciences and Literature Mainz 4
+ Alfred Wegener Institute for Polar and Marine Research 3
+ Berlin State Library 2
Bavarian State Library 2
- Bavarian State Research Center for Agriculture 1
- Beethoven House 1
+ Bavarian Natural History Collections 2
+ BERD@NFDI 1
Beilstein Institute for the Advancement of Chemical Sciences 1
- Berlin State Library 2
+ Beethoven House 1
+ Bavarian State Research Center for Agriculture 1
+ Bavarian State Archaeological Collection 1
+ Bavarian Forest National Park 1
+ Bauhaus-Universität Weimar 1
+ Bach-Archiv Leipzig 1
+ Academy of Sciences and Humanities in Hamburg 1
+ Association of Population Based Cancer Registries in Germany 1
+ Association of German Architects 1
+ Association for Technology and Construction in Agriculture 1
+ Association for Data-Intensive Radio Astronomy 1
+ Arthistoricum 1
+ Archäologisches Museum Hamburg und Stadtmuseum Harburg 1
+ Archäologische Kommission für Niedersachsen 1
+ Archivschule Marburg 1
+ Arbeitskreis Provenienzforschung e.V. 1
+ Arachnologische Gesellschaft 1
+ Anthropological Society (Munich) 1
+ Association of states archaeologists 1
Table 3: Overview of institutions and the count of their associated
consortia.
+ There is also a "native way" getting the counting done by using the
+ package `org-aggregate'[2].
+
+
+ wLabel count()
+ -----------------------------------------------------------------------
+ Bavarian Academy of Sciences and Humanities 7
+ Academy of Sciences and Literature Mainz 4
+ Bavarian State Archives 4
+ Alfred Wegener Institute for Polar and Marine Research 3
+ Bavarian Natural History Collections 2
+ Bavarian State Library 2
+ Berlin State Library 2
+ Academy of Sciences and Humanities in Hamburg 1
+ Anthropological Society (Munich) 1
+ Arachnologische Gesellschaft 1
+ Arbeitskreis Provenienzforschung e.V. 1
+ Archivschule Marburg 1
+ Archäologische Kommission für Niedersachsen 1
+ Archäologisches Museum Hamburg und Stadtmuseum Harburg 1
+ Arthistoricum 1
+ Association for Data-Intensive Radio Astronomy 1
+ Association for Technology and Construction in Agriculture 1
+ Association of German Architects 1
+ Association of Population Based Cancer Registries in Germany 1
+ Association of states archaeologists 1
+ BERD@NFDI 1
+ Bach-Archiv Leipzig 1
+ Bauhaus-Universität Weimar 1
+ Bavarian Forest National Park 1
+ Bavarian State Archaeological Collection 1
+ Bavarian State Research Center for Agriculture 1
+ Beethoven House 1
+ Beilstein Institute for the Advancement of Chemical Sciences 1
+
4.2 Counting Elements with awk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -514,3 +550,5 @@ Footnotes
_________
[1] There might be people having a different opinion.
+
+[2] <https://github.com/tbanel/orgaggregate>