Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add world trade analysis notebook #115

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ repos:
rev: 1.7.0
hooks:
- id: nbqa-pyupgrade
additional_dependencies: [jupytext]
args: [--py311-plus, --nbqa-shell]
additional_dependencies: [jupytext, pyupgrade]
args: [--py39-plus, --nbqa-shell]
- id: nbqa-black
additional_dependencies: [jupytext]
additional_dependencies: [jupytext, black]
args: [--nbqa-shell]
11 changes: 11 additions & 0 deletions content/exploratory_notebooks/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Exploratory Notebooks

A collection of notebooks that use network science techniques and algorithms to explore and analyse real world datasets.

```{toctree}
---
maxdepth: 1
---
facebook/facebook_notebook
world_trade/world_trade_network
```
801 changes: 801 additions & 0 deletions content/exploratory_notebooks/world_trade/data/coffee.csv

Large diffs are not rendered by default.

236 changes: 236 additions & 0 deletions content/exploratory_notebooks/world_trade/data/diamonds.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
,level_0,index,exporter,importer,value,quantity
0,0,701791,BEL,POL,942.567,9.35
1,1,1218769,CAN,BEL,625.517,1.411
2,2,1222763,CAN,BWA,207346.587,0.711
3,3,1336186,CAN,IND,180283.859,0.645
4,4,8665672,ZAF,ARE,207921.077,0.356
5,5,588925,BEL,FRA,16088.34,0.337
6,6,3911200,HKG,IND,122962.274,0.336
7,7,8548916,ZAF,BEL,112091.861,0.269
8,8,2983242,FRA,ITA,200.187,0.242
9,9,628826,BEL,ITA,32000.597,0.231
10,10,10600437,GBR,IND,102156.88,0.21
11,11,9764794,ARE,IND,24200.425,0.16
12,12,604073,BEL,GRC,815.452,0.154
13,13,8688598,ZWE,ARE,23369.566,0.138
14,14,727043,BEL,IND,24777.573,0.137
15,15,11008913,USA,IND,22849.113,0.094
16,16,698574,BEL,PHL,8.105,0.059
17,17,10790833,USA,DOM,1699.028,0.056
18,18,3388156,DEU,ITA,44.25,0.049
19,19,2575542,DOM,USA,78.422,0.041
20,20,8684208,ZWE,BEL,31815.535,0.038
21,21,8831236,ESP,ITA,7.954,0.036
22,22,10830925,USA,GTM,30.524,0.033
23,23,853403,BRA,BEL,24237.229,0.029
24,24,777679,BEL,GBR,5530.99,0.028
25,25,8646492,ZAF,IND,9188.656,0.026
26,26,3771575,GIN,ARE,4935.447,0.023
27,27,4444273,ITA,BEL,1376.143,0.023
28,28,6343379,NLD,ITA,12.071,0.021
29,29,8034915,IND,TUN,661.915,0.019
30,30,4522538,ITA,FRA,126.298,0.019
31,31,1378268,CAF,ARE,11237.375,0.018
32,32,8647806,ZAF,SGP,2423.814,0.018
33,33,8182657,SGP,IND,2337.692,0.018
34,34,4609018,ITA,MLT,591.131,0.016
35,35,10984969,USA,QAT,169.198,0.016
36,36,1865722,CHN,SAU,0.608,0.016
37,37,4531682,ITA,DEU,111.59,0.015
38,38,4537795,ITA,GRC,185.27,0.014
39,39,3351277,DEU,GRC,41.297,0.014
40,40,621974,BEL,IRL,2694.129,0.013
41,41,763674,BEL,TUN,201.596,0.012
42,42,4720533,ITA,SWE,133.385,0.012
43,43,4400803,ISR,ESP,110.114,0.012
44,44,681644,BEL,NLD,4.383,0.012
45,45,7399673,ROU,ITA,2.274,0.012
46,46,1048656,BGR,ITA,2.233,0.012
47,47,4635691,ITA,NLD,66.323,0.011
48,48,2259901,CZE,ITA,1.186,0.009
49,49,9681884,ARE,ISR,1335.376,0.006
50,50,4665836,ITA,PRT,855.534,0.006
51,51,101235,AUS,BEL,259.652,0.006
52,52,2861095,FRA,BEL,58.342,0.006
53,53,7984964,IND,SAU,239.442,0.004
54,54,10477012,GBR,IRL,15.667,0.004
55,55,3641157,GRC,BEL,9.767,0.004
56,56,3772570,GUY,BEL,530.346,0.003
57,57,3775869,GUY,ARE,445.385,0.003
58,58,598583,BEL,DEU,57.563,0.003
59,59,10774312,USA,CRI,8.817,0.003
60,60,4267016,IRL,FRA,4.667,0.003
61,61,4661507,ITA,POL,2.326,0.003
62,62,9618892,ARE,BEL,1980.126,0.002
63,63,744656,BEL,ESP,1662.937,0.002
64,64,4458789,ITA,BGR,1164.618,0.002
65,65,6304688,NLD,DEU,749.555,0.002
66,66,3677523,GRC,ITA,272.03,0.002
67,67,10660417,GBR,USA,142.465,0.002
68,68,11032020,USA,ESP,56.756,0.002
69,69,4594020,ITA,LTU,50.231,0.002
70,70,7873012,IND,IRL,49.889,0.002
71,71,2542757,DNK,GBR,46.769,0.002
72,72,2530157,DNK,THA,36.893,0.002
73,73,4434130,ITA,AUT,14.628,0.002
74,74,663450,BEL,MLT,11.411,0.002
75,75,4488862,ITA,HRV,8.164,0.002
76,76,7942622,IND,NPL,6.344,0.002
77,77,6797620,PAK,ARE,2.731,0.002
78,78,3088389,FRA,PRT,2.051,0.002
79,79,9754596,ARE,SAU,0.834,0.002
80,80,504108,ARM,RUS,1516.435,0.001
81,81,1160246,BLR,RUS,693.899,0.001
82,82,8032116,IND,ARE,542.662,0.001
83,83,8116298,SGP,HKG,402.424,0.001
84,84,3853303,HKG,IDN,119.592,0.001
85,85,4672797,ITA,ROU,28.386,0.001
86,86,3769909,GIN,BEL,25.118,0.001
87,87,7964317,IND,PER,21.324,0.001
88,88,3161721,FRA,TUN,14.883,0.001
89,89,8587866,ZAF,IRL,8.802,0.001
90,90,4561372,ITA,IRL,4.848,0.001
91,91,986913,BRA,GBR,3.925,0.001
92,92,9073673,SWE,FRA,3.227,0.001
93,93,3315952,DEU,DNK,0.5,0.001
94,94,2952892,FRA,GRC,0.484,0.001
95,95,9564131,THA,ESP,0.386,0.001
96,96,3011524,FRA,LTU,0.163,0.001
97,97,7893567,IND,KOR,0.02,0.001
98,98,11019683,USA,VNM,1989.778,
99,99,4715266,ITA,ESP,924.369,
100,100,1892370,CHN,VNM,657.75,
101,101,749753,BEL,SWE,336.965,
102,102,1353860,CAN,THA,305.027,
103,103,980350,BRA,ARE,287.517,
104,104,9773351,ARE,ZAF,212.005,
105,105,8677517,ZAF,USA,206.537,
106,106,3771778,GIN,USA,192.966,
107,107,6223653,NLD,BEL,141.621,
108,108,4415224,ISR,UZB,117.219,
109,109,8056914,IND,USA,110.912,
110,110,7996111,IND,SGP,98.646,
111,111,10862906,USA,ISR,97.713,
112,112,9808326,ARE,UZB,96.927,
113,113,9866519,TUR,AZE,93.055,
114,114,7745385,SLE,USA,88.201,
115,115,7566156,RUS,IND,87.933,
116,116,3468984,DEU,NLD,83.369,
117,117,868762,BRA,CHN,82.0,
118,118,7484721,RUS,BLR,74.841,
119,119,3333349,DEU,FIN,73.982,
120,120,3565118,DEU,SWE,68.559,
121,121,3776525,GUY,USA,63.235,
122,122,8588889,ZAF,ISR,60.528,
123,123,10174094,TUR,UZB,58.148,
124,124,4413410,ISR,USA,56.0,
125,125,4261814,IRL,DNK,50.12,
126,126,5579689,MAC,MYS,49.778,
127,127,8199664,SGP,ARE,49.228,
128,128,839267,BWA,USA,48.367,
129,129,990279,BRA,USA,45.301,
130,130,10719832,USA,BMU,44.977,
131,131,8142754,SGP,MYS,42.473,
132,132,835054,BWA,IND,37.481,
133,133,3913926,HKG,SGP,37.252,
134,134,7875668,IND,ISR,36.0,
135,135,907689,BRA,ISR,34.549,
136,136,525890,BEL,AUT,33.099,
137,137,9701164,ARE,LBN,32.143,
138,138,3240525,DEU,AUT,32.025,
139,139,10433900,GBR,FIN,30.66,
140,140,963233,BRA,IND,29.725,
141,141,1258769,CAN,DEU,27.673,
142,142,8672270,ZAF,GBR,27.38,
143,143,1295991,CAN,MYS,24.857,
144,144,1365575,CAN,GBR,24.119,
145,145,297183,AUT,DEU,20.257,
146,146,8431840,VNM,USA,18.688,
147,147,9805125,ARE,USA,18.65,
148,148,634094,BEL,JPN,17.639,
149,149,10370493,GBR,BEL,16.883,
150,150,1206075,CMR,ARE,16.359,
151,151,10616748,GBR,ZAF,16.161,
152,152,3875151,HKG,MYS,15.222,
153,153,3015467,FRA,LUX,14.649,
154,154,1276777,CAN,ISR,14.643,
155,155,1268446,CAN,HKG,14.342,
156,156,10843932,USA,HKG,14.257,
157,157,6285541,NLD,EST,12.957,
158,158,8634810,ZAF,POL,12.918,
159,159,1749636,CHN,MYS,12.429,
160,160,1838233,CHN,PHL,11.674,
161,161,7756157,IND,AUS,11.447,
162,162,8715126,ESP,BEL,10.553,
163,163,1351753,CAN,CHE,9.306,
164,164,9671455,ARE,HKG,9.133,
165,165,7525538,RUS,KAZ,7.902,
166,166,581414,BEL,EST,7.333,
167,167,9799773,ARE,GBR,6.899,
168,168,9610926,ARE,AUT,6.486,
169,169,4765861,ITA,URY,6.361,
170,170,6431378,NLD,POL,6.267,
171,171,10682442,TZA,ARE,6.071,
172,172,9694847,ARE,KOR,5.85,
173,173,11080647,USA,UZB,5.759,
174,174,650947,BEL,LTU,4.92,
175,175,3427089,DEU,LUX,4.418,
176,176,10697864,USA,AUS,4.368,
177,177,9415233,THA,AUS,4.361,
178,178,9371095,CHE,ESP,4.343,
179,179,10749033,USA,CAN,3.958,
180,180,9533704,THA,PER,3.834,
181,181,3369190,DEU,ISL,3.607,
182,182,6600521,NZL,SGP,3.466,
183,183,584471,BEL,FIN,3.282,
184,184,9661074,ARE,GEO,2.72,
185,185,7969726,IND,POL,2.7,
186,186,2658102,EST,JPN,2.46,
187,187,6214086,NLD,AUT,2.449,
188,188,9743367,ARE,POL,2.248,
189,189,8740114,ESP,CHL,1.901,
190,190,7420707,ROU,NLD,1.668,
191,191,9628714,ARE,CAN,1.608,
192,192,1884546,CHN,SGP,1.429,
193,193,4331369,IRL,GBR,1.372,
194,194,10885507,USA,KOR,1.296,
195,195,6290081,NLD,FIN,1.113,
196,196,9273480,CHE,HKG,1.095,
197,197,8096035,SGP,CHN,1.042,
198,198,219669,AUS,ARE,1.025,
199,199,10547981,GBR,NLD,0.918,
200,200,3570071,DEU,CHE,0.85,
201,201,7063241,POL,LTU,0.84,
202,202,5371660,LVA,LTU,0.77,
203,203,10859140,USA,IRL,0.757,
204,204,5550099,LUX,NLD,0.751,
205,205,8499188,SVN,NLD,0.743,
206,206,10641488,GBR,ARE,0.736,
207,207,9810480,ARE,YEM,0.646,
208,208,9726231,ARE,OMN,0.645,
209,209,9132946,SWE,NLD,0.607,
210,210,2781812,FIN,NLD,0.531,
211,211,4021042,HUN,NLD,0.513,
212,212,5379161,LVA,NLD,0.448,
213,213,10808514,USA,FIN,0.415,
214,214,11026571,USA,ZAF,0.279,
215,215,4368726,ISR,ISL,0.243,
216,216,5855894,MEX,SGP,0.197,
217,217,2128087,HRV,NLD,0.177,
218,218,6442639,NLD,ROU,0.17,
219,219,2176034,CYP,NLD,0.168,
220,220,8272709,SVK,NLD,0.156,
221,221,5469647,LTU,NLD,0.13,
222,222,2672132,EST,NLD,0.084,
223,223,8552953,ZAF,BWA,0.084,
224,224,1065449,BGR,NLD,0.082,
225,225,836089,BWA,ZAF,0.08,
226,226,4035408,HUN,ROU,0.076,
227,227,949075,BRA,PER,0.066,
228,228,6520845,NLD,GBR,0.043,
229,229,654894,BEL,LUX,0.033,
230,230,861754,BRA,CAN,0.02,
231,231,3987629,HUN,DEU,0.012,
232,232,5696165,MYS,SGP,0.007,
233,233,3755866,GTM,HND,0.006,
234,234,5740359,MLT,NLD,0.006,