diff --git a/.github/workflows/render.yaml b/.github/workflows/render.yaml index 65184e7bc..e7240ef6b 100644 --- a/.github/workflows/render.yaml +++ b/.github/workflows/render.yaml @@ -3,7 +3,7 @@ on: workflow_dispatch: schedule: - - cron: '00 00 * * 1' + - cron: '00 00 1 * *' push: branches: [main] @@ -58,6 +58,8 @@ jobs: runs-on: ubuntu-latest if: ${{ always() }} needs: pkgdown + env: + GITHUB_PAT: ${{ secrets.TOKEN }} steps: - uses: actions/checkout@v4 diff --git a/DESCRIPTION b/DESCRIPTION index 870c6d872..fc7aad1cd 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -14,10 +14,12 @@ URL: https://github.com/tesselle/packages Depends: R (>= 4.1.0) Imports: + httr2, + gh, knitr, quarto, - rjson, - rmarkdown + rmarkdown, + yaml Encoding: UTF-8 LazyData: true Roxygen: list(markdown = TRUE) diff --git a/_header.html b/_header.html index cfb15c06f..8e3dc4c8a 100644 --- a/_header.html +++ b/_header.html @@ -1,3 +1,6 @@ + + + diff --git a/_utils.R b/_utils.R new file mode 100644 index 000000000..824f2810d --- /dev/null +++ b/_utils.R @@ -0,0 +1,31 @@ +# R-universe API +uni_info <- function(what = c("Package", "Title", "Version", "Description")) { + api <- httr2::request("https://tesselle.r-universe.dev") + req <- httr2::req_url_path(api, "/api/packages/") + resp <- httr2::req_perform(req) + json <- httr2::resp_body_json(resp) + + pkg <- lapply(X = json, `[`, what) + pkg <- lapply(pkg, as.data.frame) + pkg <- do.call(rbind, pkg) + pkg +} + +# GitHub API +gh_infos <- function(what = c("stargazers_count", "forks", "open_issues")) { + ## Repo infos + user_repo <- gh::gh( + endpoint = "/search/repositories", + q="user:tesselle topic:r-package", + .limit = Inf + ) + items <- user_repo$items + if (length(items) < 1) return(NULL) + if (length(items) == 1 && items == "") return(NULL) + + items <- lapply(items, `[`, c("name", what)) + items <- lapply(items, as.data.frame) + items <- do.call(rbind, items) + items +} + diff --git a/gallery.ejs b/gallery.ejs index a72114cb8..2d20cc8f3 100644 --- a/gallery.ejs +++ b/gallery.ejs @@ -1,21 +1,25 @@ ```{=html} -

R packages of the tesselle projet:

- -
+
<% for (const item of items) { %> -
-
> - <%- item.description %> +
> +
+ <%- item.description %>
-
<%= item.title %>
-
<%= item.subtitle %>
+
<%= item.package %>
+
<%= item.title %>
- diff --git a/gallery.yml b/gallery.yml index 7f3a6597a..641ba2e7d 100644 --- a/gallery.yml +++ b/gallery.yml @@ -1,90 +1,179 @@ -- title: tabula - subtitle: Analysis and Visualization of Archaeological Count Data - categories: - - count data - description: | - 'tabula' provides several tests and measures of diversity: heterogeneity and - evenness (Brillouin, Shannon, Simpson, etc.), richness and rarefaction - (Chao1, Chao2, ACE, ICE, etc.), turnover and similarity (Brainerd-Robinson, - etc.). The package make it easy to visualize count data and statistical - thresholds: rank vs. abundance plots, heatmaps, Ford and Bertin diagrams. -- title: nexus - subtitle: Sourcing Archaeological Materials by Chemical Composition - categories: - - compositional data - description: | - 'nexus' allows the exploration and analysis of compositional data in the - framework of Aitchison (1986). It provides tools for chemical - fingerprinting and source tracking of ancient materials. -- title: kairos - subtitle: Analysis of Chronological Patterns from Archaeological Count Data - categories: - - count data - - chronological data - description: | - 'kairos' includes functions for chronological modeling and dating of - archaeological assemblages from count data. It provides methods for - matrix seriation. It also allows to compute time point estimates and - density estimates of the occupation and duration of an archaeological +- package: khroma + title: Colour Schemes for Scientific Data Visualization + version: 1.12.0 + description: |- + Color schemes ready for each type of data (qualitative, + diverging or sequential), with colors that are distinct for all + people, including color-blind readers. This package provides an + implementation of Paul Tol (2018) and Fabio Crameri (2018) + color schemes for use with + 'graphics' or 'ggplot2'. It provides tools to simulate + color-blindness and to test how well the colors of any palette + are identifiable. Several scientific thematic schemes (geologic + timescale, land cover, FAO soils, etc.) are also implemented. + stargazers_count: 193 + forks: 7 + open_issues: 1 +- package: tabula + title: Analysis and Visualization of Archaeological Count Data + version: 3.1.0 + description: |- + An easy way to examine archaeological count data. This + package provides several tests and measures of diversity: + heterogeneity and evenness (Brillouin, Shannon, Simpson, etc.), + richness and rarefaction (Chao1, Chao2, ACE, ICE, etc.), + turnover and similarity (Brainerd-Robinson, etc.). It allows to + easily visualize count data and statistical thresholds: rank vs + abundance plots, heatmaps, Ford (1962) and Bertin (1977) + diagrams, etc. + stargazers_count: 34 + forks: 5 + open_issues: 0 +- package: kairos + title: |- + Analysis of Chronological Patterns from Archaeological Count + Data + version: 2.1.0 + description: |- + A toolkit for absolute and relative dating and analysis of + chronological patterns. This package includes functions for + chronological modeling and dating of archaeological assemblages + from count data. It provides methods for matrix seriation. It + also allows to compute time point estimates and density + estimates of the occupation and duration of an archaeological site. -- title: aion - subtitle: Archaeological Time Series - categories: - - chronological data - description: | - 'aion' provides a system of classes and methods to represent and work with - archaeological time series. Dates are represented as rata die and can - be converted to (virtualy) any calendar defined by Reingold (2018). -- title: dimensio - subtitle: Multivariate Data Analysis - categories: - - multivariate data analysis - description: | - Simple Principal Components Analysis (PCA) and Correspondence Analysis - (CA) based on the Singular Value Decomposition (SVD). 'dimensio' - provides S4 classes and methods to compute, extract, summarize and - visualize results of multivariate data analysis. It also includes - methods for partial bootstrap validation described in Greenacre (1984) - and Lebart (2006). -- title: isopleuros - subtitle: Ternary Plots - categories: - - data visualization - description: | - 'isopleuros' allows to create ternary plot using 'graphics'. It provides - functions to display the data in the ternary space, to add or tune graphical - elements and to display statistical summaries. It also includes common - ternary diagrams useful for the archaeologist (e.g. soil texture charts, - ceramic phase diagram). -- title: khroma - subtitle: Colour Schemes for Scientific Data Visualization - categories: - - data visualization - description: | - Colour schemes ready for each type of data (qualitative, diverging or - sequential), with colours that are distinct for all people, including - colour-blind readers. 'khroma' provides an implementation of Paul - Tol (2018) and Fabio Crameri (2018) colour schemes for use with - 'graphics' or 'ggplot2'. It provides tools to simulate colour-blindness - and to test how well the colours of any palette are identifiable. - Several scientific thematic schemes (geologic timescale, land cover, - FAO soils, etc.) are also implemented. -- title: alkahest - subtitle: Pre-Processing XY Data from Experimental Methods - categories: - - tools - description: | - 'alkahest' is a lightweight, dependency-free toolbox for pre-processing XY - data from experimental methods (i.e. any signal that can be measured along a - continuous variable). This package provides methods for baseline - estimation and correction, smoothing, normalization, integration and - peaks detection. -- title: folio - subtitle: Datasets for Teaching Archaeology and Paleontology - categories: - - datasets - description: | - 'folio' provides several types of data related to broad topics (cultural - evolution, radiocarbon dating, paleoenvironments, etc.), which can be used - to illustrate statistical methods in the classroom (multivariate data - analysis, compositional data analysis, diversity measurement, etc.). + stargazers_count: 14 + forks: 1 + open_issues: 6 +- package: folio + title: Datasets for Teaching Archaeology and Paleontology + version: 1.4.0 + description: |- + Datasets for teaching quantitative approaches and modeling + in archaeology and paleontology. This package provides several + types of data related to broad topics (cultural evolution, + radiocarbon dating, paleoenvironments, etc.), which can be used + to illustrate statistical methods in the classroom + (multivariate data analysis, compositional data analysis, + diversity measurement, etc.). + stargazers_count: 11 + forks: 0 + open_issues: 1 +- package: dimensio + title: Multivariate Data Analysis + version: 0.7.0 + description: |- + Simple Principal Components Analysis (PCA) and (Multiple) + Correspondence Analysis (CA) based on the Singular Value + Decomposition (SVD). This package provides S4 classes and + methods to compute, extract, summarize and visualize results of + multivariate data analysis. It also includes methods for + partial bootstrap validation described in Greenacre (1984, + ISBN: 978-0-12-299050-2) and Lebart et al. (2006, ISBN: + 978-2-10-049616-7). + stargazers_count: 10 + forks: 0 + open_issues: 1 +- package: aion + title: Archaeological Time Series + version: 1.0.3 + description: |- + A toolkit for archaeological time series. This package + provides a system of classes and methods to represent and work + with archaeological time series. Dates are represented as "rata + die" and can be converted to (virtually) any calendar defined + by Reingold and Dershowitz (2018) . + This packages offers a simple API that can be used by other + specialized packages. + stargazers_count: 10 + forks: 0 + open_issues: 1 +- package: arkhe + title: Tools for Cleaning Rectangular Data + version: 1.6.0 + description: |- + A dependency-free collection of simple functions for + cleaning rectangular data. This package allows to detect, count + and replace values or discard rows/columns using a predicate + function. In addition, it provides tools to check conditions + and return informative error messages. + stargazers_count: 10 + forks: 0 + open_issues: 0 +- package: isopleuros + title: Ternary Plots + version: 1.2.0 + description: |- + Ternary plots made simple. This package allows to create + ternary plots using 'graphics'. It provides functions to + display the data in the ternary space, to add or tune graphical + elements and to display statistical summaries. It also includes + common ternary diagrams which are useful for the archaeologist + (e.g. soil texture charts, ceramic phase diagram). + stargazers_count: 8 + forks: 1 + open_issues: 0 +- package: tesselle + title: Easily Install and Load 'tesselle' Packages + version: 1.4.0 + description: |- + Easy install and load key packages from the 'tesselle' + suite in a single step. The 'tesselle' suite is a collection of + 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. These packages can be used to + explore and analyze common data types in archaeology: count + data, compositional data and chronological data. Learn more + about 'tesselle' at . + stargazers_count: 6 + forks: 0 + open_issues: 0 +- package: nexus + title: Sourcing Archaeological Materials by Chemical Composition + version: 0.2.0 + description: |- + Exploration and analysis of compositional data in the + framework of Aitchison (1986, ISBN: 978-94-010-8324-9). This + package provides tools for chemical fingerprinting and source + tracking of ancient materials. + stargazers_count: 4 + forks: 0 + open_issues: 2 +- package: alkahest + title: Pre-Processing XY Data from Experimental Methods + version: 1.1.1 + description: |- + A lightweight, dependency-free toolbox for pre-processing + XY data from experimental methods (i.e. any signal that can be + measured along a continuous variable). This package provides + methods for baseline estimation and correction, smoothing, + normalization, integration and peaks detection. Baseline + correction methods includes polynomial fitting as described in + Lieber and Mahadevan-Jansen (2003) + , Rolling Ball algorithm after + Kneen and Annegarn (1996) , + SNIP algorithm after Ryan et al. (1988) + , 4S Peak Filling after + Liland (2015) and more. + stargazers_count: 4 + forks: 0 + open_issues: 0 +- package: ananke + title: Quantitative Chronology in Archaeology + version: 0.0.0.9000 + description: What the package does (one paragraph). + stargazers_count: 0 + forks: 0 + open_issues: 0 +- package: kinesis + title: '''Shiny'' Applications for the ''tesselle'' Packages' + version: 0.0.0.9003 + description: |- + A collection of 'shiny' applications for the 'tesselle' + packages. + stargazers_count: 0 + forks: 0 + open_issues: 1 + diff --git a/images/ananke.png b/images/ananke.png new file mode 100644 index 000000000..203204c0d Binary files /dev/null and b/images/ananke.png differ diff --git a/images/arkhe.png b/images/arkhe.png new file mode 100644 index 000000000..203204c0d Binary files /dev/null and b/images/arkhe.png differ diff --git a/images/kinesis.png b/images/kinesis.png new file mode 100644 index 000000000..203204c0d Binary files /dev/null and b/images/kinesis.png differ diff --git a/images/tekton.png b/images/tekton.png new file mode 100644 index 000000000..203204c0d Binary files /dev/null and b/images/tekton.png differ diff --git a/index.qmd b/index.qmd index a9fd8211e..1decec00e 100644 --- a/index.qmd +++ b/index.qmd @@ -6,25 +6,44 @@ listing: - id: gallery template: gallery.ejs contents: gallery.yml - sort-ui: false + sort-ui: true filter-ui: true + field-display-names: + package: "Name" + version: "Version" + stargazers_count: "Stars" + open_issues: "Issues" + forks: "Forks" --- ```{r} #| label: packages #| echo: false -## Get packages info -repo <- utils::contrib.url("https://tesselle.r-universe.dev") -pkg <- utils::available.packages(contriburl = repo) -pkg <- as.data.frame(pkg) -url_pkg <- sprintf("https://packages.tesselle.org/%s", pkg$Package) +source("_utils.R") +## Get R-universe info +runiverse <- uni_info() +## Get GitHub data +github <- gh_infos() + +pkg <- merge(runiverse, github, by.x = "Package", by.y = "name", + all.x = FALSE, all.y = FALSE, sort = FALSE) +pkg <- pkg[order(pkg$stargazers_count, decreasing = TRUE), ] +colnames(pkg) <- tolower(colnames(pkg)) + +## Write yml +cat( + yaml::as.yaml(pkg, column.major = FALSE), + file = "gallery.yml", + sep = "\n", + append = FALSE +) ``` ```{r} #| label: sitemap #| echo: false ## Build sitemap index -loc <- paste0(url_pkg, "/sitemap.xml") +loc <- sprintf("https://packages.tesselle.org/%s/sitemap.xml", pkg$package) map <- sprintf(" \n %s\n ", loc) cat( '', @@ -42,6 +61,8 @@ cat( ::: {.column-page} +[R packages of the **[tesselle](https://www.tesselle.org/)** projet]{.fs-3} + ::: {#gallery} :::