Mar 11, 2016

Random graphs (64): Line plots

label define wavex 1 "1991" 2 "1995" 3 "2000" 4 "2005" 5 "2010"
label val wave wavex

// Working to tight deadlines
fre y10_q4_2

generate tight = .
replace  tight = 1 if y10_q4_2 == 1 | y10_q4_2 == 2
replace  tight = 0 if y10_q4_2 == 3 | y10_q4_2 == 4 | y10_q4_2 == 5 | y10_q4_2 == 6 | y10_q4_2 == 7

preserve
collapse (mean) tight, by(countid wave)
replace tight = tight * 100
twoway connected tight wave, ///
       by(countid, note("") title("Working to tight deadlines")) ///
       ytitle("% (Almost) all of the time") ///
       xtitle("") xlabel(, val) name(deadlines, replace)
restore
     

// Time to get job done
fre y10_q_27

generate notenoughtime = .
replace  notenoughtime = 1 if y10_q_27 == 1
replace  notenoughtime = 0 if y10_q_27 == 2

preserve
collapse (mean) notenoughtime, by(countid wave)
replace notenoughtime = notenoughtime * 100
twoway connected notenoughtime wave, ///
       by(countid, note("{it:Source:} European Working Conditions Survey 1991{c 150}2010", span) ///
       title("Not enough time to get job done")) ///
       ytitle("% Yes") xtitle("") xlabel(, val) name(notenoughtime, replace)
restore

graph combine deadlines notenoughtime, col(1) ysize(10)