Labels

Tuesday, December 19, 2023

citation map

https://jokergoo.github.io/2023/02/18/generate-citation-map/

library(V8)

ct = v8()

ct$source("~/citation.json")

citation = ct$get("citation")

results = citation$results[, 1:4] head(results)

tb = data.frame(address = tapply(results$address, results$address, function(x) x[1]), publicationCount = tapply(results$publicationCount, results$address, sum), lat = tapply(results$lat, results$address, mean), lon = tapply(results$lon, results$address, mean))

library("sf") library("rnaturalearth") library("rnaturalearthdata") world = ne_countries(scale = "medium", returnclass = "sf") library(ggplot2) library(ggrepel) library(RColorBrewer) ggplot(data = world) + geom_sf(color = "grey", fill = NA) + geom_point(data = tb[order(tb$publicationCount), ], aes(x = lon, y = lat, color = publicationCount, size = publicationCount)) + scale_colour_gradientn(colours = rev(brewer.pal(9, "Spectral"))) + scale_size(range = c(0.2, 3)) + geom_text_repel(data = tb[order(-tb$publicationCount)[1:20], ], mapping = aes(x = lon, y = lat, label = gsub(", .*$", "", address)), box.padding = 0.5, max.overlaps = Inf, min.segment.length = 0, size = 3)


https://guides.library.harvard.edu/c.php?g=311134&p=4423814

Sunday, December 10, 2023

combine pdf in linux

PDF Arranger is a small python-gtk application, which helps the user to merge or split PDF documents and rotate, crop and rearrange their pages using an interactive and intuitive graphical interface. 


https://github.com/pdfarranger/pdfarranger