2020 Democratic Nomination Polls (updated July 14th, 2019)

Biden, Sanders, Warren, and Harris lead the field. Here is a graph showing the distribution across the top 8 candidates from the most recent major poll:
// this is an example of what the data will look like when a user imports your component window.data0lhwdF = {}; data0lhwdF['data'] = [["Candidate","Percent"],["Biden","26"],["Warren","19"],["Sanders","13"],["Harris","13"],["Buttigieg","7"],["O'Rourke","2"],["Yang","2"],["Booker","1"]]; data0lhwdF['showNumbers'] = 'true'; 'use strict'; var data0lhwdF_spanElem = document.getElementById('data0lhwdF-span'); var data0lhwdF_svgElem = document.getElementById('data0lhwdF-svg'); var data0lhwdF_mostLabelPixels = 0; var data0lhwdF_mostDataPixels = 0; var margin = { top: 20, right: 20, bottom: 50, left: 60 }; var data0lhwdF_maxData = 0; var data0lhwdF_svgHeight = 400; var data = []; var data0lhwdF_xAxisTitle = ''; var data0lhwdF_yAxisTitle = ''; data0lhwdF['data'].forEach(function (row, rowIndex) { if (rowIndex !== 0) { data.push({ label: row[0], data: +row[1] }); data0lhwdF_spanElem.textContent = row[0]; var tempWidth = data0lhwdF_spanElem.scrollWidth; data0lhwdF_mostLabelPixels = tempWidth > data0lhwdF_mostLabelPixels ? tempWidth : data0lhwdF_mostLabelPixels; data0lhwdF_spanElem.textContent = row[1]; tempWidth = data0lhwdF_spanElem.scrollWidth; data0lhwdF_mostDataPixels = tempWidth > data0lhwdF_mostDataPixels ? tempWidth : data0lhwdF_mostDataPixels; if (data0lhwdF_maxData < +row[1]) { data0lhwdF_maxData = +row[1]; } } else { data0lhwdF_xAxisTitle = row[0]; data0lhwdF_yAxisTitle = row[1]; } }); if (data0lhwdF_mostDataPixels > margin.left - 40) { margin.left = data0lhwdF_mostDataPixels + 40; } var minBarWidth = 27; var maxBarWidth = 70; var finalBarWidth; var rotate90 = false; if (data0lhwdF_mostLabelPixels > minBarWidth) { if (data0lhwdF_mostLabelPixels < maxBarWidth) { finalBarWidth = data0lhwdF_mostLabelPixels; } else if (data0lhwdF_mostLabelPixels - 10 > maxBarWidth) { finalBarWidth = 35; rotate90 = true; margin.bottom = data0lhwdF_mostLabelPixels + margin.bottom; data0lhwdF_svgHeight = data0lhwdF_svgHeight + data0lhwdF_mostLabelPixels; data0lhwdF_svgElem.setAttribute('height', data0lhwdF_svgHeight); } } else { finalBarWidth = minBarWidth; } var svgWidth = (finalBarWidth + Math.round(finalBarWidth / 10)) * data.length + margin.right + margin.left; data0lhwdF_svgElem.setAttribute('width', svgWidth); var svg = d3.select("#data0lhwdF-svg"), width = +svg.attr("width") - margin.left - margin.right, height = +svg.attr("height") - margin.top - margin.bottom; var x = d3.scaleBand().rangeRound([0, width]).padding(0.1), y = d3.scaleLinear().rangeRound([height, 0]); var g = svg.append("g").attr("transform", "translate(" + margin.left + "," + margin.top + ")"); x.domain(data.map(function (d) { return d.label; })); y.domain([0, d3.max(data, function (d) { return d.data; })]); if (!rotate90) { g.append("g").attr("class", "axis axis--x").attr("transform", "translate(0," + height + ")").call(d3.axisBottom(x)).append("text").attr("dy", "45px").attr("x", svgWidth - margin.left - margin.right - 8).attr("text-anchor", "end").attr("fill", "#000").text(data0lhwdF_xAxisTitle); } else { g.append("g").attr("class", "axis axis--x").attr("transform", "translate(0," + height + ")").call(d3.axisBottom(x)).selectAll("text").attr("dx", "-.9em").attr("dy", "-.25em").attr("text-anchor", "end").attr("transform", function (d) { return "rotate(-90)"; }); g.append("g").attr("class", "axis axis--x").attr("transform", "translate(0," + height + ")").append("text").attr("dy", data0lhwdF_mostLabelPixels + 39 + "px").attr("x", svgWidth - margin.left - margin.right - 8).attr("text-anchor", "end").attr("fill", "#000").text(data0lhwdF_xAxisTitle); } // y axis ticks g.append("g").attr("class", "axis axis--y").call(d3.axisLeft(y).ticks(10)).append("text").attr("transform", "rotate(-90)").attr("y", "-" + (margin.left - 3) + "px").attr("dy", "0.71em").attr("text-anchor", "end").attr("fill", "#000").text(data0lhwdF_yAxisTitle); var bars = g.selectAll('.bar').data(data).enter(); bars.append("rect").attr("class", "bar").attr("x", function (d) { return x(d.label); }).attr("y", function (d) { return y(d.data); }).attr("width", x.bandwidth()).attr("height", function (d) { return height - y(d.data); }); if (data0lhwdF['showNumbers'] !== "false") { bars.append("text").attr("class", "test").attr("text-anchor", function (d) { var anchorPosition = "end"; // if data is 10% of the max or less, it won't fit the bar well if (data0lhwdF_maxData * .1 > d.data) { anchorPosition = "start"; } return anchorPosition; }).attr("fill", function (d) { var color = "#FFF"; // if data is 10% of the max or less, it won't fit the bar well if (data0lhwdF_maxData * .1 > d.data) { color = "#0AF"; } return color; }).attr("transform", function (d) { var yDifference = 10; // if data is 10% of the max or less, it won't fit the bar well if (data0lhwdF_maxData * .1 > d.data) { yDifference = -6; } return "translate(" + (x(d.label) + finalBarWidth / 2 + 5) + ", " + (y(d.data) + yDifference) + ") rotate(-90)"; }).text(function (d) { return d.data; }); } /* .attr("class", "label") //y position of the label is halfway down the bar .attr("y", function (d) { return y(d.name) + y.rangeBand() / 2 + 4; }) //x position is 3 pixels to the right of the bar .attr("x", function (d) { return x(d.value) + 3; }) .text(function (d) { return d.value; }); */

Below is the polling data for the top candidates since June 6th. Of note, Kamala Harris has gained a lot of ground, breaking 10% for the first time in the most recent poll.


// this is an example of what the data will look like when a user imports your component window.data1GPMJj = {}; data1GPMJj['data'] = [["Poll","Date Range","Biden","Warren","Sanders","Harris","Buttigieg","O'Rourke","Yang","Booker","Gabbard","Klobuchar","Castro","Inslee","Bullock","Spread"],["Average","7/1 - 7/9","27.3","16.3","14.8","14.3","6.0","2.5","1.8","1.8","1.5","1.0","1.0","0.8","0.8","Biden +11.0"],["NBC News/Wall St. Jrnl","7/7 - 7/9","26","19","13","13","7","2","2","1","0","1","1","1","0","Biden +7"],["Economist/YouGov","7/7 - 7/9","22","18","12","15","6","1","1","2","3","1","2","1","1","Biden +4"],["Emerson","7/6 - 7/8","30","15","15","15","5","4","3","2","2","1","0","1","1","Biden +15"],["Politico/Morning Consult","7/1 - 7/7","31","13","19","14","6","3","1","2","1","1","1","0","1","Biden +12"],["Economist/YouGov","6/30 - 7/2","23","19","9","15","8","2","1","2","1","0","1","1","1","Biden +4"],["ABC News/Wash Post","6/28 - 7/1","30","12","19","13","4","2","0","1","1","2","3","1","0","Biden +11"],["Quinnipiac","6/28 - 7/1","22","14","13","20","4","1","1","3","1","1","1","0","0","Biden +2"],["The Hill/HarrisX","6/29 - 6/30","33","9","15","11","6","4","1","2","1","0","1","0","1","Biden +18"]]; data1GPMJj['sortingBool'] = 'true';
'use strict'; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var GPMJj_table = function (_React$Component) { _inherits(GPMJj_table, _React$Component); function GPMJj_table(props) { _classCallCheck(this, GPMJj_table); var _this = _possibleConstructorReturn(this, (GPMJj_table.__proto__ || Object.getPrototypeOf(GPMJj_table)).call(this, props)); _this.state = { titleRow: data1GPMJj['data'][0], dataRows: data1GPMJj['data'].slice(1), sortOrder: 0, sortColNum: -1 }; _this.sortCol = _this.sortCol.bind(_this); _this.resetData = _this.resetData.bind(_this); return _this; } _createClass(GPMJj_table, [{ key: 'componentDidMount', value: function componentDidMount() { window.GPMJj_reset = this.resetData; window.data1GPMJj_reset = this.resetData; } }, { key: 'resetData', value: function resetData(tableData) { var resetColTitle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var newState = {}; if (resetColTitle) { newState.titleRow = tableData[0]; newState.dataRows = tableData.slice(1); } else { newState.dataRows = tableData; } this.setState(newState); } }, { key: 'sortCol', value: function sortCol(colNum) { if (data1GPMJj['sortingBool'] === 'false') { return; } var newSort = 1; // if already sorted this column, go to next direction if (this.state.sortColNum === colNum) { newSort = this.state.sortOrder + 1; } this.setState({ sortOrder: newSort, sortColNum: colNum }); } }, { key: 'render', value: function render() { var _this2 = this; var sortedRows = void 0; var sortOrder = this.state.sortOrder % 3; var colNum = this.state.sortColNum; if (sortOrder > 0 && this.state.sortColNum !== -1) { sortedRows = this.state.dataRows.slice(0).sort(function (a, b) { var aValNum = parseFloat(a[colNum]); var bValNum = parseFloat(b[colNum]); var aVal = !isNaN(aValNum) && !isNaN(bValNum) ? aValNum : a[colNum]; var bVal = !isNaN(aValNum) && !isNaN(bValNum) ? bValNum : b[colNum]; if (aVal < bVal) { return -1; } if (aVal > bVal) { return 1; } return 0; }); sortedRows = sortOrder === 2 ? sortedRows.reverse() : sortedRows; } else { sortedRows = this.state.dataRows.slice(0); } return React.createElement( 'div', { className: 'GPMJj_wrapper' }, React.createElement( 'table', { className: 'GPMJj_table' }, React.createElement( 'tbody', null, this.state.titleRow.length > 0 && React.createElement( 'tr', { className: 'GPMJj_table__title-row' }, this.state.titleRow.map(function (rowItem, index) { var sortClass = index === colNum ? 'GPMJj_sort-' + sortOrder : ''; sortClass = data1GPMJj['sortingBool'] === 'true' ? sortClass : 'GPMJj_no-sort'; return React.createElement( 'td', { key: index }, React.createElement( 'button', { className: sortClass, onClick: function onClick() { _this2.sortCol(index); } }, rowItem ) ); }) ), sortedRows.map(function (row, index) { return React.createElement( 'tr', { key: index }, row.map(function (rowItem, index2) { return React.createElement( 'td', { key: index2 }, rowItem ); }) ); }) ) ) ); } }]); return GPMJj_table; }(React.Component); ReactDOM.render(React.createElement(GPMJj_table, null), document.getElementById('root'));

There's a long way to go, and this will be updated as new polls come in.

2
Share

Comments

    0/1500
    @hardman1Jul 27, 2019
    Now I'm thinking Biden might be the one to beat Trump.
    0Permalink
    @hardman1Jul 13, 2019
    Kamala Harris is my choice!
    2Permalink
    @iDontLikeGunsJul 13, 2019
    @hardman1 She's good! I'm undecided!
    0Permalink
    @sportsguy_1953Jul 26, 2019
    #Trump2020 #KeepAmericaGreat
    -2Permalink

    © 2019 - Knowledge.sexy, LLCTermsPrivacy PolicyAbout