I mostly keep ckanr
up to date with current CKAN development. However, each CKAN instance can be on a different veresion of CKAN software. Working on making ckanr
more backwards compatible in this issue. To know what I'm up against, I wanted to check what versions are running out there, and how many of each to know where to focus effort.
Added a new function ckan_version
to get just version info. Reinstall from github:
devtools::install_github("ropensci/ckanr")
library("ckanr")
then get versions, with tryCatch
for those that are down
out <- lapply(servers(), function(z) tryCatch(ckan_version(z), error = function(e) e))
vers <- vapply(Filter(function(z) !inherits(z, "error"), out), "[[", 1, "version_num")
vers <- Filter(Negate(is.na), vers)
vers <- vapply(vers, function(z) if (nchar(z) == 2) z*10 else z, 1)
library("ggplot2")
df <- data.frame(table(vers))
ggplot(df, aes(vers, Freq)) +
geom_bar(stat = "identity") +
annotate("text", x = 22, y = 23,
label = paste0("N (instances) = ", length(out)), size = 5) +
labs(x = "CKAN version") +
theme_grey(base_size = 16) +
theme(axis.text.x = element_text(angle = 90, hjust = 1))
the x-axis labels: a version of 210
is 2.1.0
Yikes, that's a lot of different versions.
@sckott Really useful stuff! What dataset of instances did you use? It's http://ckan.org/instances? That might be a bit outdated.
It's a bit depressing from a maintainer perpsective as we always encourage to run the latest version or at the very least the last patch release, so I'm really curious to learn why the spike on 2.2.0.
One thing to note when planning different versions support is that there are no API changes between patch versions, eg between 2.3.1 and 2.3.3.