A customized R package to create reproducible plots, primarily with the ggplot2 package. Designed for analysis of international development data, some functions are highly specialized for the analysis and visualization of household-level surveys. Others are more broadly extendable.

Installation

Installation requires the devtools package.
Install devtools by running install.packages('devtools') at the console.


Then install the llamar library:
library('devtools')
install_github('flaneuse/llamar')
library('llamar')

Then you're all set to use the library. Functions with example outputs are provided below. Full documentation is available within the package; type ?llamar::plot_coef at the console.

Visualization Functions

Visualization Themes

Mapping Functions

Mapping Helper Functions

Analysis / Helper Functions

  • apply_code : applies a data dictionary to a set of numbers
  • attributes : pulls or removes variable and value labels from labelled data
  • calcPtEst : calculates point estimate (average) and number of observations, with or without weighting based on survey design
  • check_font : Checks whether a font is installed in R
  • convert01 : converts coded numbers to 0s and 1s
  • factorize : assigns value labels to data frame
  • formatNum : Prettifies numbers, especially for plotting
  • loadPkgs : installs and loads frequently used R packages
  • map_colour_text : maps the color of text based on underlying color
  • save_plot : Saves the last plotted object to a .pdf
  • scale_colour_text : changes the color of text based on underlying value
  • stdize4regr : centers and scales values for a regression