Skip to content

MarcMaurits/CloudCover

Repository files navigation

CloudCover

A repository for the R functions used to create the simplified word clouds described in Maurits et al 2022 (link to manuscript). Included are also the survey used in the study (Supplementary File I) and the sensitivity analysis results (Supplementary File II)

Setup

  1. Download the Function.r file in /R and place in your working directory
  2. Read the functions into your R session using source("/Functions.r")
  3. Make sure you have installed and loaded the required dependencies

Usage

The functions plotCloudSA() and plotCloudST() respectively scale words by their surface area and their font size, using the same optional parameters.

  • max_words determines the maximum number of words to include in the plot (integer)
  • order makes it so the most frequent word is on the bottom and the least frequent on the top (logical)
  • font determines extra font attributes, 1 = normal, 2 = bold, 3 = italic and 4 = both bold & italic
  • party assigns random colours to words (logical)
  • cap determines whether words are in all-caps ("all"), no-caps ("none"), or as provided ("as.is")

Input data should be of the format:

word freq
Pizza 15
Spons 30
Gozer 60
Krimp 120
Joker 240

Examples

The below images were created using the Script.r file in /R on the identical included example data

Font size scaling method

Surface area scaling method

About

A repository for the R functions used for the creation of the CloudCover study figures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages