chart = {
const tbl = d3.select(html`
<table>
<thead>
<tr>
<th></th>
<td>very low income</td>
<td>low income</td>
<td>moderate income</td>
<td>above moderate income</td>
<td>total</td>
</tr>
</thead>
</table>`);
var tr = tbl.selectAll('tbody tr')
.data(filteredRhna)
.enter()
.append('tr');
tr.append("th")
.text(function(d) { return d.place; });
tr.selectAll("td")
.data(function(d) { return housing_type.map(function(k) { return d[k] })})
.enter().append("td").append("svg").attr("width", 100)
.attr("height", 30).append("svg")
.attr("width", 100)
.attr("height", 30)
.append("rect")
.attr("height", 30)
.attr("width", function(d) { if (d > 1) { return 100; } else { return d * 100; } })
.append("rect")
.attr("height", 30)
.attr("width", function(d) { if (d > 1) { return 0; } else { return 100 - d * 100; } })
tr.selectAll("td svg")
.append("text")
.attr("y",15)
.attr("x", 0)
.attr("text-anchor", "left")
.style("fill", "white")
.text(function(d) { return Math.round(d*100) + "%"; });
return tbl.node();
}