draw.lar: Draw Labour Relations

Description Usage Arguments Note Author(s) References See Also Examples

View source: R/draw_treemap04.R

Description

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()).

Usage

1

Arguments

data.frame

A data.frame in labour relations format. Required. See read.lar for more information on the format.

sex

One of "total" (default), "male", "female", to indicate respectively: the total population, the male population or the female population.

Note

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).

Author(s)

Richard L. Zijdeman

References

Project website: http://historyoflabourrelations.org

See Also

read.lar, treemap.

Examples

 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)

lar documentation built on May 29, 2017, 12:47 p.m.