iraq_unrest 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +114 -0
  6. data/Rakefile +7 -0
  7. data/examples/example_01.png +0 -0
  8. data/examples/example_02.png +0 -0
  9. data/examples/example_03.png +0 -0
  10. data/examples/iraq_government_casualty_figure.csv +95 -0
  11. data/examples/iraq_government_casualty_figure.html +126 -0
  12. data/examples/iraqi_casualties_comparison.csv +119 -0
  13. data/examples/iraqi_casualties_comparison.html +105 -0
  14. data/iraq_unrest.gemspec +33 -0
  15. data/lib/iraq_unrest/concerns/serializable.rb +37 -0
  16. data/lib/iraq_unrest/concerns/validatable.rb +18 -0
  17. data/lib/iraq_unrest/config.rb +8 -0
  18. data/lib/iraq_unrest/data/Iraq_Government_Casualty_Figure.csv +116 -0
  19. data/lib/iraq_unrest/data_set.rb +41 -0
  20. data/lib/iraq_unrest/erb/header.html.erb +32 -0
  21. data/lib/iraq_unrest/erb/iraq_government_casualty_figure.html.erb +94 -0
  22. data/lib/iraq_unrest/erb/iraqi_casualties_comparison.html.erb +73 -0
  23. data/lib/iraq_unrest/format.rb +103 -0
  24. data/lib/iraq_unrest/google_doc.rb +31 -0
  25. data/lib/iraq_unrest/iraq_government_casualty_figure.rb +53 -0
  26. data/lib/iraq_unrest/iraq_unrest_record.rb +74 -0
  27. data/lib/iraq_unrest/iraqi_casualties_comparison.rb +46 -0
  28. data/lib/iraq_unrest/serializers.rb +46 -0
  29. data/lib/iraq_unrest/version.rb +3 -0
  30. data/lib/iraq_unrest.rb +50 -0
  31. data/test/fixtures/vcr_cassettes/iraq_government_casualty_figure.yml +161 -0
  32. data/test/fixtures/vcr_cassettes/iraqi_casualties_comparison.yml +184 -0
  33. data/test/google_doc_test.rb +56 -0
  34. data/test/iraq_government_casualty_figure_test.rb +253 -0
  35. data/test/iraqi_casualties_comparison_test.rb +246 -0
  36. data/test/test_helper.rb +17 -0
  37. data/test/validatable_test.rb +34 -0
  38. metadata +242 -0
@@ -0,0 +1,103 @@
1
+ module IraqUnrest
2
+
3
+ # Code from https://github.com/sandal/fatty
4
+ class Format
5
+ attr_accessor :params
6
+
7
+ # FIXME: Need to understand where the methods to be
8
+ # implemented are declared
9
+ def validate
10
+ end
11
+ end
12
+
13
+ class Formatter
14
+
15
+ class << self
16
+
17
+ def formats
18
+ @formats ||= {}
19
+ end
20
+
21
+ def required_params(*args)
22
+ @required_params = args
23
+ end
24
+
25
+ def format(name, options={}, &block)
26
+ formats[name] = Class.new(IraqUnrest::Format, &block)
27
+ end
28
+
29
+ def validate(format, params={})
30
+ check_required_params(params)
31
+ end
32
+
33
+ # puts ListFormatter.render(:csv, :data => data)
34
+ def render(format, params={})
35
+ validate(format, params)
36
+
37
+ # Each format object implements all the required steps
38
+ # so they they can be used interchangeably
39
+ format_obj = formats[format].new
40
+
41
+ # Customize
42
+ format_obj.params = params
43
+ format_obj.validate
44
+ format_obj.render
45
+ end
46
+
47
+ def render_file(file, params={})
48
+ format = File.extname(file).delete(".").to_sym
49
+
50
+ File.open(file, "w") do |f|
51
+ f << render(format, params)
52
+ end
53
+ end
54
+
55
+ private
56
+
57
+ def check_required_params(params)
58
+ unless (@required_params || []).all? { |k| params.key?(k) }
59
+ raise Exception, "One or more required params is missing"
60
+ end
61
+ end
62
+
63
+ end
64
+ end
65
+
66
+ class DataSetFormatter < Formatter
67
+
68
+ required_params :object
69
+
70
+ format :csv do
71
+
72
+ def render
73
+ tpl = <<-EOS
74
+ # header
75
+ csv << self::ATTRIBUTES
76
+
77
+ # data rows
78
+ self.all.each do |row|
79
+ csv << row.attributes.values
80
+ end
81
+ EOS
82
+ template = Tilt::CSVTemplate.new { tpl }
83
+ template.render(params[:object])
84
+ end
85
+ end
86
+
87
+ format :html do
88
+
89
+ def render
90
+ object = params[:object]
91
+ erb_dir = File.dirname(__FILE__) + "/erb"
92
+
93
+ template = Tilt.new(erb_dir + "/" + object.file_name + ".html.erb")
94
+ header = Tilt.new(erb_dir + '/header.html.erb')
95
+ template.render(self, :header => header.render,
96
+ :data => object.as_rickshaw)
97
+ end
98
+
99
+ end
100
+
101
+ end
102
+
103
+ end
@@ -0,0 +1,31 @@
1
+ module IraqUnrest
2
+
3
+ class GoogleDoc
4
+
5
+ SPREADSHEETS = {:iraq_government_casualty_figure => 4,
6
+ :iraqi_casualties_comparison => 9}
7
+
8
+ def spreadsheet(name)
9
+ raise ArgumentError, "Invalid spreadsheet name" unless SPREADSHEETS.include?(name)
10
+
11
+ begin
12
+ uri = URI.parse("https://docs.google.com/spreadsheet/pub?hl=en_US&key=%s&hl=en_US&gid=%s&output=csv" %
13
+ [IraqUnrest::Config.doc_id, SPREADSHEETS[name]])
14
+
15
+ curl = ::Curl::Easy.perform(uri.to_s) do |c|
16
+ c.timeout = IraqUnrest::Config.timeout
17
+ end
18
+ rescue Curl::Err::TimeoutError => e
19
+ raise $!, "Could not connect to Google Docs in a timely manner #{$!}", $!.backtrace
20
+ end
21
+
22
+ if curl.response_code != 200
23
+ raise Exception, "Did not receive a successfull response from Google Docs"
24
+ end
25
+
26
+ curl.body_str
27
+ end
28
+
29
+ end
30
+
31
+ end
@@ -0,0 +1,53 @@
1
+ module IraqUnrest
2
+
3
+ class IraqGovernmentCasualtyFigure < DataSet
4
+
5
+ ATTRIBUTES = [ :date, :civilian_killed, :police_killed, :army_killed,
6
+ :civilian_wounded, :police_wounded, :army_wounded,
7
+ :insurg_killed, :insurg_arrested ]
8
+
9
+ attr_accessor *ATTRIBUTES
10
+
11
+ def attributes
12
+ ATTRIBUTES.inject(ActiveSupport::HashWithIndifferentAccess.new) do |result, key|
13
+ result[key] = read_attribute_for_validation(key)
14
+ result
15
+ end
16
+ end
17
+
18
+ def self.raw_csv
19
+ GoogleDoc.new.spreadsheet(file_name.to_sym)
20
+ end
21
+
22
+ def self.parse(data)
23
+ result = []
24
+ parsed = data.split("\n")
25
+ title = parsed.slice(0).split(",").first.gsub(/\(|\(|\:|\s+/, "").chop.underscore
26
+ comments = parsed.slice!(1..4)
27
+
28
+ if title != file_name
29
+ raise Exception, "Could not find a valid title in data source"
30
+ end
31
+
32
+ parsed.each do |row|
33
+ fields = row.split(",", -1)
34
+
35
+ obj = new(:date => fields[0],
36
+ :civilian_killed => fields[1],
37
+ :police_killed => fields[2],
38
+ :army_killed => fields[3],
39
+ :civilian_wounded => fields[5],
40
+ :police_wounded => fields[6],
41
+ :army_wounded => fields[7],
42
+ :insurg_killed => fields[9],
43
+ :insurg_arrested => fields[10])
44
+
45
+ result << obj if obj.valid?
46
+ end
47
+
48
+ result
49
+ end
50
+
51
+ end
52
+
53
+ end
@@ -0,0 +1,74 @@
1
+ module IraqUnrest
2
+
3
+ class DataSet
4
+
5
+ def initialize(attributes={})
6
+ self.attributes=attributes
7
+ end
8
+
9
+ def attributes=(attrs)
10
+ attrs.each_pair do |k, v|
11
+ send("#{k}=", v)
12
+ end
13
+ end
14
+
15
+ class << self
16
+
17
+ def parse
18
+ end
19
+
20
+ def all
21
+ parse(self.raw_csv)
22
+ end
23
+
24
+ def raw_csv
25
+ doc = IraqUnrest::GoogleDoc.new.spreadsheet(self.file_name.to_sym)
26
+ end
27
+
28
+ def file_name
29
+ self.name.split("::").last.underscore
30
+ end
31
+
32
+ # Need to make this clear that this is picking up the
33
+ # result of ActiveModelSerializer
34
+ def to_json
35
+ ActiveModel::ArraySerializer.new(self.all).to_json
36
+ end
37
+
38
+ def as_json
39
+ ActiveModel::ArraySerializer.new(self.all).as_json
40
+ end
41
+
42
+ # FIXME - we could probably remove a layer of abstraction here
43
+ def to_rickshaw
44
+ IraqUnrest::Serializers.as_rickshaw(self.all)
45
+ end
46
+
47
+ def to_csv
48
+ IraqUnrest::Serializers.as_csv(self.all)
49
+ end
50
+
51
+ def to_html
52
+ IraqUnrest::Serializers.as_html(self.all)
53
+ end
54
+
55
+ def generate_csv!
56
+ file = File.new(self.file_name + ".csv", "w")
57
+ file.puts IraqUnrest::Config.disclaimer
58
+ csv_data = self.to_csv.to_s.split("\n")
59
+ csv_data.each { |row| file.puts row }
60
+
61
+ file.close
62
+ file
63
+ end
64
+
65
+ def generate_html!
66
+ file = File.new(self.file_name + ".html", "w")
67
+ file.puts self.to_html
68
+ file.close
69
+ file
70
+ end
71
+
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,46 @@
1
+ module IraqUnrest
2
+
3
+ class IraqiCasualtiesComparison < DataSet
4
+
5
+ ATTRIBUTES = [:date, :afp, :iraq_gov, :iraq_body_count]
6
+
7
+ attr_accessor *ATTRIBUTES
8
+
9
+ def attributes
10
+ ATTRIBUTES.inject(ActiveSupport::HashWithIndifferentAccess.new) do |result, key|
11
+ result[key] = read_attribute_for_validation(key)
12
+ result
13
+ end
14
+ end
15
+
16
+ def self.raw_csv
17
+ GoogleDoc.new.spreadsheet(file_name.to_sym)
18
+ end
19
+
20
+ def self.parse(data)
21
+ result = []
22
+ parsed = data.split("\n")
23
+
24
+ title = parsed.slice!(0).split(",").first.gsub(/\(|\(|\:|A |\s+/, "").underscore
25
+ comments = parsed.slice!(0..4)
26
+
27
+ if title != file_name
28
+ raise Exception, "Could not find a valid title in data source"
29
+ end
30
+
31
+ parsed.each do |row|
32
+ fields = row.split(",", -1)
33
+ obj = new(:date => fields[0],
34
+ :iraq_gov => fields[1],
35
+ :iraq_body_count => fields[2],
36
+ :afp => fields[3])
37
+
38
+ result << obj if obj.valid?
39
+ end
40
+
41
+ result
42
+ end
43
+
44
+ end
45
+
46
+ end
@@ -0,0 +1,46 @@
1
+ module IraqUnrest
2
+
3
+ module Serializers
4
+
5
+ # Gives to_json and as_json
6
+ # Used by both members and collections
7
+ class IraqiCasualtiesComparisonSerializer < ::ActiveModel::Serializer
8
+ attributes :date, :afp, :iraq_gov, :iraq_body_count
9
+
10
+ self.root = false
11
+
12
+ def date
13
+ Date.strptime(object.date, "%b-%Y").end_of_month.to_time.to_i
14
+ end
15
+ end
16
+
17
+ class IraqGovernmentCasualtyFigureSerializer < ::ActiveModel::Serializer
18
+ attributes :date, :civilian_killed, :police_killed, :army_killed,
19
+ :civilian_wounded, :police_wounded, :army_wounded,
20
+ :insurg_killed, :insurg_arrested
21
+
22
+ self.root = false
23
+
24
+ def date
25
+ Date.strptime(object.date, "%b-%Y").end_of_month.to_time.to_i
26
+ end
27
+ end
28
+
29
+ def self.as_rickshaw(data)
30
+ result = {}
31
+ attrs = data.first.attributes.except(:date).symbolize_keys.keys
32
+
33
+ data.each do |row|
34
+ attrs.each do |attr|
35
+ result[attr] ||= []
36
+ result[attr] << { :x => Date.strptime(row.date, "%b-%Y").end_of_month.to_time.to_i,
37
+ :y => row.send(attr).to_i ||= 0 }
38
+ end
39
+ end
40
+
41
+ result.each {|k,v| result[k].sort_by! { |hsh| hsh[:x]} }
42
+ result
43
+ end
44
+
45
+ end
46
+ end
@@ -0,0 +1,3 @@
1
+ module IraqUnrest
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,50 @@
1
+ require 'tilt'
2
+ require 'json'
3
+ require 'curb'
4
+ require 'csv'
5
+
6
+ require 'active_model_serializers'
7
+ require 'active_support/concern'
8
+ require 'active_support/core_ext/hash'
9
+ require 'active_support/core_ext/object' # gives us to_json
10
+ require 'active_support/inflector'
11
+
12
+ require "iraq_unrest/version"
13
+ require "iraq_unrest/config"
14
+ require "iraq_unrest/concerns/validatable"
15
+ require "iraq_unrest/concerns/serializable"
16
+ require "iraq_unrest/serializers"
17
+ require "iraq_unrest/format"
18
+ require "iraq_unrest/google_doc"
19
+ require "iraq_unrest/data_set"
20
+ require "iraq_unrest/iraq_government_casualty_figure"
21
+ require "iraq_unrest/iraqi_casualties_comparison"
22
+
23
+ IraqUnrest::Config.configure do |config|
24
+ config.doc_id = "0Aia6y6NymliRdEZESktBSWVqNWM1dkZOSGNIVmtFZEE"
25
+ config.timeout = 30
26
+ config.disclaimer = <<-EOS
27
+ ##################################################
28
+ # NOTE: This file was generated by a free software
29
+ # program [ https://github.com/bds/iraq_unrest ]
30
+ # which retrieved publicly shared data
31
+ # provided by Agence France-Presse.
32
+ #
33
+ # Figures are provided by Iraqi officials
34
+ # on a monthly basis, and have been compiled by
35
+ # Agence France-Presse at:
36
+ #
37
+ # http://u.afp.com/JSL
38
+ #
39
+ # They are based on data released by the Iraqi
40
+ # ministries of health, interior and defence.
41
+ # If you have any questions, please contact:
42
+ #
43
+ # AFP's Baghdad Bureau
44
+ # https://twitter.com/prashantrao
45
+ ##################################################
46
+ EOS
47
+ end
48
+
49
+ module IraqUnrest
50
+ end
@@ -0,0 +1,161 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://docs.google.com/spreadsheet/pub?gid=4&hl=en_US&key=0Aia6y6NymliRdEZESktBSWVqNWM1dkZOSGNIVmtFZEE&output=csv
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers: {}
10
+ response:
11
+ status:
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ Content-Type:
16
+ - text/csv
17
+ X-Robots-Tag:
18
+ - noindex, nofollow, nosnippet
19
+ Content-Disposition:
20
+ - attachment; filename="Iraq Unrest.csv"
21
+ Set-Cookie:
22
+ - NID=67=uwoB2ugbyq-jGSmZq1XiowMDE5_FXC2Pu4_HQPzWowKD3_xYmyXAOshxb8BiGerBt0oWLDZw1S0WTvuQpCiDYu-0qvBvjorrPCNfbGUOqK-vANG2-qAcQbo2hMq8S7Kd;Domain=.google.com;Path=/;Expires=Wed,
23
+ 14-May-2014 16:29:07 GMT;HttpOnly
24
+ P3p:
25
+ - CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657
26
+ for more info."
27
+ Date:
28
+ - Tue, 12 Nov 2013 16:29:07 GMT
29
+ Expires:
30
+ - Tue, 12 Nov 2013 16:29:07 GMT
31
+ Cache-Control:
32
+ - private, max-age=0
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ Server:
38
+ - GSE
39
+ Alternate-Protocol:
40
+ - 443:quic
41
+ Transfer-Encoding:
42
+ - chunked
43
+ body:
44
+ encoding: ASCII-8BIT
45
+ string: |-
46
+ Iraq Government Casualty Figures,,,,,,,,,,
47
+ ,,,,,,,,,,
48
+ "Note: These figures are provided by Iraqi officials on a monthly basis, and have been compiled by Agence France-Presse. They are based on data released by the Iraqi ministries of health, interior and defence. If you have any questions, please leave a comment or contact AFP's Baghdad Bureau.",,,,,,,,,,
49
+ ,,,,,,,,,,
50
+ ,Killed,,,,Wounded,,,,Insurgents,
51
+ ,Civilians,Police,Army,Total,Civilians,Police,Army,Total,Killed,Arrested
52
+ Dec-2013,,,,0,,,,0,,
53
+ Nov-2013,,,,0,,,,0,,
54
+ Oct-2013,855,65,44,964,1445,88,67,1600,33,167
55
+ Sep-2013,768,62,55,885,969,95,76,1140,86,523
56
+ Aug-2013,267,56,33,356,455,78,54,587,87,496
57
+ Jul-2013,778,88,55,921,1356,122,89,1567,68,
58
+ Jun-2013,156,55,29,240,244,90,45,379,23,87
59
+ May-2013,446,96,88,630,752,193,152,1097,51,222
60
+ Apr-2013,121,39,45,205,167,67,66,300,40,87
61
+ Mar-2013,95,45,23,163,135,77,44,256,30,67
62
+ Feb-2013,88,26,22,136,123,65,40,228,,
63
+ Jan-2013,120,35,22,177,164,54,40,258,33,72
64
+ 2013,3694,567,416,4677,5810,929,673,7412,451,1721
65
+ Dec-2012,125,55,28,208,188,88,58,334,19,70
66
+ Nov-2012,101,35,30,166,129,68,55,252,12,51
67
+ Oct-2012,88,31,25,144,110,92,62,264,22,77
68
+ Sep-2012,182,88,95,365,453,110,120,683,,
69
+ Aug-2012,90,35,39,164,120,80,60,260,26,90
70
+ Jul-2012,241,40,44,325,480,122,95,697,,
71
+ Jun-2012,85,26,20,131,111,99,59,269,11,100
72
+ May-2012,90,20,22,132,115,80,53,248,20,105
73
+ Apr-2012,88,18,20,126,132,89,50,271,25,185
74
+ Mar-2012,78,22,12,112,220,85,52,357,30,152
75
+ Feb-2012,91,39,20,150,180,95,77,352,33,104
76
+ Jan-2012,99,31,21,151,151,85,85,321,41,214
77
+ 2012,1358,440,376,2174,2389,1093,826,4308,239,1148
78
+ Dec-2011,90,36,29,155,99,92,88,279,48,150
79
+ Nov-2011,112,42,33,187,120,110,95,325,55,120
80
+ Oct-2011,161,55,42,258,195,142,101,438,85,
81
+ Sep-2011,110,42,33,185,132,150,82,364,45,215
82
+ Aug-2011,155,45,39,239,183,120,96,399,56,
83
+ Jul-2011,159,56,44,259,199,135,119,453,22,115
84
+ Jun-2011,155,77,39,271,192,150,112,454,25,102
85
+ May-2011,102,45,30,177,115,66,85,266,32,155
86
+ Apr-2011,120,56,35,211,190,97,90,377,49,199
87
+ Mar-2011,136,55,56,247,215,80,75,370,72,209
88
+ Feb-2011,119,45,33,197,200,65,60,325,36,250
89
+ Jan-2011,159,55,45,259,178,95,90,363,65,295
90
+ 2011,1578,609,458,2645,2018,1302,1093,4413,590,1810
91
+ Dec-2010,89,41,21,151,114,77,80,271,34,
92
+ Nov-2010,105,43,23,171,155,78,60,293,40,195
93
+ Oct-2010,120,45,20,185,202,86,75,363,50,250
94
+ Sep-2010,185,55,33,273,284,90,111,485,78,487
95
+ Aug-2010,295,77,54,426,508,180,150,838,98,850
96
+ Jul-2010,396,89,50,535,680,198,165,1043,100,955
97
+ Jun-2010,204,50,30,284,400,109,111,620,44,600
98
+ May-2010,275,45,17,337,520,141,57,718,55,660
99
+ Apr-2010,274,39,15,328,731,133,53,917,48,590
100
+ Mar-2010,216,50,101,367,419,120,160,699,57,666
101
+ Feb-2010,211,96,45,352,414,155,115,684,52,661
102
+ Jan-2010,135,41,20,196,620,120,42,782,54,681
103
+ 2010,2505,671,429,3605,5047,1487,1179,7713,710,6595
104
+ Dec-2009,306,48,13,367,1137,119,32,1288,48,635
105
+ Nov-2009,88,22,12,122,332,56,44,432,38,510
106
+ Oct-2009,343,42,25,410,1275,135,90,1500,38,585
107
+ Sep-2009,125,38,40,203,533,102,76,711,43,395
108
+ Aug-2009,393,48,15,456,1592,129,20,1741,52,540
109
+ Jul-2009,223,40,12,275,975,93,35,1103,41,400
110
+ Jun-2009,372,45,20,437,960,101,34,1095,47,635
111
+ May-2009,124,25,6,155,285,55,4,344,40,904
112
+ Apr-2009,290,41,24,355,640,97,10,747,53,831
113
+ Mar-2009,185,53,14,252,445,157,45,647,45,650
114
+ Feb-2009,211,30,17,258,456,61,31,548,61,508
115
+ Jan-2009,140,24,27,191,300,35,71,406,29,482
116
+ 2009,2800,456,225,3481,8930,1140,492,10562,535,7075
117
+ Dec-2008,240,58,18,316,609,206,47,862,44,667
118
+ Nov-2008,297,29,14,340,600,100,28,728,60,875
119
+ Oct-2008,278,21,18,317,461,61,40,562,44,855
120
+ Sep-2008,359,55,26,440,704,144,41,889,66,920
121
+ Aug-2008,383,30,18,431,680,115,64,859,116,1385
122
+ Jul-2008,387,45,33,465,601,83,63,747,107,
123
+ Jun-2008,448,40,21,509,685,111,47,843,124,949
124
+ May-2008,504,32,27,563,857,89,57,1003,170,2421
125
+ Apr-2008,966,69,38,1073,1745,159,104,2008,355,1270
126
+ Mar-2008,925,103,54,1082,925,103,54,1082,645,2592
127
+ Feb-2008,636,65,20,721,705,121,21,847,237,1341
128
+ Jan-2008,463,56,22,541,656,119,35,810,229,1225
129
+ 2008,5886,603,309,6798,9228,1411,601,11240,2197,14500
130
+ Dec-2007,480,64,24,568,730,156,51,937,251,1146
131
+ Nov-2007,537,45,24,606,521,119,64,704,240,2090
132
+ Oct-2007,758,116,13,887,144,180,39,363,334,1428
133
+ Sep-2007,840,61,16,917,849,120,50,1019,361,1520
134
+ Aug-2007,1771,20,65,1856,1558,100,25,1683,472,2027
135
+ Jul-2007,1652,144,79,1875,1691,169,118,1978,425,2191
136
+ Jun-2007,1241,191,31,1463,1561,350,70,1981,417,2265
137
+ May-2007,1951,127,46,2124,2011,215,63,2289,297,2355
138
+ Apr-2007,1498,128,63,1689,2330,202,107,2639,219,2939
139
+ Mar-2007,1869,165,44,2078,2719,277,51,3047,481,5664
140
+ Feb-2007,1646,131,29,1806,2701,147,47,2895,586,1921
141
+ Jan-2007,1992,55,40,2087,1941,135,85,2161,586,1921
142
+ 2007,16235,1247,474,17956,18756,2170,770,21696,4669,27467
143
+ Dec-2006,,,,0,,,,0,423,
144
+ Nov-2006,1847,103,25,1975,1335,151,,1486,,
145
+ Oct-2006,1289,119,19,1427,1504,184,,1688,,
146
+ Sep-2006,,,,0,,,,0,,
147
+ Aug-2006,,,,0,,,,0,,
148
+ Jul-2006,1850,,,1850,,,,0,,
149
+ Jun-2006,887,79,43,1009,1588,126,57,1771,93,
150
+ May-2006,932,95,28,1055,1271,97,57,1425,324,
151
+ Apr-2006,,,,0,,,,0,,
152
+ Mar-2006,,,,0,,,,0,,
153
+ Feb-2006,,,,0,,,,0,,
154
+ Jan-2006,,,,0,,,,0,,
155
+ 2006,6805,396,115,7316,5698,558,114,6370,840,0
156
+ Overall,37167,4422,2386,43975,52066,9161,5075,66302,9780,58595
157
+ ,,,,,,,,,,
158
+ NB: Months with only police figures are combined police/army tolls,,,,,,,,,,
159
+ http_version:
160
+ recorded_at: Tue, 12 Nov 2013 16:29:07 GMT
161
+ recorded_with: VCR 2.6.0