Chart for Feb 2020 Workforce Currents
author:
Mike Zavarello
by Mike Zavarello
HTML
<!-- Atlanta Fed scripts -->
<script src="https://www.frbatlanta.org/~/media/javascript/system/UniversalGoogleAnalytics.js"></script>
<script src="https://www.frbatlanta.org/~/media/javascript/highcharts/highcharts-global-settings-min.js"></script>
<!-- standard Highcharts scripts -->
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div class="WorkforceCurrentsChart" id="container_AutomationEmployment"></div>
CSS
.WorkforceCurrentsChart { height: 450px; width: 100%; margin: 0 auto; }
JavaScript
$(document).ready(function(){
var iframeWidth_WorkforceCurrentsChart = $('.WorkforceCurrentsChart').width();
var iframeHeight_WorkforceCurrentsChart = $('.WorkforceCurrentsChart').height();
/* chart 3: small business snapshot: firm size */
var sourceLine_AutomationEmployment = 'Note: High and low skill is determined by the demand for employees with a four-year college degree. The bars represent averages weighted by employment. Here, low wage falls below the national median wage, high wage above it.<br />Source: Author\'s calculations using Manyika et al. 2017, Frey and Osborne 2017, Burning Glass Technologies, and U.S. Bureau of Labor Statistics’ Occupational Employment Statistics, 2017';
setChartDefaults(iframeWidth_WorkforceCurrentsChart,iframeHeight_WorkforceCurrentsChart,sourceLine_AutomationEmployment,95);
var chartOptions_AutomationEmployment = {
chart: { marginBottom: 160, marginRight: 20, renderTo: 'container_AutomationEmployment', type: 'bar' },
exporting: {
chartOptions: {
legend: { enabled: true }
},
filename: 'atlanta-fed_economy-matters_small-business-snapshot-firm-size'
},
legend: { floating: false, x: -15, itemWidth: iframeWidth_WorkforceCurrentsChart * 0.4, width: iframeWidth_WorkforceCurrentsChart * 0.8 },
subtitle: { enabled: false },
title: { text: 'Automation potential by wages and skill levels (2017)', width: iframeWidth_WorkforceCurrentsChart * 0.8 },
plotOptions: {
column: {
borderWidth: 0, groupPadding: 0.1
}
},
tooltip: {
formatter: function () {
var s = '<span style="font-size: 14px;">' + this.x + '</span>';
$.each(this.points, function (i, point) {
s += '<br /><span style="color: ' + point.series.color + '; font-weight: bold;">' + point.series.name + '</span>: ' + Highcharts.numberFormat(point.y, 1) + '%';
});
return s;
},
shared: true
},
xAxis: {
categories: ['Low-wage, low-skill employment','Low-wage, high-skill employment','Opportunity...