Skip to content
Snippets Groups Projects
Commit ad7d6fc8 authored by Jonathan Hartman's avatar Jonathan Hartman
Browse files

standardize case for emacs keywords

parent da2cca64
No related branches found
No related tags found
No related merge requests found
#+begin_comment
#+BEGIN_COMMENT
SETUP:
- DOOM big font (SPC t b)
#+end_comment
#+END_COMMENT
* Overview
Welcome to our best practice example!
#+caption: Workflow of the document. Source [[https://excalidraw.com/#room=8617c3374a9c2c2c895b,a_SoKClI-tyAxWfSgzThWQ][Excalidraw]].
#+CAPTION: Workflow of the document. Source [[https://excalidraw.com/#room=8617c3374a9c2c2c895b,a_SoKClI-tyAxWfSgzThWQ][Excalidraw]].
#+attr_org: :width 1700
[[file:nfdi-in-emacs-best-practice-overview.png]]
......@@ -47,8 +47,8 @@ For more, have a look at [cite:@Bossert2023Wikidata]
@@comment:add bibliography in header: #+bibliography: emacs-references.bib@@
#+name: raw-dataset
#+caption: Retrieving the dataset from wikidata
#+NAME: raw-dataset
#+CAPTION: Retrieving the dataset from wikidata
#+BEGIN_SRC sparql -n :url https://query.wikidata.org/sparql :cache yes :exports both
SELECT ?wLabel ?pLabel
WHERE
......@@ -121,7 +121,7 @@ LIMIT 50
** Data cleaning using shell
The data we got from listing [[raw-dataset]] is good but it needs further cleaning.
#+caption: Cleaning the raw data.
#+CAPTION: Cleaning the raw data.
#+NAME: clean-dataset
#+BEGIN_SRC sh -n :var input=raw-dataset :colnames yes :exports both
echo "$input" | sed -E '/Q[0-9]+/d'
......@@ -227,8 +227,8 @@ return [list(agg_df.columns), None, *map(list, agg_df.values)]
Now the other way round: get amount of institutions per consortium.
#+name: inst-count
#+begin_src awk -n :stdin clean-dataset :var consortium="NFDI4Memory" :results value drawer :exports code
#+NAME: inst-count
#+BEGIN_SRC awk -n :stdin clean-dataset :var consortium="NFDI4Memory" :results value drawer :exports code
BEGIN {
FS = "\t"
}
......@@ -236,7 +236,7 @@ BEGIN {
END {
for (k in counts) print consortium " (" counts[k] " institutions)"
}
#+end_src
#+END_SRC
#+RESULTS: inst-count
:results:
......@@ -259,7 +259,7 @@ call_inst-count("NFDI4Earth") {{{results(NFDI4Earth (3 institutions))}}}.
** Network Display with R
Visualize the connections in R
#+begin_src R -n :var NFDI_edges=clean-dataset :results graphics file :exports both :file network-plot.png
#+BEGIN_SRC R -n :var NFDI_edges=clean-dataset :results graphics file :exports both :file network-plot.png
library("igraph")
NFDI_network <- graph_from_data_frame(NFDI_edges,
......@@ -270,7 +270,7 @@ plot(NFDI_network,
vertex.label = NA,
edge.curved = 0.2,
)
#+end_src
#+END_SRC
#+RESULTS:
[[file:network-plot.png]]
......@@ -294,14 +294,14 @@ QUESTION
* Next Steps :noexport:
#+begin_comment
#+author: Jonathan A. Hartman | Lukas C. Bossert
#+title: Data processing, Code documenting and Beyond
#+date: <2023-09-12 Tue>
#+end_comment
#+BEGIN_COMMENT
#+AUTHOR: Jonathan A. Hartman | Lukas C. Bossert
#+TITLE: Data processing, Code documenting and Beyond
#+DATE: <2023-09-12 Tue>
#+END_COMMENT
Better LaTeX-Export
#+begin_comment
#+BEGIN_COMMENT
#+LATEX_COMPILER: lualatex
#+LATEX_CLASS: article
#+LATEX_HEADER: \usepackage{minimalist}
......@@ -313,29 +313,29 @@ Better LaTeX-Export
#+ATTR_LaTeX: :environment longtable
#+attr_html: :width 70%
#+attr_LaTeX: :width .5\linewidth
#+end_comment
#+ATTR_HTML: :width 70%
#+ATTR_LATEX: :width .5\linewidth
#+END_COMMENT
Pandoc
#+begin_comment
#+BEGIN_COMMENT
#+PANDOC_VARIABLES: documentclass:scrartcl
#+PANDOC_VARIABLES: classoption:10pt
#+PANDOC_OPTIONS: highlight-style:zenburn
#+end_comment
#+END_COMMENT
Better HTML-Export
#+begin_comment
#+BEGIN_COMMENT
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+end_comment
#+END_COMMENT
Very optional
#+begin_comment
#+title: Data Processing, Code Documentation and Beyond {{{NEWLINE}}} (Emacs and org-mode)
#+BEGIN_COMMENT
#+TITLE: Data Processing, Code Documentation and Beyond {{{NEWLINE}}} (Emacs and org-mode)
#+MACRO: NEWLINE @@latex:\\@@ @@html:<br>@@
#+end_comment
#+END_COMMENT
#+print_bibliography:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment