-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path_load-data.qmd
More file actions
32 lines (27 loc) · 993 Bytes
/
_load-data.qmd
File metadata and controls
32 lines (27 loc) · 993 Bytes
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
```{r}
#| label: load-data
library(dplyr)
# library(tidyr)
library(stringr)
# library(purrr)
# library(readr)
# library(glue)
# library(jsonlite)
library(redivis)
# project <- redivis::user("bdomingu")$dataset("irw_meta:bdxt:v1_1")
# metadata_table <- project$table("metadata:h5gs")
# # get metadata table
# metadata <- metadata_table$to_tibble()
# metadata <- metadata |>
# mutate(partition = if_else(n_categories == 2, "dichotomous", "polytomous"))
biblio <- redivis$user("bdomingu")$dataset("irw_meta:bdxt:latest")$table("biblio:qahg")$to_tibble()
# First in the R section, we need to properly define the data for OJS
data_index <- biblio |>
rename(dataset = `table`, url = URL__for_data_, license = `Derived_License`,
description = Description, reference = Reference_x, doi = DOI__for_paper_) |>
mutate(dataset = str_remove(dataset, ".R.ata$")) |>
arrange(dataset)
# Make it available to OJS
ojs_define(data_index = data_index)
# ojs_define(metadata = metadata)
```