-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
86 lines (63 loc) · 1.98 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
x = c(1, 2)
```
# c2d
The goal of c2d is to host code for loading data used in creds2.
Fun example in Python to show reproducible code:
```{r, engine='python'}
import numpy as np
x = [1, 2, 4, 9]
y = [2, 3, 5, 6]
# import matplotlib
z = np.add(x, y)
print(z)
```
## Packages used
We'll use the following packages.
Make sure you've installed them before proceeding, e.g. with the following code:
```{r, eval=FALSE}
pkgs = c(
"DiagrammeR",
"tidyverse",
"tabplot"
)
install.packages(pkgs)
```
## Flow diagram
The plot below, generated using reproducible code stored in the script `data-flow-diag.R`, is a data flow diagram ([DFD](https://en.wikipedia.org/wiki/Data_flow_diagram)).
We will modify this as the project evolve as we clarify the work to be done.
```{r, message=FALSE}
source("data-flow-diag.R")
render_graph(g, layout = "tree")
```
## Exploration of data
```{r, message=FALSE}
library(tidyverse)
d = read_csv("all_cluster_variables.csv")
tabplot::tableplot(d[2:10], sortCol = "Income")
tabplot::tableplot(d[11:18])
tabplot::tableplot(d[19:30])
tabplot::tableplot(d[31:43])
tabplot::tableplot(d[44:55])
```
## References
References can be found in the 'creds2' folder of the energy-and-transport Zotero group: https://www.zotero.org/groups/418217/energy-and-transport/items/collectionKey/AS8RTJ2X
Get all the references by signing-in to Zotero, downloading the app, and syncing it on your computer.
Alternatively, anyone can download the latest bib file from this as follows:
```{r}
refs = RefManageR::ReadZotero(group = "418217", .params = list(collection = "AS8RTJ2X", limit = 100))
RefManageR::WriteBib(refs, "references.bib")
```
The citations are also saved in the GitHub folder.
```{r, echo=FALSE, eval=FALSE}
# Core binary files
piggyback::pb_upload("UKCRED_2.1.1 Excess demand_v3.docx")
```