var north = [ {COUNTY:'Fermanagh', x:3, y:3}, {COUNTY:'Tyrone', x:4, y:2}, {COUNTY:'Armagh', x:5, y:5}, {COUNTY:'Lough Neagh', x:5, y:3}, {COUNTY:'Derry', x:5, y:1}, {COUNTY:'Down', x:6, y:4}, {COUNTY:'Antrim', x:6, y:2} ]; //province_var = {Leinster: true, Munster: true, Connacht: true, Ulster: true}; provinces = [ {PROVINCE: "Leinster", visibilty:true, counties:["Carlow", "Dublin", "Meath", "Westmeath", "Louth", "Kildare", "Kilkenny", "Offaly", "Laois", "Longford", "Wexford", "Wicklow"]} , {PROVINCE: "Munster", visibilty:true, counties:["Cork", "Tipperary", "Kerry", "Waterford", "Clare", "Limerick"]} , {PROVINCE: "Connacht", visibilty:true, counties:["Galway", "Mayo", "Sligo", "Leitrim", "Roscommon"]} , {PROVINCE: "Ulster", visibilty:true, counties:["Cavan", "Monaghan", "Donegal"]} ]; sort_style = "abc"; //123 (alphabetical vs numerical) // Leinster_province = ["Carlow", "Dublin", "Meath", "Westmeath", "Louth", "Kildare", "Kilkenny", "Offaly", "Laois", "Longford", "Wexford", "Wicklow"]; // Munster_province = ["Cork", "Tipperary", "Kerry", "Waterford", "Clare", "Limerick"]; // Connacht_province = ["Galway", "Mayo", "Sligo", "Leitrim", "Roscommon"]; // Ulster_province = ["Cavan", "Monaghan", "Donegal"]; //provinces = [Leinster_province, Munster_province, Connacht_province, Ulster_province]; county_counter = 26; //the number of counties with true variable- this will change as buttons are toggled var order_counter_x=0; //this will count how many small multiples are in a line var order_counter_y=0; //this will count how many small multiples are in a line var order_counter_y2 =0; //this will count how many small multiples are in a line var canvas = d3.select("#ireland_svg"); var canvas_2 = d3.select("#ireland_grid").append("svg") .attr("width", 1100) .attr("height", 900); var small_m_height = 150; var small_m_width = 180; var spacer = 10; var range_bands = ['d100' , 'd130' , 'd160' , 'd190' , 'd220' , 'd250' , 'd280' , 'd310' , 'd340' , 'd370' , 'd400' , 'd430' , 'd460' , 'd490' , 'd520' , 'd550' , 'd580' , 'd610' , 'd640' , 'd670' , 'd700' , 'd730' , 'd760' , 'd790' , 'd820' , 'd850' , 'd880' , 'd910' , 'd940' , 'd970' , 'd1000']; var range_bands2 = [100 , 130 , 160 , 190 , 220 , 250 , 280 , 310 , 340 , 370 , 400 , 430 , 460 , 490 , 520 , 550 , 580 , 610 , 640 , 670 , 700 , 730 , 760 , 790 , 820 , 850 , 880 , 910 , 940 , 970 , 1000]; range = []; for(i=1; i<31; i++){ range.push(i); } north_counties = canvas.selectAll("g") .data(north) .enter() .append("path") .attr("id", function(d,i){return d.COUNTY+"_svg"}) .attr("stroke", function(d,i){ if (d.COUNTY == 'Lough Neagh'){ return 'none' } else{ return 'grey' } }) .attr("fill", function(d,i){ if (d.COUNTY == 'Lough Neagh'){ return 'white' } else{ return 'grey' } }) .attr("class", "hex") .attr("d", "M0 12.990381056766578L7.5 0L22.5 0L30 12.990381056766578L22.5 25.980762113533157L7.5 25.980762113533157Z") .attr("transform", function(d,i){return "translate("+(26*d.x).toString()+ ","+ (15*d.y).toString() +")"}); var bb; var data_array=[]; var alphabetical_order=[]; var county_total = []; max_county=0; max_county_name = 'null'; var numerical_order; numerical_order=[]; var max_properties = 0; //max about of properties in a particular range band- needed for Y-axis and scale small_ms_coords = []; var hexagons; var small_ms; var bisect; function get_numerical_order(data){ numerical_order = []; while(numerical_order.length max_county ){ indicator = false; for(j=0; j