Feb 19, 2018

Random graphs (126): Turning tables into figures

sdmxuse data ESTAT, dataset(lfsa_epgar) start(2010) end(2010) clear

keep if inlist(geo, "AT", "BE", "BG", "CY", "CZ", "DK", "EE", "FI") ///
      | inlist(geo, "FR", "DE", "EL", "HU", "IE", "LT", "NL", "NO") ///
      | inlist(geo, "PL", "PT", "ES", "SE", "CH", "UK") 
keep if age == "Y_GE15"

replace geo = "GR" if geo == "EL"
kountry geo, from(iso2c)
rename NAMES_STD country

drop if sex == "T"
replace sex = "Men" if sex == "M"
replace sex = "Women" if sex == "F"
encode reason, gen(reasonno)
label var reasonno "Reasons for part-time work"

label define reasonno 1 "Care activities" ///
                      2 "Other personal reasons" ///
                      3 "Own illness, disability" 4 "Education, training" ///
                      5 "Could not find full-time job" 6 "Other", modify

replace value = value * 10
expand value
drop if missing(value)

tabplot reasonno country, by(sex, ///
                          note("{it:Note:} Bars and numbers indicate percentage of part-time workers per country" ///
                               "{it:Source:} Eurostat, lfsa_egpar, data refer to 2010.")) ///
                          percent(sex country) ///
                          showval(mlabsize(tiny) format(%6.0f)) xtitle("") ///
                          xlabel(, angle(vertical) labsize(small)) name(figure2, replace)