{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":700,"height":550,"config":{"scale":{"bandPaddingInner":0.2}},"data":{"values":[{"Year":"2012","Percent Difference":4.9},{"Year":"2013","Percent Difference":3.4},{"Year":"2014","Percent Difference":8},{"Year":"2015","Percent Difference":7.7},{"Year":"2016","Percent Difference":3.8},{"Year":"2017","Percent Difference":4.2},{"Year":"2018","Percent Difference":3.5},{"Year":"2019","Percent Difference":1.9}]},"params":[{"name":"highlight","select":{"type":"point","on":"mouseover"}},{"name":"hover","select":{"type":"point","fields":["Year"],"on":"mouseover","clear":"mouseout","nearest":true}}],"encoding":{"x":{"field":"Year","type":"ordinal"},"y":{"field":"Percent Difference","type":"quantitative","scale":{"domain":[0,10]},"title":"% Difference in Median Hourly Pay"},"fillOpacity":{"condition":{"param":"hover","value":1},"value":0.5},"strokeWidth":{"condition":[{"param":"hover","empty":false,"value":0},{"param":"highlight","empty":false,"value":0}],"value":0},"tooltip":[{"field":"Percent Difference","type":"quantitative","title":"% Difference"}]},"mark":{"type":"bar","fill":"#4C78A8","stroke":"black","cursor":"pointer"},"title":{"text":"V1: % Difference in Pay of White Employees compared to Non-White Employees"}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":550,"height":300,"title":{"text":"V2: Ethnicity Pay Gap in the UK 2012-2019"},"data":{"url":"https://jessdeew.github.io/data/ethnicity.csv"},"encoding":{"x":{"field":"Year","type":"temporal"}},"layer":[{"encoding":{"y":{"field":"Median Hourly Pay","type":"quantitative","scale":{"zero":false}},"color":{"field":"Ethnicity","title":"","scale":{"scheme":"tableau20"}}},"layer":[{"mark":"line"},{"transform":[{"filter":{"param":"hover","empty":false}}],"mark":"point"}]},{"params":[{"name":"hover","select":{"type":"point","fields":["Year"],"on":"mouseover","clear":"mouseout","nearest":true}}],"transform":[{"pivot":"Ethnicity","value":"Median Hourly Pay","groupby":["Year"]}],"encoding":{"opacity":{"condition":{"param":"hover","empty":false,"value":1},"value":0},"tooltip":[{"field":"White British","type":"quantitative"},{"field":"White Irish","type":"quantitative"},{"field":"White Other","type":"quantitative"},{"field":"White and Black Caribbean","type":"quantitative"},{"field":"White and Black African","type":"quantitative"},{"field":"White and Asian","type":"quantitative"},{"field":"Other mixed/multiple ethnic groups","type":"quantitative"},{"field":"Indian","type":"quantitative"},{"field":"Pakistani","type":"quantitative"},{"field":"Bangladeshi","type":"quantitative"},{"field":"Chinese","type":"quantitative"},{"field":"Asian Other","type":"quantitative"},{"field":"Black African","type":"quantitative"},{"field":"Black Caribbean","type":"quantitative"},{"field":"Black Other","type":"quantitative"},{"field":"Arab","type":"quantitative"},{"field":"Other ethnic group","type":"quantitative"}]},"mark":"rule"}]}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":1000,"layer":[{"data":{"values":[{"Region":"North East","Difference":9.5},{"Region":"North West","Difference":5.4},{"Region":"Yorkshire & Humberside","Difference":12.7},{"Region":"East Midlands","Difference":6.9},{"Region":"West Midlands","Difference":9.5},{"Region":"Eastern","Difference":-8.6},{"Region":"City of London","Difference":23.8},{"Region":"South East","Difference":5.9},{"Region":"South West","Difference":6.1},{"Region":"Wales","Difference":1.4},{"Region":"Scotland","Difference":10.3}]},"layer":[{"encoding":{"x":{"field":"Region","axis":{"labelAngle":0},"type":"ordinal"},"y":{"field":"Difference","type":"quantitative","title":"% Difference"},"tooltip":[{"field":"Difference","type":"quantitative","title":"% Difference"}]},"mark":"bar"},{"transform":[{"filter":"datum.Difference >= 5"},{"calculate":"5","as":"baseline"}],"encoding":{"x":{"field":"Region","axis":{"labelAngle":0}},"y":{"field":"baseline","type":"quantitative"},"y2":{"field":"Difference"},"tooltip":[{"field":"Difference","type":"quantitative","title":"% Difference"}]},"mark":{"type":"bar","color":"hsl(0,40%,50%)"}}]},{"data":{"values":[{"ThresholdValue":5,"Threshold":"> 5%"}]},"layer":[{"mark":"rule","encoding":{"y":{"field":"ThresholdValue","type":"quantitative"},"tooltip":[{"field":"Difference","type":"quantitative","title":"% Difference"}]}},{"encoding":{"x":{"value":"width"},"y":{"field":"ThresholdValue","title":"% Difference","type":"quantitative"},"text":{"field":"Threshold"},"tooltip":[{"field":"Difference","type":"quantitative","title":"% Difference"}]},"mark":{"type":"text","align":"right","dx":-2,"dy":-6}}]}],"title":{"text":"V3: Ethnicity Pay Gap with White British Employees by Region - 2019"}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":600,"height":800,"data":{"url":"https://jessdeew.github.io/data/gender.json"},"encoding":{"x":{"field":"Median Hourly Pay","aggregate":"sum","title":"% Difference"},"y":{"field":"Ethnicity","type":"ordinal","sort":{"encoding":"x"}},"color":{"field":"Gender","scale":{"scheme":"dark2"}},"tooltip":[{"field":"Median Hourly Pay","type":"quantitative","title":"% Difference"}]},"mark":"bar","title":{"text":"V4: Ethnicity Pay Gap with White British Employees by Gender - 2019"}}
{"$schema":"https://vega.github.io/schema/vega-lite/v5.json","width":600,"height":800,"data":{"url":"https://jessdeew.github.io/data/age.csv"},"encoding":{"x":{"field":"Median Hourly Pay","aggregate":"sum","title":"% Difference"},"y":{"field":"Ethnicity","type":"ordinal","sort":{"encoding":"x"}},"color":{"field":"Age","scale":{"scheme":"purples"}},"tooltip":[{"field":"Median Hourly Pay","type":"quantitative","title":"% Difference"}]},"mark":"bar","title":{"text":"V5: Ethnicity Pay Gap with White British Employees by Age - 2019"}}