Skip to content

Commit

Permalink
Add value boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrerebeau committed Oct 1, 2024
1 parent 177cfce commit 1829747
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 25 deletions.
1 change: 1 addition & 0 deletions _header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<meta name="robots" content="noindex">
17 changes: 1 addition & 16 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
project:
type: website

website:
title: "dashboard.tesselle"
description: |
tesselle is a collection of [R](https://www.r-project.org/) packages for
research and teaching in archaeology. These packages focus on quantitative
analysis methods developed for archaeology. The tesselle packages are
designed to work seamlessly together and to complement general-purpose and
other specialized statistical packages.
site-url: https://dashboard.tesselle.org
repo-url: https://github.com/tesselle/dashboard
repo-actions: [edit, issue]

favicon: /images/icons/favicon.ico
image: /images/card.png
output-dir: _site
68 changes: 59 additions & 9 deletions index.qmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
---
title: "dashboard.tesselle"
format: dashboard
format:
dashboard:
nav-buttons:
- icon: house
text: Homepage
href: "https://www.tesselle.org"
default-image-extension: ""
include-in-header: _header.html
---

# {.sidebar}

![](images/tesselle.png){fig-alt="Logo of the tesselle project."}

**tesselle** is a collection of [R](https://www.r-project.org/) packages for research and teaching in archaeology. These packages focus on quantitative analysis methods developed for archaeology. The tesselle packages are designed to work seamlessly together and to complement general-purpose and other specialized statistical packages.

Last update: `r Sys.Date()`.

```{r}
#| label: setup
## Load packages
Expand Down Expand Up @@ -44,6 +58,48 @@ col_pkg <- c(aion = "#882E72", alkahest = "#1965B0", arkhe = "#5289C7",

## Row

```{r}
#| content: valuebox
#| title: "CRAN Packages"
list(
icon = "box-seam",
color = "secondary",
value = sum(!is.na(metadata$version))
)
```

```{r}
#| content: valuebox
#| title: "Open Issues"
list(
icon = "patch-exclamation",
color = "secondary",
value = sum(metadata$open_issues)
)
```

```{r}
#| content: valuebox
#| title: "GitHub Stars"
list(
icon = "star",
color = "secondary",
value = sum(metadata$stargazers_count)
)
```

```{r}
#| content: valuebox
#| title: "Citations"
list(
icon = "pen",
color = "secondary",
value = sum(vapply(X = citations, FUN = nrow, FUN.VALUE = integer(1)))
)
```

## Row

```{r}
#| label: cran-info
#| title: "CRAN Info"
Expand Down Expand Up @@ -114,16 +170,13 @@ resume |>
#| title: "Cumulative Downloads"
#| fig-width: 7
#| fig-height: 7
cap1 <- "Source: RStudio CRAN mirror (adjusted)."
cap2 <- sprintf("Last update: %s.", Sys.Date())
downloads |>
ggplot2::ggplot() +
ggplot2::aes(x = month, y = total_downloads, colour = package) +
ggplot2::geom_point() +
ggplot2::geom_line() +
ggplot2::scale_y_continuous(name = "Cumulative downloads", limits = c(0, NA)) +
ggplot2::labs(caption = paste(cap1, cap2, sep = "\n")) +
ggplot2::labs(caption = "Source: RStudio CRAN mirror (adjusted).") +
ggplot2::theme_bw() +
ggplot2::theme(
legend.position = "bottom",
Expand Down Expand Up @@ -181,17 +234,14 @@ downloads <- downloads |>
}
)
cap1 <- "Source: RStudio CRAN mirror (adjusted; 3 months sliding-average)."
cap2 <- sprintf("Last update: %s.", Sys.Date())
for (i in seq_along(downloads)) {
gg_core <- ggplot2::ggplot(data = downloads[[i]]) +
ggplot2::aes(x = month, y = smoothed) +
# ggplot2::geom_point() +
ggplot2::geom_line() +
ggplot2::scale_y_log10(name = "Downloads per month", limits = c(NA, NA)) +
# ggplot2::scale_y_continuous(name = "Downloads per month", limits = c(0, NA)) +
ggplot2::labs(caption = paste(cap1, cap2, sep = "\n")) +
ggplot2::labs(caption = "Source: RStudio CRAN mirror (adjusted; 3 months sliding-average).") +
ggplot2::theme_bw() +
ggplot2::theme(
axis.text.x = ggplot2::element_text(angle = 45, hjust = 1, vjust = 1),
Expand Down

0 comments on commit 1829747

Please sign in to comment.