-
Notifications
You must be signed in to change notification settings - Fork 3
/
databrary.Rmd
93 lines (64 loc) · 3.95 KB
/
databrary.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
---
title: "About Databrary"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{About Databrary}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```
Databrary is a powerful tool for storing and sharing video data and documentation with other researchers.
With the `databraryr` package, it becomes even more powerful.
Rather than interact with Databrary through a web browser, users can write their own code to download participant data or even specific files.
I wrote `databraryr` so that I could better understand how the site works under the hood, and so that I could streamline my own analysis and data sharing workflows.
Let's get started.
## Registering
Access to most of the material on Databrary requires prior registration and [authorization](https://databrary.org/about/agreement.html) from an institution.
The authorization process requires formal agreement by an institution.
But you'll create an account ID (email) and secure password when you register.
Then, when you log in with your new credentials, you'll select an existing institution (if yours is on the list), a new institution (if yours isn't), or an existing authorized investigator (if you are a student, postdoc, or collaborator) to request authorization from.
## Installation
### Official CRAN release
- Install the package from CRAN via install.packages("databraryr").
### Development release
- Install the devtools package from CRAN: `install.packages("devtools")` if you have not already done so.
- Load `devtools` into your local environment: `library(devtools)`.
- Install the databraryr package via `install_github("databrary/databraryr")`. Required dependencies will be installed at this time.
### v0.6.2
- The latest version of the code is v0.6.2. This version uses the `httr2` package under the hood, and it runs much faster than v0.5.x.
## First steps (while you await authorization)
But even before formal authorization is complete, a user can access the public materials on Databrary.
For this vignette, we'll assume you fall into this category.
Once you've installed the package following one of the above routes, it's a good idea to check that your installation worked by loading it into your local workspace.
```{r eval=FALSE}
library(databraryr)
```
Then, try this command to pull data about Databrary's founders:
```{r list-people-default}
databraryr::list_people()
```
Note that this command returns a data frame (tibble) with columns that include the first name (`prename`), last name (`sortname`), affiliation, lab or personal website, and ORCID ID if available.
Databrary assigns a unique integer for each person and institution on the system called a 'party id'.
When we run `list_people(1:25)` we are asking the system to provide us information about all of the _people_ whose party id's are between 1 and 25. Let's try it:
```{r list-people-1-25}
databraryr::list_people(people_list = 1:25)
```
It's a bit slow, but you should see information about people beginning with Dylan Simon, the developer who designed and built most of the Databrary system, and ending with Gladys Chan, a graphic designer who created the Databrary and Datavyu logos and other graphic identity elements.
You can also try seeing what's new on Databrary.
The `get_db_stats()` command gives you information about the newly authorized people, institutions, and newly uploaded datasets.
Try this:
```{r get-db-stats}
databraryr::get_db_stats("stats")
databraryr::get_db_stats("people")
databraryr::get_db_stats("institutions")
databraryr::get_db_stats("datasets")
```
Depending on when you run this command and how often, there may or may not be new items.
## Next steps
To see more about how to access data on Databrary using `databraryr` visit the [accessing data](accessing-data.Rmd) vignette.
To see how to log in and log out once you have authorization, see the vignette for [authorized users](authorized-users.Rmd).