var project={"_id":"57421647de78eca41cc5a751","id":"75d46fcdbd26f72f7f3bad33d798fdc7a4fab8ae","name":"Safety Audit Information","user":"566ac9850286a8f9080cdd79","description":"Public USOAP Graph Site","created":"2016-05-22T18:05:33.918Z","shared":false,"server":"micro","datafiles":[{"file":{"link":"https://wqzr3klah5.execute-api.us-east-1.amazonaws.com/pro/usoap/state_ei_latest?id=istars4","type":"URL/API","url":"https://wqzr3klah5.execute-api.us-east-1.amazonaws.com/pro/usoap/state_ei_latest?id=istars4","message":{"error":false,"text":""}},"varname":"EIdata","title":"EI","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":"","sendtojs":true},{"file":{"link":"https://wqzr3klah5.execute-api.us-east-1.amazonaws.com/pro/usoap/ssclist?id=istars4","type":"URL/API","url":"https://wqzr3klah5.execute-api.us-east-1.amazonaws.com/pro/usoap/ssclist?id=istars4","message":{"error":false,"text":""}},"varname":"ssc","title":"SSC","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":"","sendtojs":true},{"file":{"link":"https://wqzr3klah5.execute-api.us-east-1.amazonaws.com/pro/usoap/region_ei?id=istars4®ions=World","type":"URL/API","url":"https://wqzr3klah5.execute-api.us-east-1.amazonaws.com/pro/usoap/region_ei?id=istars4®ions=World","message":{"text":"File not found","error":true}},"varname":"worldei","title":"World","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":"","sendtojs":true}],"packs":["bootstrap","highcharts","jquery","Datatables"],"container":"mainpart","js":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"},"depurl":"https://quipslibistars.s3.amazonaws.com/prod/75d46fcdbd26f72f7f3bad33d798fdc7a4fab8ae/script.js"},"title":"Javascript","activated":true,"name":"js","linkedtofile":false,"optional":true,"content":"var chart1,thechart;\nvar areas=['leg','org','pel','ops','air','aig','ans','aga']\n$(\"#readmorelink\").click(function(e){\n e.preventDefault();\n $(\"#sscplus\").modal()\n});\nfunction genchart(){\nchart1={\n chart: {\n renderTo:\"containerx\",\n\t inverted:false\n },\n\t colors: [\n\"#0000FF\",\n\"#8A2BE2\",\n\"#DEB887\",\n\"#5F9EA0\",\n\"#7FFF00\",\n\"#D2691E\",\n\"#FF7F50\",\n\"#6495ED\",\n\"#FFF8DC\",\n\"#00FFFF\",\n\"#00008B\",\n\"#008B8B\",\n\"#B8860B\",\n\"#A9A9A9\",\n\"#006400\",\n\"#BDB76B\",\n\"#8B008B\",\n\"#556B2F\",\n\"#FF8C00\",\n\"#9932CC\"\n],\n credits: {\n\tenabled:false\n },\n title: {\n\ttext: ''\n },\n xAxis: {\n\tcategories: ['Legislation','Organization','Licensing','Operations','Airworthiness','Accident Investigation','Air Navigation Services','Aerodromes'],\n\t labels:{\n\t enabled:true\n\t }\n },\n plotOptions: {\n\tline :{\n\t lineWidth:2,\n\t marker: {\n\t radius:6\n\t }\n\t}\n },\n yAxis: {\n\ttitle: {\n\t text: 'Effective Implementation (%)'\n\t},\n\tmin:-10,\n\tmax:110,\n\tshowLastLabel:false,\n\tshowFirstLabel:false,\n\ttickInterval:10\n },\n\t tooltip:{\n useHTML:true,\n enabled:true,\n pointFormat:'{series.name}: {point.y}
{point.id}
',\n formatter:function (){\n var s=\"\"+this.series.name+\"
\"+this.x+\": \";\n s=s+\"\"+this.point.y+\"%
\";\n if (this.point.id!=null)\n \t{\n \ts=s+this.point.id+\"
\";}\n return s;}\n },\n\t \n series: [ {\n\tname: 'Global average',\n\ttype: 'line',\n\tdashStyle:'ShortDash',\n\tlineWidth:2,\n\tdata: average\n }]\n }\nvar average=[0,0,0,0,0,0,0,0],n=[0,0,0,0,0,0,0,0]\nEIdata.forEach(function(v){\n areas.forEach(function(a,i){\n if (v[a]>=0) {\n average[i]+=v[a]\n n[i]++\n }\n })\n})\naverage.forEach(function(v,i){\n average[i]=Math.round(100*average[i]/n[i])/100\n})\nvar lastworld=worldei.pop()\nconsole.log(lastworld)\nchart1.series[0].data=[lastworld.leg *100,\n lastworld.org *100,\n lastworld.pel *100,\n lastworld.ops *100,\n lastworld.air *100,\n lastworld.aig *100,\n lastworld.ans *100,\n lastworld.aga *100\n ]\nthechart=new Highcharts.Chart(chart1)\n\n}\nvar SSClang=[\"\",\"\",\"ICAO has identified a significant safety concern with respect to the ability of this State
to properly oversee licenses under its jurisdiction.\",\n\"ICAO has identified a significant safety concern with respect to the ability of this State
to properly oversee its airlines (air operators) under its jurisdiction.\",\n\"ICAO has identified a significant safety concern with respect to the ability of this State
to properly oversee aircraft under its jurisdiction.\",\n\"\",\n\"ICAO has identified a significant safety concern with respect to the ability of this State
to properly oversee air navigation services under its jurisdiction.\",\n\"ICAO has identified a significant safety concern with respect to the ability of this State
to properly oversee aerodromes under its jurisdiction.\"];\n\n\n$(\"table.display\").dataTable({bSortClasses:false,paging:false,\"order\": [[ 1, \"asc\" ]]})\ngenchart()\n\n$(\"#reset\").click(function(e){\n e.preventDefault()\n genchart()\n $(\".graph\").prop('disabled', false)\n})\n$(\".graph\").click(function(e){\n e.preventDefault()\n $(this).prop('disabled', true)\n var data=JSON.parse($(this).attr(\"ei\"))\n var x=[]\n areas.forEach(function(v,i){\n var thessc=ssc.filter(function(d){return ((d.State==data.State)&&(d.area==v.toUpperCase()))})[0]\n if (thessc) {\n var t={y:data[v],color:\"#FF0000\",id:\"In \"+thessc.year+\", \"+SSClang[i]}\n if ($(\"#graphsel\").val()!=\"column\") {\n t[\"marker\"]={\n\t\t\t\t\tradius:10,\n\t\t\t\t\tfillColor:\"#FF0000\",\n\t\t\t\t\tlineColor:null,\n\t\t\t\t\tsymbol:\"circle\"\n\t\t\t\t\t};\n }\n x.push(t)\n }\n else {\n x.push(data[v])\n }\n })\n var s={name:data.Name,type:$(\"#graphsel\").val(),\n data:x}\n \n thechart.addSeries(s)\n})\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},"jade":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"},"depurl":"https://quipslibistars.s3.amazonaws.com/prod/75d46fcdbd26f72f7f3bad33d798fdc7a4fab8ae/main.jade"},"title":"Jade","activated":true,"name":"jade","linkedtofile":false,"optional":false,"content":".container(style=\"width:695px\")\n a#top(name=top)\n #resbut\n #resetdiv\n #containerx(style=\"WIDTH: 655px; HEIGHT: 400px\")\n #SSCdiv(style=\"display:none\")\n strong\n font(style=\"color: #1B4177; font-family: Verdana; font-size: 17px\") List of SSC States\n hr(style=\"background: #227DBC; border: none;\")\n p: strong ICAO has identified a Significant Safety Concern (SSC) for the States listed below\n p: i An SSC occurs when the audited State allows the holder of an authorization or approval to exercise the privileges attached to it, although the minimum requirements established by the State and by the Standards set forth in the ICAO Annexes are not met, resulting in an immediate safety risk to international civil aviation.