awesome-official-statistics-software
awesome-official-statistics-software copied to clipboard
Feature extension: last code change
The idea was suggested to add to each item the last code change of the particular item, thus giving an indication of the maintenance activity of the package, derived from the source code control system it uses.
As a possible start: the following code gets the last updated dates for CRAN-packages.
library(rvest)
dta <- read.csv("data/software.csv")
cran <- grep("^http[s]?://(CRAN|cran).*package=.*$", dta$link)
dates <- as.Date(rep(NA, length(cran)))
for (i in seq_along(cran)) {
try({
h <- read_html(dta$link[cran[i]])
tab <- h %>% html_element("table") %>% html_table()
published <- tab[[2]][grep("^Published:", tab[[1]])]
dates[i] <- as.Date(published)
})
}
dta$last_updated <- as.Date(NA)
dta$last_updated[cran] <- dates
Actually an easier/better way to handle this is to use badges. See https://github.com/djvanderlaan/awesome-official-statistics-software where I have added badges to two packages. We can use https://www.r-pkg.org/services for packages on CRAN and https://shields.io/ for packages on github/gitlab.
Thanks Jan,
Yes, that's much better indeed. I'll have look at a possible implementation soon.
Olav