-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
136 lines (94 loc) · 3.85 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# <img src="man/figures/logo.png" />
<!-- badges: start -->
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
[![R-CMD-check](https://github.com/WarwickCIM/grapho/workflows/R-CMD-check/badge.svg)](https://github.com/WarwickCIM/grapho/actions)
[![Codecov test coverage](https://codecov.io/gh/WarwickCIM/grapho/branch/master/graph/badge.svg)](https://codecov.io/gh/WarwickCIM/grapho?branch=master)
<!-- badges: end -->
Grapho is an R package for recording the commands and visualisations created in an R session. Functions are provided for parsing and visualising the user workflow.
Grapho is part of [WAYS: What aren't you seeing](https://www.turing.ac.uk/research/research-projects/ways-what-arent-you-seeing). The goal of this Turing funded research project is to 'develop tools which enhance people’s capacity to visualise data, by letting them see what can and can’t be seen in the visualisation.'.
The version in this repository is currently under active development. A full
release is forthcoming. Please see the roadmap for more details.
The package is written by [Dr James Tripp](https://http://warwick.ac.uk/jamestripp) and [Dr Greg McInerny](https://warwick.ac.uk/fac/cross_fac/cim/people/greg-mcinerny/). Please contact [James](mailto:james.tripp@warwick.ac.uk) with any technical issues.
## Installation
install the remotes package.
```r
install.packages('remotes')
```
Then install the grapho package from github:
```r
remotes::install_github('warwickcim/grapho')
```
## Use
Grapho will start recording a session once loaded using either
```r
require(grapho)
```
or
```r
library(grapho)
```
which will display a message welcoming you to the Grapho package. Grapho will
now record your console commands, plots you create, errors and warnings.
You can view the files created by the grapho package by going to your Grapho
folder location as shown in the introductory messages. Another way to get the
location of the grapho folder is by running the below.
```r
Sys.getenv('GRAPHO_FOLDER')
```
You can view a summary of the files contents of your grapho archive by running.
```r
parse_grapho_archive()
```
You can stop and start grapho collecting data by running the command
```r
toggle_grapho()
```
## Data submission
Part of the WAYS research project is to examine your workflow. Part of that is
to collect anonymous data about your R session. If you wish to send us your
data then please run the R command
```r
prepare_archive()
```
which will zip up the files in your grapho archive, tell you the location of
the zip file and the location of the form for you to submit the zip files to.
## Data
Your data is anonymous. Your files are identified with a session and user ID.
Both the session and user ID are shown when you load in grapho. You can also
view the current user ID by running
```r
Sys.getenv('GRAPHO_USER_ID')
```
and get your current session ID by running the below.
```r
Sys.getenv('GRAPHO_SESSION_ID')
```
The user ID is generated by running
```r
user_hash <- digest::digest(
c(Sys.getenv('HOME'),
Sys.getenv('LANG'),
Sys.getenv('R_PLATFORM')),
algo = 'sha512'
)
Sys.setenv(
GRAPHO_USER_ID = substr(user_hash, 1, 40)
)
```
where a sha512 hash is generated from a combination of your home directory
location, system language and the version of R you are using. Your user ID is
the first 40 characters of the hash.
Your session ID is generated by running
```r
session_hash <- digest::digest(
date(), algo = 'sha512'
)
Sys.setenv(
GRAPHO_SESSION_ID = substr(session_hash, 1, 40)
)
```
which takes the first 40 characters of an SHA512 has of the current date.