-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathicij-paradise-papers.neo4j-browser-guide
298 lines (260 loc) · 17.1 KB
/
icij-paradise-papers.neo4j-browser-guide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
<style type="text/css" media="screen">
.deck h3,.deck h4{display:block !important;margin-bottom:8px;margin-top:5px}.listingblock{margin:8px}.pull-bottom{position:relative;bottom:1em}.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,0.5);cursor:default}.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c}.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,0.8);color:#111}.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900}.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400}.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000}#stream .panama-deck{margin-bottom:40px;max-width:1500px;font-family:"Source Sans Pro",Arial,sans-serif;}#stream .panama-deck .carousel-control{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}#stream .panama-deck p{font-weight:400;font-size:1.2em;font-weight:1.5em;color:#000}#stream .panama-deck h1,#stream .panama-deck h2,#stream .panama-deck h3,#stream .panama-deck h4,#stream .panama-deck h5{font-weight:600;color:#a33a00}#stream .panama-deck .panama-quote{background-color:#f3f3ea;padding:12px;}#stream .panama-deck .panama-quote > p{color:#000}#stream .frame footer.panama{font-family:"Source Sans Pro",Arial,sans-serif;position:absolute;bottom:0;border-top:1px solid #c8cbd2;height:39px;text-align:left;background-color:#888;background:url("https://panamapapers.icij.org/assets/articles/home_140402.jpg");}#stream .frame footer.panama ul.list-inline{margin:0;margin-left:6px;display:inline;padding:0;}#stream .frame footer.panama ul.list-inline.list-right{position:absolute;right:0;border:none;margin:0;}#stream .frame footer.panama ul.list-inline.list-right li{border:none}#stream .frame footer.panama ul.list-inline a{line-height:38px;font-size:18px;border:none;margin:0;background-color:transparent;color:#fff;font-family:"Source Sans Pro",Arial,sans-serif;}#stream .frame footer.panama ul.list-inline a:hover{color:#a33a00}#stream .frame footer.panama ul.list-inline a:focus{text-decoration:none}#stream .frame footer.panama ul.list-inline a.fa[target]:before{font:normal normal normal 14px/1 FontAwesome;font-size:32px;vertical-align:middle}#stream .frame footer.panama ul.list-inline a img.icij{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}#stream .frame footer.panama ul.list-inline a img.icij:hover{border:1px solid #fff}#stream .frame footer.panama ul.list-inline li{border-right:1px solid #c8cbd2;text-align:center;background-color:transparent}
</style>
<article class="guide" ng-controller="AdLibDataController">
<carousel class="deck container-fluid panama-deck">
<slide class="row-fluid">
<div class="row">
<div class="col-sm-12">
<img class="img-responsive img-thumbnail" src="https://guides.neo4j.com/sandbox/icij-paradise-papers/img/paradise-header.jpg">
</div>
</div>
<div class="row">
<div class="col-sm-12">
<h3 style="text-align:center; margin-bottom: 1em;">The Data Connecting Politicians, Criminals and a Rogue Industry that hides their cash</h3>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-12">
<h4>Paradise Papers: Secrets of the Global Elite</h4>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/o4XeBz1hYJQ?rel=0" frameborder="0" allowfullscreen width="560" height="315"></iframe>
</div>
</div>
<div class="col-md-6 col-sm-12">
<h4>About this data</h4>
<div class="panama-quote">
<p>The <a target="_blank" href="https://offshoreleaks.icij.org/">ICIJ Offshore Leaks database</a>, which you are working with in Neo4j, contains information on almost 350,000 offshore entities that are part of the Paradise and Panama Papers and the Offshore Leaks investigations. The data covers a long time of activities – and links to people and companies in more than 200 countries and territories.</p>
<p>The real value of the database is that it <strong>strips away the secrecy</strong> that cloaks companies and trusts incorporated in tax havens and exposes the people behind them. This includes, when available, the names of the real owners of those opaque structures. In all, it reveals more than 430,000 names of people and companies behind secret offshore structures. They come from leaked records and not a standardized corporate registry, so there may be duplicates. We suggest you confirm the identities of any individuals or entities located in the database based on addresses or other identifiable information.</p>
<p><strong>There are legitimate uses for offshore companies and trusts. We do not intend to suggest or imply that any persons, companies or other entities included in the database have broken the law or otherwise acted improperly. If you find an error in the database please get in touch with ICIJ.</strong></p>
</div>
</div>
</div>
</slide>
<slide class="row-fluid">
<div class="row">
<div class="col-sm-12">
<h3>The Shape of the Data</h3>
</div>
</div>
<div class="row">
<div class="col-md-6">
<img class="img-responsive img-thumbnail" src="https://guides.neo4j.com/sandbox/icij-paradise-papers/img/datamodel.png" alt="data model">
</div>
<div class="col-md-6 col-sm-6">
<div class="paragraph">
<p>The Offshore Leaks Database was imported into Neo4j to be used by journalists and researchers to take advantage of the connections in the data. To the left is the basic "property graph" data model. Each data record is called a "node" representing an entity, intermediary, officer or address. They're connected to form a "graph" that reveals a complex web of relationships. To the left you can see a simplified diagram how the nodes connect to each other.</p>
</div>
<div class="paragraph">
<p>These are the types of nodes that you will encounter in the data:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>Entity</code> - The offshore legal entity. This could be a company, trust, foundation, or other legal entity created in a low-tax jurisdiction.</p>
</li>
<li>
<p><code>Officer</code> - A person or company who plays a role in an offshore entity, such as beneficiary, director, or shareholder. The relationships shown in the diagram are just a sample of all the existing ones.</p>
</li>
<li>
<p><code>Intermediary</code> - A go-between for someone seeking an offshore corporation and an offshore service provider — usually a law-firm or a middleman that asks an offshore service provider to create an offshore firm.</p>
</li>
<li>
<p><code>Address</code> - The registered address as it appears in the original databases obtained by ICIJ.</p>
</li>
<li>
<p><code>Other</code> - Other entities found in the data.</p>
</li>
</ul>
</div>
</div>
</div>
</slide>
<slide class="row-fluid">
<div class="col-sm-12">
<h3>How Graphs Helped our Investigation</h3>
<div class="row-fluid">
<div class="col-sm-12">
<div class="paragraph">
<p>The Offshore Leaks data exposes a set of connections between people and offshore entities. Graph databases are the best way to explore the relationships between these people and entities — it’s much more intuitive to use for this purpose than a SQL database or other types of NoSQL databases.</p>
</div>
</div>
</div>
<div class="row-fluid">
<div class="col-sm-5">
<div class="paragraph">
<p>For example, let's say we want to discover the shortest paths between two entity officers through a set of <code>Entity</code> or <code>Address</code> nodes. This is quite easy with Cypher, Neo4j's graph query language.</p>
</div>
<pre mode="cypher" class="highlight pre-scrollable code runnable standalone-example ng-binding"><code class="cypher language-cypher">MATCH (a:Officer),(b:Officer)
WHERE a.name CONTAINS 'Ross, Jr'
AND b.name CONTAINS 'Grant'
MATCH p=allShortestPaths((a)-[:OFFICER_OF|INTERMEDIARY_OF|REGISTERED_ADDRESS*..10]-(b))
RETURN p
LIMIT 50</code></pre>
<div class="paragraph">
<p>To execute this query, please <strong>click</strong> on the statement above to put the query in the query editor above. <br/>Hit the triangular <span class="icon"><i class="fa fa-play-circle"></i></span> button or press <span class="keyseq"><kbd>Ctrl</kbd>+<kbd>Enter</kbd></span> to <strong>run it</strong> and see the resulting visualization.</p>
</div>
</div>
<div class="col-sm-7">
<p>The resulting graph allows us to explore how these people are connected:</p>
<img class="img-responsive img-thumbnail" src="https://guides.neo4j.com/sandbox/icij-paradise-papers/img/shortestPaths.png">
</div>
</div>
</div>
</div>
</slide>
<slide class="row-fluid">
<div class="row">
<div class="col-sm-12">
<h3>How to ask questions using a query language</h3>
<h4>Graph Patterns</h4>
<div class="paragraph">
<p>Neo4j’s query language, Cypher, is centered around <strong>graph patterns</strong> which represents entities with parentheses, for example,
<code>(e:Entity)</code> and connections with arrows, for example <code>-[:CONNECTED_TO]-></code>.
<code>:Entity</code> and <code>:CONNECTED_TO</code> are the types of the entity and the connection, respectively.
</div>
<div class="paragraph">
<p>Here is an example pattern: <code>(:Intermediary)-[:CONNECTED_TO]->(:Entity)</code>.
These patterns may be found with the <code>MATCH</code> clause.</p>
</div>
<h4>Other Clauses</h4>
<div class="paragraph">
<p>The following clauses may follow a <code>MATCH</code> clause.
They work with the properties stored at the nodes and relationships found in the graph matching that pattern.</p>
</div>
<table class="tableblock frame-all grid-all spread">
<colgroup>
<col style="width: 15%;">
<col style="width: 85%;">
</colgroup>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">filter</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>WHERE intermediary.name CONTAINS 'MOSSACK'</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">aggregate</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>WITH e.jurisdiction AS country, COUNT(*) AS frequency</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">return</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>RETURN country, frequency</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">order</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>ORDER BY frequency DESC</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">limit</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>LIMIT 20;</code></p></td>
</tr>
</tbody>
</table>
<div class="listingblock">
<div class="title">Jurisdiction distribution of intermediaries in the ICIJ offshore leaks DB</div>
<div class="content">
<pre mode="cypher" class="highlight pre-scrollable code runnable standalone-example ng-binding"><code class="cypher language-cypher">MATCH (intermediary:Intermediary)-[:CONNECTED_TO]->(e:Entity)
WHERE intermediary.name CONTAINS 'Appleby'
RETURN e.jurisdiction AS country, COUNT(*) AS frequency
ORDER BY frequency DESC LIMIT 20;</code></pre>
</div>
</div>
<div class="paragraph">
<p>Click on the block to put the query in the topmost window on the query editor. Hit the triangular <span class="icon"><i class="fa fa-play-circle"></i></span> button or press <span class="keyseq"><kbd>Ctrl</kbd>+<kbd>Enter</kbd></span> to run it and see the resulting visualization.</p>
</div>
</div>
</div>
</slide>
<slide class="row-fluid">
<div class="col-sm-12">
<h3>Explore the Panama and Paradise Papers Yourself</h3>
<br/>
<div class="row">
<div class="col-lg-4">
<div>
<h3 style="padding:10px;">Further Resources</h3>
<div class="ulist">
<ul>
<li>
<p><a target="_blank" href="https://icij.org/paradisepapers/">The Paradise Papers ICIJ Site</a></p>
</li>
<li>
<p><a target="_blank" href="https://panamapapers.icij.org/">The Panama Papers ICIJ Site</a></p>
</li>
<li>
<p><a target="_blank" href="https://offshoreleaks.icij.org/">The Offshore Leaks Database</a></p>
</li>
<li>
<p><a target="_blank" href="https://neo4j.com/docs/cypher-refcard/current/">Cypher Reference Card</a></p>
</li>
<li>
<p><a target="_blank" href="https://neo4j.com/developer">Neo4j Developer Documentation</a></p>
</li>
</ul>
</div>
</div>
</div>
<br/>
</div>
<div class="col-lg-8">
<div class="teaser teaser-3">
<h3>Investigative Queries</h3>
<p class="lead">Explore the data yourself.</p>
<div class="icon-holder">
<div class="icon sl sl-show yellow icon"></div>
<ul class="topic-bullets">
<li>Cypher query language intro</li>
<li>Finding companies and individuals</li>
<li>Path finding</li>
</ul>
<div class="clearfix"></div>
</div>
<a play-topic="https://guides.neo4j.com/sandbox/icij-paradise-papers/examples.html"><button click-to-code="':play https://guides.neo4j.com/sandbox/icij-paradise-papers/examples.html'" class="btn btn-cta" style="background: #B3490E;padding:1em;color:#fff;">Run Queries</button></a>
</div>
<div class="teaser teaser-3">
<h3>Shape of the Data</h3>
<p class="lead">Understand the data model.</p>
<div class="icon-holder">
<div class="icon sl sl-network green icon"></div>
<ul class="topic-bullets">
<li>What are the nodes?</li>
<li>What are the relationships?</li>
<li>What are the properties?</li>
</ul>
<div class="clearfix"></div>
</div>
<a play-topic="https://guides.neo4j.com/sandbox/icij-paradise-papers/datashape.html"><button click-to-code="':play https://guides.neo4j.com/sandbox/icij-paradise-papers/datashape.html'" class="btn btn-cta" style="background: #B3490E;padding:1em;color:#fff;">Start Learning</button></a>
</div>
<div class="teaser teaser-3">
<h3>Send ICIJ a tip</h3>
<p class="lead">Help us investigate.</p>
<div class="icon-holder">
<div class="icon sl sl-pencil red icon"></div>
<ul class="topic-bullets">
<li>Interesting connections</li>
<li>Entities that matter to you</li>
</ul>
<div class="clearfix"></div>
</div>
<a target="_blank" target="_blank" href="https://offshoreleaks.icij.org/tips/new" class="btn" id="b"><button class="btn btn-cta" style="background: #1da1f2;padding:1em; color:#fff;">Send tip</button></a>
</div>
</div>
</div>
</div>
</slide>
</carousel>
<footer class="panama">
<ul class="list-inline">
<li><a click-to-code="':play https://guides.neo4j.com/sandbox/icij-paradise-papers/index.html'" class="sl sl-house"><pre mode="cypher" class="highlight pre-scrollable code runnable standalone-example ng-binding"><code class="cypher language-cypher"></code></pre>
Introduction</a></li>
<li><a click-to-code="':play https://guides.neo4j.com/sandbox/icij-paradise-papers/examples.html'" class="sl sl-show">
Investigative queries</a></li>
<li><a click-to-code="':play https://guides.neo4j.com/sandbox/icij-paradise-papers/datashape.html'" class="sl sl-network">
Shape of the data</a></li>
</ul>
<ul class="list-inline list-right">
<li><a target="_blank" href="https://icij.org/" tooltip="Read about it."> <img src="https://panamapapers.icij.org/assets/[email protected]" width="auto" height="28px" class="icij"/></a></li>
<li><a target="_blank" target="_blank" href="https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Foffshoreleaks.icij.org%2F&ref_src=twsrc%5Etfw&text=Look%20what%20I%20have%20found%20in%20the%20%23Panama%20and%20Paradise%20Papers%20%40Neo4j%20graph%20database%20release%3A&tw_p=tweetbutton&url=https%3A%2F%2Foffshoreleaks.icij.org%2F" tooltip="Tweet about it." class="fa fa-twitter-square"></a></li>
</ul>
</footer>
</article>