README.md 2.2 KB
Newer Older
Christopher S Barnett's avatar
Christopher S Barnett committed
1
# World Peace Foundation Corrupt Arms Deals Map
Christopher S Barnett's avatar
Christopher S Barnett committed
2
3
4
5
6

This project is a visualization of cases of corruption in the
international arms trade and broader military sector. It forms part
of WPF’s ongoing program on the Global Arms Trade and Corruption.

Christopher S Barnett's avatar
Christopher S Barnett committed
7
___
Christopher S Barnett's avatar
Christopher S Barnett committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## quick links to countries and cases

You can link directly to a country or a case with a URI fragment.



The query string for a country is the 3 letter ISO code.
```shell
/index.html#country=SWE
```


The query string for a case is the URL encoded case name.
```shell
/index.html#deal=The%20South%20African%20Arms%20Deal
```

## Install and build javascript
Christopher S Barnett's avatar
Christopher S Barnett committed
26
27
28
29

Build javascript by running gulpfile.js. Browserify is used to create
a javascript bundle.

Christopher S Barnett's avatar
Christopher S Barnett committed
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
requires Node, npm and gulp cli. See the gulp.js quickstart for information. 
https://gulpjs.com/docs/en/getting-started/quick-start

### To install:
Navigate to the project directory.

To install javascript dependencies:
```shell
npm install 
```

To build the javascript file:
```shell
gulp
```

Christopher S Barnett's avatar
Christopher S Barnett committed
46
___
Christopher S Barnett's avatar
Christopher S Barnett committed
47

Christopher S Barnett's avatar
Christopher S Barnett committed
48
49
The arms deal data for the map is found in `docroot/data/wpf_deals.json`

Christopher S Barnett's avatar
Christopher S Barnett committed
50
To update the json data file, run the python ingest script.
Christopher S Barnett's avatar
Christopher S Barnett committed
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
```python

# usage: (from base directory)

from ingest.wpf_ingest.ingest_from_excel import *
ingest_deals()

```

This script processes data from an Excel file. Data 'rows' are at the
'case' level.

The Excel file should have the following headings:

|heading| description | format|
|-------|-------------|-------|
|deal_name|name of the arms deal| string |
|years| years of the WPF case| string |
|sort_year| year used to sort cases | 4-digit year|
|series_name| name of the WPF case | string|
|blog_link| link to blog post| url|
|transactions|list of arms transactions| semi-colon delimited transactions (ex: GBA->SAU). an internal transaction looks like this: CAN->CAN|
|equipment|list of equipment in transactions| semi-colon delimited strings|
|value_details|value of deals| string|
|corruption_details|amount of corruption|string|

Christopher S Barnett's avatar
Christopher S Barnett committed
77
___
Christopher S Barnett's avatar
Christopher S Barnett committed
78
79
80
81
82
83
84
85
86
87
88

Libraries:
- Leaflet.js
- leaflet.migrationLayer (heavily modified) (https://github.com/lit-forest/leaflet.migrationLayer)
- Leaflet.pattern (https://github.com/teastman/Leaflet.pattern)
- leaflet-legend
- leaflet-easybutton
- underscore.js
- jQuery
- bootstrap