@@ -11,11 +11,16 @@ The paper is divided into three main steps, focussing on first preparing, second
## Emacs
## org-mode
> "Org-mode does outlining, note-taking, hyperlinks, spreadsheets, TODO lists, project planning, GTD, HTML and LaTeX authoring, all with plain text files in Emacs." - Carsten Dominik
> "Org-mode does outlining, note-taking, hyperlinks, spreadsheets, TODO lists, project planning, GTD, HTML and LaTeX authoring, all with plain text files in Emacs."
>
> -- Carsten Dominik
In other words...
> "Back to the future for plain text" - Carsten Dominik
> "Back to the future for plain text"
>
> -- Carsten Dominik
Let’s make an executive summary of org-mode:
...
...
@@ -37,10 +42,130 @@ Org-mode is a magnificent tool when it comes to reproducible research [^1], sinc
## org-babel
- What is it and how it relates to org mode
### How to write a Code Cell
- syntax
- optional parameters
# Preparing Data
## Wikidata
- What is it
- Who can edit it
## SPARQL
- Related to SQL
- Can be used to query wikidata
## Requesting Our Data
In order to retreive our data from Wikidata...
``` SPARQL
#+NAME: raw-dataset
#+CAPTION: Retrieving the dataset from wikidata
#+HEADER: :url https://query.wikidata.org/sparql
#+HEADER: :format text/csv
#+HEADER: :cache yes :exports both
#+BEGIN_SRC SPARQL -n -k
SELECT ?wLabel ?pLabel
WHERE
{
?p wdt:P31 wd:Q98270496 . (ref:consortium)
?p wdt:P1416 ?w . (ref:affiliations)
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
ORDER BY ASC(?wLabel) ASC(?pLabel)
LIMIT 50
#+END_SRC
```
Our org-babel cell is made up of several components:
- NAME
* "raw-dataset" is the name of this cell. It will be used later to refer to the output of this cell.