var project={"_id":"599d914edf4fb1d0b2992ec4","id":"8d9c7b2c493c0449a97261fcce0c554a9f05e0b4","name":"Air Transport Accessibility","user":"57dfeb1654955f1127d5672b","description":"How accessible are airports to people in the world?","created":"2017-01-26T14:51:18.418Z","shared":false,"server":"micro","datafiles":[{"file":{"link":"https://v4p4sz5ijk.execute-api.us-east-1.amazonaws.com/anbdata/states/usoap/ssc-list?api_key=5e3c2900-873b-11e6-9c57-396344a58800&states=&format=json","type":"URL/API","url":"https://v4p4sz5ijk.execute-api.us-east-1.amazonaws.com/anbdata/states/usoap/ssc-list?api_key=5e3c2900-873b-11e6-9c57-396344a58800&states=&format=json","message":{"error":false,"text":""}},"varname":"allssc","title":"SSC States","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":"","sendtojs":true},{"file":{"link":"https://s3.amazonaws.com/istarsshare/worldmap.js","type":"URL/API","url":"https://s3.amazonaws.com/istarsshare/worldmap.js","message":{"error":false,"text":""}},"varname":"mapdata","title":"Map","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":"","sendtojs":true},{"file":{"link":"https://v4p4sz5ijk.execute-api.us-east-1.amazonaws.com/anbdata/services/groupselect","type":"URL/API","url":"https://v4p4sz5ijk.execute-api.us-east-1.amazonaws.com/anbdata/services/groupselect","message":{"error":false,"text":""}},"varname":"groups","title":"Groups","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":""},{"file":{"link":"http://api.anbdata.com/anb/states/names/icao-member-states?api_key=7c3cb620-ed23-11e5-a5f9-adff4fb3e3e1","type":"URL/API","url":"http://api.anbdata.com/anb/states/names/icao-member-states?api_key=7c3cb620-ed23-11e5-a5f9-adff4fb3e3e1","message":{"error":false,"text":""}},"varname":"statenames","title":"Statenames","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":""}],"packs":["bootstrap","font-awesome","jquery"],"container":"mainpart","js":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"},"depurl":"https://quipslibistars.s3.amazonaws.com/prod/8d9c7b2c493c0449a97261fcce0c554a9f05e0b4/script.js"},"title":"Javascript","activated":true,"name":"js","linkedtofile":false,"optional":true,"content":"\n//------------------------------------------------------//\n//- Initial Selected Group: World\n//------------------------------------------------------//\n$(\"#groupsel\").val(\"518a8adc9a6a436858000001\");\n\n\n//------------------------------//\n//- CAN CHANGE LINKS AND INITS -//\n//------------------------------//\nvar prodlink = \"http://quips.anbdata.com/project/prod/8d9c7b2c493c0449a97261fcce0c554a9f05e0b4.html\";\n//var datalink = \"http://test.anbdata.com:8000/anb/states/system/flat-population-stats?api_key=7c3cb620-ed23-11e5-a5f9-adff4fb3e3e1&callback=?\";\n//var agglink = \"http://test.anbdata.com:8000/anb/states/system/aggregated-population-stats?api_key=7c3cb620-ed23-11e5-a5f9-adff4fb3e3e1&callback=?\";\nvar datalink = \"https://api.anbdata.com/anb/states/system/flat-population-stats?api_key=7c3cb620-ed23-11e5-a5f9-adff4fb3e3e1&callback=?\";\nvar agglink = \"https://api.anbdata.com/anb/states/system/aggregated-population-stats?api_key=7c3cb620-ed23-11e5-a5f9-adff4fb3e3e1&callback=?\";\n\nvar darkbluecol=\"rgb(0,84,164)\"\nvar lightbluecol=\"rgb(161,207,239)\"\nvar darkbluecol_o=\"rgba(0,84,164,0.2)\"\nvar lightbluecol_o=\"rgba(161,207,239,0.2)\"\n\n\nvar tri = \"https://s3.amazonaws.com/istarsshare/Orange+circledot24.png\";\nvar triElem = '';\n\n\nvar thisuseremail=\"hwen@icao.int\"\nif (typeof(getEmail)==\"function\") {\n getEmail(function(e){\n thisuseremail=e;\n\t\t$(\"#emailaddress\").val(e);\n });\n\t$(\"#print\").removeAttr(\"disabled\");\n}else{\n\t$(\"#emailaddress\").val(\"Enter your email\");\n\t$(\"#email\").show();\n\t$(\"#emailaddress\").show();\n\t$(\"#emailprint\").show();\n\t$(\"#print\").hide();\n\t$(\"#intro\").show();\n\t$(\".container\").css(\"width\",\"795px\");\n\t$(\".map\").css(\"width\",\"700px\");\n\t$(\".prioritylist\").css(\"width\",\"700px\");\n}\nif (getParameterByName(\"print\")) {\n $(\"#topbar\").show();\n $(\".noprint\").hide();\n $(\".printit\").hide();\n\n var field = $('#groupsel');\n field.selectpicker();\n field.val(JSON.parse(getParameterByName(\"region\")));\n $(\"#groupsel\").selectpicker('refresh');\n\t\n\tvar field2 = $('#statesel');\n field2.selectpicker();\n field2.val(JSON.parse(getParameterByName(\"state\")));\n\t$(\"#statesel\").selectpicker('refresh');\n\t\n\tvar field3 = $('#shownames');\n field3.attr('checked', JSON.parse(getParameterByName(\"shownames\")));\n\t\n\tvar field4 = $('#showvals');\n field4.attr('checked', JSON.parse(getParameterByName(\"showvals\")));\n\t\n}\nif (window.location.href.indexOf(\"www.icao.int\")>=0) {\n $(\"#printsection\").hide()\n}\n\nfunction getParameterByName( name ){\n var regexS = \"[\\\\?&]\"+name+\"=([^&]*)\", \n regex = new RegExp( regexS ),\n results = regex.exec( window.location.search );\n if( results == null ){\n return \"\";\n } else{\n return decodeURIComponent(results[1].replace(/\\+/g, \" \"));\n }\n}\n\nfunction printpdf(){\n\t\n if($(\"#emailaddress\").val()==\"Enter your email\"){\n\t\talert(\"Please enter your email address.\");\n\t\treturn;\n\t}\n thisuseremail = $(\"#emailaddress\").val();\n \n\n //var file=prodlink+\"?print=true®ion=\"+JSON.stringify($(\"#groupsel\").selectpicker('val'))+\"&state=\"+JSON.stringify($(\"#statesel\").selectpicker('val'));\n\tvar file=prodlink+\"?print=true®ion=\"+JSON.stringify($(\"#groupsel\").val())+\"&state=\"+JSON.stringify($(\"#statesel\").val())+\"&shownames=\"+JSON.stringify(document.getElementById('shownames').checked)+\"&showvals=\"+JSON.stringify(document.getElementById('showvals').checked);\n// console.log(file)\n $.getJSON(\"https://v4p4sz5ijk.execute-api.us-east-1.amazonaws.com/anbdata/services/genpdf?callback=?\",\n {file:file,\n key:\"Accessibility/\"+Math.round(new Date().getTime()/1000)+\"/accessibilityreport.pdf\",\n header:\"Air Transport Accessibility Report\",\n //timeout: 15000,\n email:thisuseremail},function(res){\n //console.log(res)\n }) \n\n alert(\"The report was sent to your email \"+$(\"#emailaddress\").val()+\". You may need to check your spam or junk folder.\");\n}\n\n$(\"#print\").click(function(e){\n e.preventDefault();\n printpdf();\n});\n\n$(\"#emailprint\").click(function(e){\n e.preventDefault();\n printpdf();\n});\n\n$( \"#groupsel\" ).change(function() {\n\n\tsel();\n});\n\n$( \"#statesel\" ).change(function() {\n\n\tsel();\n});\n\n$(\".groupgraph\").change(function(e){\n\n sel();\n})\n\n\nfunction sel(){\n\tstatename=$(\"#statesel option:selected\").text()\n groupname=$(\"#groupsel option:selected\").text()\n\t$(\".statename\").text(statename)\n $(\".groupname\").text(groupname)\n var g=$(\"#groupsel\").val();\n\tvar selregion=\"\";\n\t$(\"#wait\").show();\n\t\n\t//Get States\n\t$.getJSON(\"https://v4p4sz5ijk.execute-api.us-east-1.amazonaws.com/anbdata/services/groupcomp?callback=?\",\n {group:g},function(gcomp){\n \n\t\tgroupstates=gcomp;\n draw(gcomp.Composition,g);\n });\n\n}\n\n\nfunction draw(rawdata, gcode){\n\t$(\"#area\").empty();\n\t$(\"#intro\").text(\"\");\n \n\t\n\t//Get Aggregated Data\n $.getJSON(agglink,\n {states:gcode},function(res){\n\t\t\taggData=res;\n\t\t\t\n \n //Get Flat Data\n\t\t$.getJSON(datalink,{states:gcode},function(res){\n\t\n\t\t\tvar title = \"Aerodromes Accessibility\";\n\t\t\tvar subtitle = \"Percentage of a State's population living within 100 KM of an aerodrome (%)\";\n\t\t\n\t\t\tmaketable(res,true,true);\n\t\t\tgroupgraph(res);\n\t\t\tdrawMap(title,subtitle,res,\"map\")\n\t\t\thideWait();\n\t\t});\n\t\t\n\t\t//Get Selected State Data\n\t\tvar scode=$(\"#statesel option:selected\").val()\n\t\t$.getJSON(datalink,{states:scode},function(res){\n\t\t\tif(res[0]){\n\t\t\t\tovergraph(res[0]);\n\t\t\t\tgetSummary(res[0],aggData[0])\n\t\t\t}else{\n\t\t\t\talert(\"State information not availble for \"+statename);\n\t\t\t\t$(\".summary\").text(\"Summary not available for \" +statename);\n\t\t\t}\n\t\t\t\n\t\t});\n });\n \n \n\t\n\t\n}\n\nfunction getSummary(state, group){\n\t//console.log(state)\n\t//console.log(group)\n\t\n\tvar delta=state.Population_Near_All_Aerodromes_100km_pc-group.Population_Near_All_Aerodromes_100km_pc;\n\t\n\t$(\".summary\").html( \"

In \"+state.StateName+((state.Int_Aerodromes>1)?(\", there are \"+state.Int_Aerodromes+\" international aerodromes\"):((state.Int_Aerodromes==1)?(\", there is one international aerodrome\"):(\", there are no international aerodromes\")))+\" as defined by the ICAO Air Navigation Plans.

Using 2015 population data, \"+Math.round(100*state.Population_Near_Int_Aerodromes_100km_pc)/100+\"% of \"+state.StateName+\"'s population lives within 100 KM of an international aerodrome. When domestic aerodromes with at least one regular connection to an international aerodrome are also considered, the population's overall accessibility becomes \"+Math.round(100*state.Population_Near_All_Aerodromes_100km_pc)/100+\"% with \"+((state.All_Aerodromes>1)?(state.All_Aerodromes+\" aerodromes in total.\"):((state.All_Aerodromes==1)?(\"one aerodrome in the State.\"):(\"no aerodromes in the State.\")))+\"

Compared to the \"+groupname+\" group, which has \"+Math.round(100*group.Population_Near_All_Aerodromes_100km_pc)/100+\"% overall acessibility, \"+state.StateName+((delta>=0)?(\" is more accessible than the group's overall accessibility.\"):(\" is less accessible than the group's overall accessibility.

\")) );\n\t\n}\n\nfunction overgraph(v){\n\tvar groupav=Math.round(100*aggData[aggData.length-1].Population_Near_All_Aerodromes_100km_pc)/100;\n\tvar groupint=Math.round(100*aggData[aggData.length-1].Population_Near_Int_Aerodromes_100km_pc)/100;\n\tvar groupother=Math.round(100*(aggData[aggData.length-1].Population_Near_All_Aerodromes_100km_pc-aggData[aggData.length-1].Population_Near_Int_Aerodromes_100km_pc))/100;\n\t\n\toverall_graph.subtitle.text=statename+\" versus \"+groupname\n\n\toverall_graph.series[0].data[0]=Math.round(100*(v.Population_Near_All_Aerodromes_100km_pc-v.Population_Near_Int_Aerodromes_100km_pc))/100\n overall_graph.series[1].data[0]=Math.round(100*v.Population_Near_Int_Aerodromes_100km_pc)/100\n overall_graph.series[2].data[0]=Math.round(100*v.Population_Near_All_Aerodromes_100km_pc)/100\n \n \n/* DO NOT WANT VERTICAL LINES\n overall_graph.yAxis.plotLines[0].value=groupav;\n overall_graph.yAxis.plotLines[0].label.text=\"Group Overall: \"+groupav+\"%\";\n\n\toverall_graph.yAxis.plotLines[1].value=groupint;\n overall_graph.yAxis.plotLines[1].label.text=\"Group International: \"+groupint+\"%\";\n\t\n\toverall_graph.yAxis.plotLines[2].value=groupother;\n overall_graph.yAxis.plotLines[2].label.text=\"Group Other: \"+groupother+\"%\";\n\t*/\n\toverall_graph.series[0].data[1]={y:groupother, color: lightbluecol_o};\n overall_graph.series[1].data[1]={y:groupint, color: darkbluecol_o};\n overall_graph.series[2].data[1]=groupav;\n\t\n\toverall_graph.xAxis.categories[0]=statename;\n\toverall_graph.xAxis.categories[1]=groupname;\n\toverall_graph.legend.enabled=true\n\t\n $(\"#overall_graph\").highcharts(overall_graph)\n}\n\nfunction groupgraph(data){\n\tvar h=11-7*groupstates.Composition.length/180;\n h=(h>12?12:(h<5?5:h));\n\t\n\t\n\t//Sort Ascending\n\tdata.sort(function(a,b){return a.Population_Near_All_Aerodromes_100km_pc-b.Population_Near_All_Aerodromes_100km_pc});\n\t\n group_graph.xAxis.labels.style.fontSize=h+\"px\";\n\tgroup_graph.series[0].data=[];\n group_graph.series[1].data=[];\n group_graph.series[2].data=[];\n group_graph.xAxis.categories=[];\n group_graph.subtitle.text=\"\";\n group_graph.xAxis.labels.enabled=$(\"#shownames\").is(\":checked\")\n group_graph.series[2].dataLabels.enabled=$(\"#showvals\").is(\":checked\")\n group_graph.legend.enabled=true\n\t\n\t//Add data to graph\n\t$.each(data, function(i, v){\n\t\tgroup_graph.xAxis.categories.push(v.StateName);\n\t\tgroup_graph.series[1].data.push(Math.round(100*(v.Population_Near_Int_Aerodromes_100km_pc))/100);\n group_graph.series[0].data.push(Math.round(100*(v.Population_Near_All_Aerodromes_100km_pc-v.Population_Near_Int_Aerodromes_100km_pc))/100);\n\t\t\n\t\t\n\t\t//Overall data, show label if selected State\n\t\tif ($(\"#showstate\").is(\":checked\")&&v.State==$(\"#statesel\").val()) {\n\t\t\tgroup_graph.series[2].data.push({\n\t\t\t\tname:v.State,\n\t\t\tdataLabels: {\n enabled: true,\n\t\t\t\tformat:\"{x}\",\n style: {\n fontWeight: 'bold'\n },\n verticalAlign: 'top'\n },\n\t\t\ty: Math.round(100*(v.Population_Near_All_Aerodromes_100km_pc))/100})\n\t\t}else\n\t\t{\n\t\t\tgroup_graph.series[2].data.push(Math.round(100*(v.Population_Near_All_Aerodromes_100km_pc))/100);\t\n\t\t}\n\t\t\n\t});\n\t\n\tgroup_graph.yAxis.plotLines[0].value=Math.round(100*aggData[aggData.length-1].Population_Near_All_Aerodromes_100km_pc)/100;\n group_graph.yAxis.plotLines[0].label.text=\"Group Overall: \"+Math.round(100*aggData[aggData.length-1].Population_Near_All_Aerodromes_100km_pc)/100+\"%\";\n\t\n\t\n $(\"#group_graph\").highcharts(group_graph);\n}\nfunction maketable(data,isFilter, isInfo){\n\tvar dataTable=[];\n\t\n\t//----- detailed table\n\t$.each(data, function(index, val){\n\t\tvar s = [];\n\t\ts.push(val.StateName);\n\t\ts.push(val.Int_Aerodromes);\n\t\ts.push(val.All_Aerodromes);\n\t\ts.push(Math.round(val.Population_Near_Int_Aerodromes_100km_pc*100)/100+\"%\");\n\t\ts.push(Math.round(val.Population_Near_All_Aerodromes_100km_pc*100)/100+\"%\");\n\n\t\tdataTable.push(s);\n\t});\n\t\n\tvar detcol = [\n { title: \"State\"},\n\t\t\t{ title: \"International Aerodromes\"},\n\t\t\t{ title: \"All Aerodromes\"},\n\t\t\t{ title: \"Population <100 KM From International Aerodromes\"},\n\t\t\t{ title: \"Population <100 KM From All Aerodromes\"}\n ];\n\n\tdrawtable(dataTable,\"#det\",detcol,isFilter, isInfo);\n\t\n}\nfunction drawtable(states_ro,element,col,isFilter, isInfo){\n\t$(element).empty();\n \n $(element).DataTable({\n\t\tcolumnDefs: [\n\t\t\t{ type: 'percent', targets: 0 }\n\t\t],\n destroy: true,\n data : states_ro,\n columns : col,\n\t searching: isFilter,\n\t paging: isInfo\n });\n}\n\n\nfunction drawMap(title, subtitle, data, element) {\n\n\tvar series = [];\n\tvar custom = [];\n\n\t$.each(data, function (i, e) {\n\t\tif(e.State==$(\"#statesel\").val()){\n\t\t\t//selected state, add symbol\n\t\t\tseries.push({\n\t\t\t\tcode: e.State,\n\t\t\t\tvalue: e.Population_Near_All_Aerodromes_100km_pc,\n\t\t\t\tname: e.StateName,\n\t\t\t\tisState: true\n\t\t\t});\n\t\t}else{\n\t\t\tseries.push({\n\t\t\t\tcode: e.State,\n\t\t\t\tvalue: e.Population_Near_All_Aerodromes_100km_pc,\n\t\t\t\tname: e.StateName,\n\t\t\t\tisState: false\n\t\t\t});\n\t\t}\n\t\t\t\n\t});\n\n\n\n\tHighcharts.mapChart(element, {\n\n\t\tchart: {\n\t\t\tborderWidth: 1,\n\t\t\tevents: {\n\t\t\t\tload: function () {\n\t\t\t\t\tthis.mapZoom(1.1);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcredits: {\n\t\t\tenabled: false\n\t\t},\n\n\t\ttitle: {\n\t\t\ttext: title\n\t\t},\n\t\tsubtitle: {\n\t\t\ttext: subtitle\n\t\t},\n\t\tmapNavigation: {\n\t\t\tenabled: true\n\t\t},\n\n\t\tlegend: {\n\t\t\ttitle: {\n\t\t\t\ttext: 'Population living within 100 KM of an aerodrome',\n\t\t\t\tstyle: {\n\t\t\t\t\tcolor: (Highcharts.theme && Highcharts.theme.textColor) || 'black'\n\t\t\t\t}\n\t\t\t},\n\t\t\tlabelFormat:\"{value}%\",\n\t\t\talign: 'left',\n\t\t\tverticalAlign: 'bottom',\n\t\t\tvalueDecimals: 0,\n\t\t\tbackgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || 'rgba(255, 255, 255, 0.85)'\n\t\t},\n\t\ttooltip: {\n\t\t\tformatter: function () {\n\t\t\t\tif (this.point.isState) {\n\t\t\t\t\tvar t = ' Total Accessibility: ' + Math.round(this.point.value * 100) / 100 + '%';\n\t\t\t\t\treturn '' + this.point.name + \"
Selected State

\" + t + '
';\n\t\t\t\t} else {\n\t\t\t\t\tvar t = ' Total Accessibility: ' + Math.round(this.point.value * 100) / 100 + '%';\n\t\t\t\t\treturn '' + this.point.name + \"
\" + t + '
';\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tcolorAxis: {\n\t\t\tlabelFormat:\"{value}%\",\n\t\t\tmin: 0,\n\t\t\tmax: 100,\n\t\t\tminColor: '#6F0691',\n\t\t\tmaxColor: '#1FD82C',\n\t\t\tstops: [\n\t\t\t\t[0, '#f4428c'],\n\t\t\t\t[0.2, '#f4428c'],\n\t\t\t\t[0.60, '#3067FC'],\n\t\t\t\t[0.8, '#1FD82C'],\n\t\t\t\t[1, '#1FD82C']\n\t\t\t]\n\t\t},\n\t\tplotOptions: {\n\t\t\tmap: {\n\t\t\t\tstates: {\n\t\t\t\t\thover: {\n\t\t\t\t\t\tbrightness: 0,\n\t\t\t\t\t\tborderColor: \"gray\",\n\t\t\t\t\t\tborderWidth: 2\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t\tseries: [{\n\t\t\t\tdata: series,\n\t\t\t\tmapData: mapdata,\n\t\t\t\tjoinBy: ['iso-a3', 'code'],\n\t\t\t\tanimation: true,\n\t\t\t\tname: 'SM',\n\t\t\t\tdataLabels: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\tuseHTML: true,\n\t\t\t\t\tcolor: 'white',\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 0,\n\t\t\t\t\tformatter: function () {\n\t\t\t\t\t\treturn (this.point.isState === true) ? triElem : null\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t});\n}\n\nvar group_graph={\n chart: {\n animation: false,\n type: 'column',\n zoomType:\"x\"\n\n },\n title: {\n text: 'Overall Aerodrome Accessibility by State'\n },\n subtitle: {\n text: ''\n },\n tooltip:{\n valueSuffix:\"%\" \n },\n xAxis: {\n categories: [],\n labels:{enabled:false,\n style:{fontSize:\"6px\"},\n rotation:-45,\n },\n title: {\n text: null\n }\n },\n \n yAxis: {\n min: 0,\n max:100,\n title: {\n text: 'Population <100 KM from Aerodrome (%)'\n },\n labels:{\n format:\"{value}%\"\n },\n stackLabels: {\n enabled: false,\n format:\"{total}%\",\n style: {\n fontWeight: 'bold'\n //color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'\n }\n },\n plotLines:[\n {\n value:50,\n label:{\n text:\"Group Overall: xx%\",\n rotation:0\n\n },\n width:2,\n color:\"black\"\n }\n ] \n },\n legend:{\n enabled:false \n },\n credits: {\n enabled: false\n },\n plotOptions:{\n column:{\n //pointWidth:40,\n dataLabels:{enabled:false,format:\"{y}%\"},\n stacking:\"normal\"\n },\n series: {\n animation: false\n }\n },\n series: [{\n name: 'Other Aerodromes',\n color:lightbluecol,\n data: []\n },{\n name: 'International Aerodromes',\n color:darkbluecol,\n data: []\n },{\n name: 'Overall',\n color:\"black\",\n type:\"line\",\n dataLabels:{enabled:true},\n lineWidth : 0,\n marker : {\n enabled : true,\n radius : 2\n },\n data: []\n }]\n}\n\nvar overall_graph={\n chart: {\n type: 'bar'\n ,\n animation: false,\n marginRight:60\n },\n title: {\n text: 'State Accessibility'\n },\n subtitle: {\n text: ''\n },\n xAxis: {\n categories: ['State Accessibility','Group Accessibility'],\n labels:{enabled:true},\n title: {\n text: null\n }\n },\n yAxis: {\n min: 0,\n max:100,\n title: {\n text: 'Population <100 KM from Aerodrome (%)'\n },\n labels:{\n format:\"{value}%\"\n },\n stackLabels: {\n enabled: false,\n format:\"{total}%\",\n style: {\n fontWeight: 'bold'\n //color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'\n }\n },\n plotLines:[\n /*{\n value:50,\n label:{\n text:\"Group Overall: xx%\",\n rotation:0\n\n },\n width:2,\n color:\"black\"\n },{\n value:50,\n label:{\n text:\"Group International: xx%\",\n rotation:0\n\n },\n width:2,\n color:darkbluecol\n },{\n value:50,\n label:{\n text:\"Group Other: xx%\",\n rotation:0\n\n },\n width:2,\n color:lightbluecol\n }*/\n ] \n },\n legend:{\n enabled:true \n },\n credits: {\n enabled: false\n },\n tooltip:{\n valueSuffix:\"%\" \n },\n plotOptions:{\n bar:{\n //pointWidth:40,\n dataLabels:{enabled:false,format:\"{y}%\"},\n stacking:\"normal\"\n }\n ,\n series: {\n animation: false\n }\n },\n series: [{\n name: 'Other Aerodromes',\n color:lightbluecol,\n data: []\n },{\n name: 'International Aerodromes',\n color:darkbluecol,\n data: []\n },{\n name: 'Overall',\n color:\"black\",\n type:\"line\",\n dataLabels:{enabled:true,format:\"{y}%\"},\n lineWidth : 0,\n marker : {\n enabled : true,\n radius : 2\n },\n //color:\"#32cd32\",\n data: []\n }]\n }\n\nfunction hideWait(){\n\t$(\"#wait\").hide()\n}\n\nsel();\n"},"css":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"}},"title":"Cascading Style Sheet (CSS)","activated":false,"name":"css","linkedtofile":false,"optional":true,"content":".tabledetailed td:nth-child(3)\r\n{\r\n\r\n text-align:left !important;\r\n}"},"jade":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"},"depurl":"https://quipslibistars.s3.amazonaws.com/prod/8d9c7b2c493c0449a97261fcce0c554a9f05e0b4/main.jade"},"title":"Jade","activated":true,"name":"jade","linkedtofile":false,"optional":false,"content":"\n.container(style=\"width:900px\")\n br\n \n div#topbar(style=\"margin-top:20px;display:none\")\n img(style=\"width:500px;margin: 0px auto;display:block\",src=\"https://s3.amazonaws.com/istarsscripts/images/State-Safety-Report_title-page_ICAO-logo.png\")\n .page-header\n h1(style='color:#0055A5;text-align:center'+(printit?\";margin-top:50px\":\"\")) Air Transport Accessibility\n h3#header(style='text-align:center;color:#5A6870') \n span.statename Canada\n | in \n span.groupname World\n h5(style='text-align:center;color:#5A6870'): em=\"Automatically Generated by ICAO/ANB \"+new Date().toISOString().substring(0,10)\n p#intro(style=\"display:none;color:#5A6870;text-align:justify\")\n #wait.alert.alert-warning(style=\"display:none\") Graphs are generating, please wait ...\n #area\n #template\n p.printit Select a State: \n select#statesel\n for state in statenames.sort(function(a,b){return (a[\"UN_state_name\"]") var libs=[] $(project.libs).each(function(i,v){ if (v.name!="jquery") { $(v.link.split(",")).each(function(j,u){ if (u.slice(-2)=="js") { libs.push(u+(v.haskey?"?key="+project[v.name+"key"]:"")) } else { $("head").append("") } }) } }) if (project.morejs) { $(project.morejs).each(function(i,v){ if ((v.url.substring(0,2)=="//")||(v.url.substring(0,8)=="https://")||(v.url.substring(0,7)=="http://")) { libs.push(v.url) } }) } if (project.morecss) { $(project.morecss).each(function(i,v){ $("head").append("") }) } loadlibs(libs.reverse()) }); })(); function loadlibs(libs){ if (libs.length>0) { var l=libs.pop() loadScript(l,function(){ //$.getScript(l,function(res){ loadlibs(libs) }) //.fail(function(e){ // loadlibs(libs) // //}) } else { start() } } function putscriptcontent(content){ var script = document.createElement("script") script.type = "text/javascript"; $(script).text(content) document.getElementsByTagName("head")[0].appendChild(script); } function start(){ //load jade $.getJSON(project.host+"/project/"+project.version+"/"+project.id+"/render?callback=?"+(project.datachange?"&data="+project.datachange:""),function(res){ $("#"+project.container).html(res.html) if (project.css.activated) { if (project.css.linkedtofile) { $("head").append("")} else { $("head").append("")} } if (project.js.activated) { if (project.js.linkedtofile) { $.getScript(project.js.file[(project.prod?"depurl":"url")])} else { putscriptcontent(project.js.content)} if (project.mainjs) { window[project.mainjs]() } } }) }