Jump to: navigation, search

Difference between revisions of "Widget:PnChoropleths"

m
m
Line 176: Line 176:
 
 
 
function prepareDataTable() {
 
function prepareDataTable() {
console.log(window.IRHB.data.England);
+
var e = window.IRHB.data.England;
console.log(window.IRHB.data.counties);
+
var c = window.IRHB.data.counties;
 +
console.log(e);
 +
console.log(c);
 +
 +
var tables = '<table class="bordertable expando" id="choropleth1">' +
 +
'<tbody id="england">' +
 +
'<tr class="header"><th colspan="2">England</th><th><span class="expando-c">&#x2014;&#xa0;</span><span class="expando-o">&#x25a2;&#xa0;</span></th></tr>' +
 +
'<tr><td>Artifact</td><td colspan="2">' + e.Artifacts + '</td></tr>' +
 +
'<tr><td>Literary locale</td><td colspan="2">' + e[Literary locale] + '</td></tr>' +
 +
'<tr><td>Local tradition</td><td colspan="2">' + e[Local tradition] + '</td></tr>' +
 +
'<tr><td>Miscellaneous</td><td colspan="2">' + e.Miscellaneous + '</td></tr>' +
 +
'<tr><td>Robin Hood name</td><td colspan="2">' + e[Robin Hood name] + '</td></tr>' +
 +
'<tr><td>Area (km<sup>2</sup>)</td><td colspan="2">' + e.area + '</td></tr>' +
 +
'<tr><td>Population</td><td colspan="2">' + e.population + '</td></tr>' +
 +
'<tr><td>Pop. density/km<sup>2</sup></td><td colspan="2">' + e.popdensity + '</td></tr>' +
 +
'<tr><td>Place-names (PN)</td><td colspan="2">' + e.total + '</td></tr>' +
 +
'<tr><td>Counties</td><td colspan="2">' + e.counties + '</td></tr>' +
 +
'<tr><td>Km<sup>2</sup>/person</td><td colspan="2">' + e.km2perperson + '</td></tr>' +
 +
'<tr><td>Km<sup>2</sup>/PN</td><td colspan="2">' + e.km2perpn + '</td></tr>' +
 +
'<tr><td>PN/km<sup>2</sup></td><td colspan="2">' + e.pnperkm2 + '</td></tr>' +
 +
'<tr><td>PN/km<sup>2 idx</sup></td><td colspan="2">' + e.pnperkm2idx + '</td></tr>' +
 +
'<tr><td>PN/county avg.</td><td colspan="2">' + e.pnpercounty + '</td></tr>' +
 +
'</tbody>' +
 +
'</table>';
 +
get("dSet").innerHTML = tables;
 
};
 
};
  

Revision as of 09:59, 2 June 2019

This widget displays the navigation map on country and administrative division landing pages in the place-names section of IRHB. It takes no parameters.