Wordcloud of conference abstracts – FOSS4G Edinburgh
This article is originally published at https://scottishsnow.wordpress.com
I’m helping run a conference this September – FOSS4GUK. To help promote the event I’ve created a wordcloud of conference abstracts, in R!
The conference is taking place in Edinburgh, Scotland at Dynamic Earth. It’s focused on free and open source software for geospatial (FOSS4G), as such is full stack. Everything from backend databases, ETL, analysis to web publication. Tools featured include QGIS, R, Python, PostGIS, leaflet and many others.
Tickets: https://uk.osgeo.org/foss4guk2019/
Follow on twitter: https://twitter.com/foss4guk
Back to the wordcloud. Working with plain text files, I followed Julia and David’s excellent instructions and then added decoration in GIMP. R script below.
<span id="mce_SELREST_start" style="overflow:hidden;line-height:0;"></span> library(tidyverse) library(tidytext) library(wordcloud) # ---------------------------- data("stop_words") f = list.files("~/dir/dir") abstracts = lapply(f, function(i){ read_table(paste0("~/dir/dir/", i), col_names = F) %>% gather(key, word) %>% select(-key) %>% add_column(author = str_remove(i, ".txt")) %>% unnest_tokens(word, word) %>% anti_join(stop_words) }) abstracts = do.call("rbind.data.frame", abstracts) png("~/dir/dir/abstract_wordcloud.png", width=1200, height=800, res=150) par(mar = rep(0, 4)) abstracts %>% drop_na() %>% filter(!str_detect(word, "[0-9]") & word != "e.g") %>% count(word) %>% with(wordcloud(word, n, random.order = FALSE, max.words = 150, colors = c("#497fbf", "#f49835"), rot.per = 0, fixed.asp = F)) dev.off()
Thanks for visiting r-craft.org
This article is originally published at https://scottishsnow.wordpress.com
Please visit source website for post related comments.