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