This function draws a treemap of labour relations (http://historicallabourrelations.org). It is a convenience wrapper for the Treemap package by Martijn Tennekens. Before this function is used, data should be setup in a specific data format (see read.lar()).
A data.frame in labour relations format. Required. See read.lar for more information on the format.
One of "total" (default), "male", "female", to indicate respectively: the total population, the male population or the female population.
The creation of this package was made by possible by the International Institute of Social History and research grants by the Gerda Henkel Stiftung and the Netherlands Organisation for Scientific Research (NWO).
Richard L. Zijdeman
Project website: http://historyoflabourrelations.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
## Not run: ## First read in a labour relations pre-defined excel file: df <- read.lar("Spain_1900_(JMTL-Sept2011).xlsx") ## Next, draw a treemap of the labour relations: draw.lar(df) ## Treemap with example data set for Spain in 1900 data(spain.1900) draw.lar(spain.1900) ## Save treemap image as .png data(spain.1900) ppi <- 300 # define pixels: increase this number for even better quality png(file = "tm_spain_1900.png", , width=10*ppi, height=8*ppi, res=ppi) draw.lar(spain.1900) dev.off() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.