General Election 2015 interactive: Lord Ashcroft polls show Conservatives set to win Rochester and Strood from Ukip
The Conservatives are on course to take the Ukip-held seat of Rochester and Strood, according to the latest Lord Ashcroft poll.
The Tories would take the seat by 37 per cent to Ukip’s 30 per cent according to the survey. It pus Labour in third on 25 per cent followed by the Greens on four per cent and Lib Dems with three per cent.
Ashcroft pointed out that in a poll before the by-election last year – which Ukip won – 36 per cent of those polled said they would most likely vote Conservative at the General Election. This suggests that the electorate may view the two votes as discrete events – good news for David Cameron.
Ashcroft’s report also looked at other battleground seats, including Bristol West, a seat the Green Party is strongly targeting. Many Liberal Democrat supporters appear to be defecting to the Greens, which has handed Labour the lead.
var color = d3.scale.ordinal() .range(["#189cd9", "#e62124", "#b556a0", "#fab425", "#78b82a", "#898989"]);
var arc = d3.svg.arc() .outerRadius(radius) .innerRadius(radius - 50);
var tooltip = d3.select("body") .append("div") // declare the tooltip div .attr("class", "tooltip") // apply the 'tooltip' class .style("opacity", 0); // set the opacity to nil
d3.csv("https://www.cityam.com/wp-content/uploads/2015/04/ashcroft-polls-553bb6668d12a.csv", function(error, data) { color.domain(d3.keys(data[0]).filter(function(key) { return key !== "State"; }));
data.forEach(function(d) { d.ages = color.domain().map(function(terry) { return {party: terry, percent: +d[terry]}; }); });
var pie = d3.layout.pie() .sort(null) .value(function(d) { return d.percent; });
var legend = d3.select("#cam-donuts").append("svg") .attr("class", "legend") .attr("width", radius * 2) .attr("height", radius * 2) .selectAll("g") .data(color.domain().slice().reverse()) .enter().append("g") .attr("transform", function(d, i) { return "translate(0," + i * 20 + ")"; });
legend.append("rect") .attr("width", 18) .attr("height", 18) .style("fill", color);
legend.append("text") .attr("x", 24) .attr("y", 9) .attr("dy", ".35em") .text(function(d) { return d; });
var svg = d3.select("#cam-donuts").selectAll(".pie") .data(data) .enter().append("svg") .attr("class", "pie") .attr("width", radius * 2) .attr("height", radius * 2) .append("g") .attr("transform", "translate(" + radius + "," + radius + ")");
svg.selectAll(".arc") .data(function(d) { return pie(d.ages); }) .enter().append("path") .attr("class", "arc") .attr("d", arc) .style("fill", function(d) { return color(d.data.party); }) .on("mouseover", mouseover) .on("mouseout", mouseout);
svg.append("text") .attr("class", "text") .attr("dy", ".35em") .style("text-anchor", "middle") .text(function(d) { return d.State; });
function mouseover(d) { tooltip.transition() .duration(500) .style("opacity", 0) .style("stroke-width", 9); tooltip.transition() .duration(200) .style("opacity", .9) .style("stroke-width", 3); tooltip.html("
" + d.data.party + "
" + d.data.percent + "%" +"
"); tooltip.style("left", (d3.event.pageX) + "px") .style("top", (d3.event.pageY) + "px"); }
function mouseout(p) { tooltip.transition().duration(200).style("opacity", .9); tooltip.transition().duration(500).style("opacity", 0); } });
[custom id=”1″]