Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Mar 12, 2024
0 parents commit e87f420
Show file tree
Hide file tree
Showing 4 changed files with 114 additions and 0 deletions.
16 changes: 16 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
project:
type: website

website:
title: "rOpenSci Dashboard"
navbar:
left:
- href: index.qmd
text: Home
- editors.qmd

format:
html:
theme: cosmo
css: styles.css
toc: true
90 changes: 90 additions & 0 deletions editors.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
title: "Editor Availability"
format:
html:
fig-width: 8
fig-height: 4
code-fold: false
---

```{r get-ed-dat, echo = FALSE}
library (dashboard)
library (gt)
ed_dat <- editor_status (quiet = TRUE)
```

The following table summarises the availability of general (not statistical)
editors. The `inactive_for` values are hyperlinked to the most recent
submission issue for each editor.

```{r editor-vacantion-status, echo = FALSE}
editor_vacation <- airtabler::airtable (
base = "app8dssb6a7PG6Vwj", table = "editor-vacation-status"
)
editor_vacation <- editor_vacation$`editor-vacation-status`$select_all (fields = list ("editor", "Action", "Start Date", "Return Date"))
index <- vapply (editor_vacation$editor, function (i) length (i) > 0L, logical (1L))
edvac <- editor_vacation [which (index), ]
rev_prod <- airtabler::airtable (
base = "app8dssb6a7PG6Vwj", table = "reviewers-prod"
)
rev_prod <- rev_prod$`reviewers-prod`$select_all (fields = list ("github", "name"))
rev_prod <- rev_prod [match (edvac$editor, rev_prod$id), ]
edvac$github <- rev_prod$github
edvac$name <- rev_prod$name
edvac$away <- FALSE
s <- edvac$`Start Date` [2]
index <- (!is.na (edvac$`Start Date`) & is.na (edvac$`Return Date`)) |
as.Date (edvac$`Return Date`) > Sys.Date ()
index [which (is.na (index))] <- FALSE
edvac$away [index] <- TRUE
editors_on_vacation <- edvac$github [which (edvac$away)]
ed_dat$status [ed_dat$editor %in% editors_on_vacation] <- "VACATION"
```


```{r editor-table, echo = FALSE}
#| label: fig-editors-general
ed_dat_gen <- ed_dat [which (!ed_dat$stats), ]
ed_dat_gen$status <- factor (ed_dat_gen$status, levels = c ("FREE", "BUSY", "VACATION"))
ed_dat_gen <- dplyr::group_by (ed_dat_gen, status) |>
dplyr::arrange (dplyr::desc (inactive_days), .by_group = TRUE) |>
dplyr::ungroup ()
add_html <- function (dat, what = "inactive_for") {
u <- "https://github.com/ropensci/software-review/issues/"
dat [[what]] <- paste0 (
"<p><a href=",
u,
dat$number,
">",
dat [[what]],
"</a>"
)
dat [[what]] <- lapply (dat [[what]], gt::html)
return (dat)
}
ed_dat_gen <- add_html (ed_dat_gen, what = "inactive_for")
gt::gt (
ed_dat_gen,
groupname_col = "status"
) |>
gt::tab_header ("Editor Status Overview") |>
gt::cols_hide (c (stats, inactive_days, number, state)) |>
gt::tab_style (
style = list (gt::cell_fill (color = "#FFFF8088")),
locations = gt::cells_body (
columns = c (`editor`, `inactive_for`),
rows = status == "FREE"
)
) |>
gt::tab_options (
heading.background.color = "#ACEACE",
row_group.background.color = "#ACEACE",
column_labels.background.color = "#9BD9BD",
heading.title.font.size = "200%"
)
```
7 changes: 7 additions & 0 deletions index.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "rOpenSci Editor Dashboard"
---

Overview of [rOpenSci software review
issues](https://github.com/ropensci/software-review/issues), and editor
availability.
1 change: 1 addition & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* css styles */

0 comments on commit e87f420

Please sign in to comment.