Wordcloud based on personal notes of my work at ILRI ranging from 2010 to 2021.
src | ||
cow-wordcloud.png | ||
LICENSE | ||
poetry.lock | ||
pyproject.toml | ||
README.md | ||
setup.cfg | ||
wordcloud.png |
Wordcloud of my ILRI Work
Generate
Concatenate text files together, put every word on its own line, and do some minor replacements to remove HTML tags, Markdown, and normalize some technical terms:
$ cat changelog/*.txt ~/src/git/cgspace-notes/content/posts/* | tr -s '[:blank:]' '\n' | sed -f src/replacements.sed | fgrep -vwf src/stopwords-en.txt > src/work.txt
Then create a normal wordcloud:
$ wordcloud_cli --text src/work.txt --stopwords src/stopwords-en.txt --fontfile /usr/share/fonts/TTF/CascadiaCode.ttf --height 1080 --width 1920 --imagefile wordcloud.png
And create the cow-shaped wordcloud:
$ src/masked.py
This code is based on examples/masked.py
in the word_cloud
project.
Acknowledgements
- List of stop words for English: stopwords-iso/stopwords-en
- Using amueller's Python word_cloud package and example code
- Cow image used in mask from: all-free-download.com
License
MIT