diff --git a/source/data/security/transparenz/saferworld.csv b/source/data/security/transparenz/saferworld.csv new file mode 100644 index 0000000..b3ca012 --- /dev/null +++ b/source/data/security/transparenz/saferworld.csv @@ -0,0 +1,20 @@ +"Country","Information on report publication","Information on policy","Information on licence applications","Information on export licences ","Information on brokering licences ","Information on transit licences ","Information on licence denials, revocations, suspensions and extensions","Information on export deliveries ","Information on enforcement ","Information on activities which have an impact of arms' proliferation ","Average" +"Austria","0","0","0","4","0","0","0","4","0","0","1" +"Belgium","40","67"," 0","76"," 0","18","57"," 0"," 0"," 0","26" +"Czech Republic","100"," 92"," 50"," 58"," 50"," 23"," 24"," 83"," 86"," 29"," 59" +"Denmark"," 0","83"," 0","73"," 0"," 5","43"," 0"," 0"," 0","20" +"Finland","100"," 75"," 0"," 69"," 0"," 0"," 0"," 91"," 0"," 0"," 34" +"France","40","83"," 0","65"," 0"," 0","32"," 4","14","29","27" +"Germany ","100"," 92"," 50"," 89"," 71"," 0"," 65"," 43"," 0"," 29"," 54" +"Greece","0","0","0","0","0","0","0","0","0","0","0" +"Hungary","40","92"," 0","18"," 5"," 0"," 0","22","14"," 0","19" +"Ireland"," 0","92","17","65"," 0"," 0"," 3"," 0","71"," 0","25" +"Italy"," 40","100"," 0"," 64"," 0"," 5"," 3"," 17"," 14"," 14"," 26" +"Luxembourg","0","0","0","0","0","0","0","0","0","0","0" +"Netherlands","40","92"," 0","47"," 0","48","59"," 0"," 0","14","30" +"Poland","40","83"," 0","56","40"," 0","16"," 9"," 0","14","26" +"Portugal","40","83"," 0","36"," 5"," 5"," 0","43","14"," 0","23" +"Slovakia","100"," 75"," 0"," 51"," 0"," 0"," 3"," 26"," 14"," 0"," 27" +"Spain","100"," 92"," 33"," 69"," 0"," 9"," 51"," 91","100"," 86"," 63" +"Sweden","100","100"," 17"," 55"," 17"," 55"," 16"," 30"," 86"," 57"," 53" +"UK"," 40","100"," 17"," 67"," 38"," 0"," 35"," 0","100"," 43"," 44" diff --git a/source/javascripts/components/barchart.coffee b/source/javascripts/components/barchart.coffee index cb9f86c..0e13816 100644 --- a/source/javascripts/components/barchart.coffee +++ b/source/javascripts/components/barchart.coffee @@ -1,6 +1,7 @@ class @Barchart extends @D3Graph constructor: (@data, @options = {}) -> - @options = _.defaults(@options, { width: 800, height: 200, margin: {top: 40, right: 30, bottom: 120, left: 40}, ticks: { y: 5, x: 4 }, rotate: { x: true, y: false } }) + @options = _.defaults(@options, { width: 800, height: 200, margin: {top: 40, right: 30, bottom: 120, left: 40}, ticks: { y: 5, x: 4 }, rotate: { x: false, y: false }, showExtent: false }) + @extentClass = "extent" createYAxis: -> @svgSelection.append("g") @@ -14,30 +15,40 @@ class @Barchart extends @D3Graph setGroupKey: (key='group') -> @groupKey = key + showExtent: -> + @countries.append('rect') + .attr('y',0).attr('width', @xScale.rangeBand()) + .attr('height', @options.height) + .attr('class', @extentClass) + + rotateLabels: (axis) -> + @svgSelection.select("g.#{axis}.axis") + .selectAll("text") + .attr("y", 0) + .attr("x", 9) + .attr("dy", ".30em") + .attr("transform", "rotate(90)") + .style("text-anchor", "start") + draw: (data) -> - countries = @svgSelection.selectAll('g.countries').data(@data) - countries + @countries = @svgSelection.selectAll('g.countries').data(@data) + @countries .enter() .append('g') .attr('class', (d) => "countries #{d[@groupKey]}") .attr('transform', (d) => "translate(#{@xScale(d[@groupKey])},0)") - - values = countries.append('rect') + if @options.showExtent + @showExtent() + values = @countries.append('rect') values .attr('y', (d) => @yScale(d[@valueKey])) .attr('width', @xScale.rangeBand()) .attr('height', (d,i) => @options.height - @yScale(d[@valueKey])) - countries.append('text') + @countries.append('text') .text((d) => d[@valueKey]) .attr('y', (d) => @yScale(d[@valueKey]) - 10) .attr('x', @xScale.rangeBand()/2) .attr('text-anchor', 'middle') .attr('class', 'label') if @options.rotate.x - @svgSelection.select('g.x.axis') - .selectAll("text") - .attr("y", 0) - .attr("x", 9) - .attr("dy", ".30em") - .attr("transform", "rotate(90)") - .style("text-anchor", "start") + @rotateLabels("x") diff --git a/source/javascripts/transparenz.coffee b/source/javascripts/transparenz.coffee new file mode 100644 index 0000000..de09df3 --- /dev/null +++ b/source/javascripts/transparenz.coffee @@ -0,0 +1,13 @@ +$ -> + if $('#transparenz .saferworld').length > 0 + saferworldPath = "#{rootPath}/data/security/transparenz/saferworld.csv" + d3.csv saferworldPath, (data) -> + options = { showExtent: true, rotate: { x: true } } + saferworldChart = new @Barchart(data, options) + _.map(data, (d) -> d.Average = parseInt(d.Average)) + data = _.sortBy(data, (d) -> d.Average) + saferworldChart.setXDomain(data.map((d) -> d.Country)) + saferworldChart.setYDomain([d3.min(data, (d) -> d.Average),100]) + saferworldChart.setValueKey('Average') + saferworldChart.setGroupKey('Country') + saferworldChart.render('.saferworld') diff --git a/source/sicherheit/index.html.haml b/source/sicherheit/index.html.haml index 89a9cfa..cd4f8a1 100644 --- a/source/sicherheit/index.html.haml +++ b/source/sicherheit/index.html.haml @@ -21,7 +21,7 @@ block: "sicherheit" = link_to "/sicherheit/friedensfoerderung/index.html" do %h5 Zivile Friedensförderung %li - %a + = link_to "/sicherheit/transparenz/index.html" do %h5 Transparenz des Waffenexports .cdi #cdi-index diff --git a/source/sicherheit/transparenz/index.html.haml b/source/sicherheit/transparenz/index.html.haml new file mode 100644 index 0000000..e36e6a9 --- /dev/null +++ b/source/sicherheit/transparenz/index.html.haml @@ -0,0 +1,18 @@ +--- +title: Entwicklungsbarometer - Transparenz +--- +#sicherheit.indikator.sub-indikator + = link_to "/sicherheit/index.html" do + %h1.sicherheit Sicherheit + #transparenz + .navbar + %ul.nav + %li.active + %h4 Transparenz des Waffenexports + .saferworld.barchart + + %h2 Transparenz des Waffenexports + .explanation + %p Waffenexporte sind ein kontroverses Thema, vor allem wenn es darum geht, Waffen in nicht-demokratische Staaten zu liefern. Nicht umsonst müssen alle Waffenexporte vom Bundeswirtschaftsministerium explizit genehmigt werden. Eine Debatte darüber, wann, welche Waffen an wen geliefert werden ist daher wichtig für eine entwicklungsfreundliche Sicherheitspolitik. + .explanation + %p Die Daten für diesen Indikator stammen von der britischen NGO Saferworld. Saferworld sammelt für alle EU Länder qualitative Informationen zu etwa 170 Details im Hinblick auf die Transparenz des Waffenhandels. Für das Entwicklungsbarometer wurde lediglich die Daten für Waffenexport berücksichtigt. Informationen zu Waffenimporten eines EU Landes wurden nicht genutzt. In Konsultation mit Saferworld wurden eine Auswahl von 98 Unterindikatoren in insgesamt 10 Informationskategorien getroffen und gewichtet. Die hier angegebenen Daten stellen dar, zu welchem Grad ein Land diese Transparenzkriterien erfüllt. diff --git a/source/stylesheets/pages/_sicherheit.sass b/source/stylesheets/pages/_sicherheit.sass index eb5816a..092eb3a 100644 --- a/source/stylesheets/pages/_sicherheit.sass +++ b/source/stylesheets/pages/_sicherheit.sass @@ -82,3 +82,5 @@ section#panzer fill: $light-blue .label font-size: 0.6em + rect.extent + fill: #f3f3f3