Skip to content

Instantly share code, notes, and snippets.

@darkgenio76
Created April 11, 2015 13:56
Show Gist options
  • Save darkgenio76/f3da9adecb0aa86c7f45 to your computer and use it in GitHub Desktop.
Save darkgenio76/f3da9adecb0aa86c7f45 to your computer and use it in GitHub Desktop.
Project Part 2
Country File Population CorruptionRank CorruptionScore HDI Rank Human Development Index 2013
Afghanistan 31,108,077 175 8 169 0.468
Albania 3,011,405 116 31 95 0.716
Algeria 38,087,812 94 36 93 0.717
American Samoa 54,719 NULL NULL NULL NULL
Andorra 85,293 NULL NULL 37 0.83
Angola 18,565,269 153 23 149 0.526
Anguilla 15,754 NULL NULL NULL NULL
Antarctica NULL NULL NULL NULL NULL
Antigua and Barbuda 90,156 NULL NULL 61 0.774
Argentina 42,610,981 106 34 49 0.808
Armenia 2,974,184 94 36 87 0.73
Aruba 109,153 NULL NULL NULL NULL
Australia 22,262,501 9 81 2 0.933
Austria 8,221,646 26 69 21 0.881
Azerbaijan 9,590,159 127 28 76 0.747
Bahamas 319,031 22 71 51 0.789
Bahrain 1,281,332 57 48 44 0.815
Bangladesh 163,654,860 136 27 142 0.558
Barbados 288,725 15 75 59 0.776
Belarus 9,625,888 123 29 53 0.786
Belgium 10,444,268 15 75 21 0.881
Belize 334,297 NULL NULL 84 0.732
Benin 9,877,292 94 36 165 0.476
Bermuda 69,467 NULL NULL NULL NULL
Bhutan 725,296 31 63 136 0.584
Bolivia 10,461,053 106 34 113 0.667
Bosnia and Herzegovina 3,875,723 72 42 86 0.731
Botswana 2,127,825 30 64 109 0.683
Bouvet Island NULL NULL NULL NULL NULL
Brazil 201,009,622 72 42 79 0.744
British Indian Ocean Territory NULL NULL NULL NULL NULL
British Virgin Islands 31,912 NULL NULL NULL NULL
Brunei 415,717 38 60 30 0.852
Bulgaria 6,981,642 77 41 58 0.777
Burkina Faso 17,812,961 83 38 181 0.388
Burundi 10,888,321 157 21 180 0.389
Cambodia 15,205,539 160 20 136 0.584
Cameroon 20,549,221 144 25 152 0.504
Canada 34,568,211 9 81 8 0.902
Cape Verde 531,046 41 58 123 0.636
Cayman Islands 53,737 NULL NULL NULL NULL
Central African Republic 5,166,510 144 25 185 0.341
Chad 11,193,452 163 19 184 0.372
Chile 17,216,945 22 71 41 0.822
China 1,349,585,838 80 40 91 0.719
Christmas Island 1,513 NULL NULL NULL NULL
Cocos (Keeling) Islands 596 NULL NULL NULL NULL
Colombia 45,745,783 94 36 98 0.711
Comoros 752,288 127 28 159 0.488
Congo Republic 4,492,689 154 22 140 0.564
Cook Islands 10,447 NULL NULL NULL NULL
Costa Rica 4,695,942 49 53 68 0.763
Cote d'Ivoire 22,400,835 136 27 171 0.452
Croatia 4,475,611 57 48 47 0.812
Cuba 11,061,886 63 46 44 0.815
Cyprus 1,155,403 31 63 32 0.845
Czech Republic 10,162,921 57 48 28 0.861
Democratic Republic of the Congo 75,507,308 154 22 186 0.338
Denmark 5,556,452 1 91 10 0.9
Djibouti 792,198 94 36 170 0.467
Dominica 73,286 41 58 93 0.717
Dominican Republic 10,219,630 123 29 102 0.7
Ecuador 15,439,429 102 35 98 0.711
Egypt 85,294,388 114 32 110 0.682
El Salvador 6,108,590 83 38 115 0.662
Equatorial Guinea 704,001 163 19 144 0.556
Eritrea 6,233,682 160 20 182 0.381
Estonia 1,266,375 28 68 33 0.84
Ethiopia 93,877,025 111 33 173 0.435
Faeroe Islands 49,709 NULL NULL NULL NULL
Falkland Islands 3,140 NULL NULL NULL NULL
Fiji 896,758 NULL NULL 88 0.724
Finland 5,266,114 3 89 24 0.879
France 65,951,611 22 71 20 0.884
French Polynesia 277,293 NULL NULL NULL NULL
Gabon 1,640,286 106 34 112 0.674
Gambia 1,883,051 127 28 172 0.441
Georgia 4,555,911 55 49 79 0.744
Germany 81,147,265 12 78 6 0.911
Ghana 25,199,609 63 46 138 0.573
Gibraltar 29,111 NULL NULL NULL NULL
Greece 10,772,967 80 40 29 0.853
Greenland 57,714 NULL NULL NULL NULL
Grenada 109,590 NULL NULL 79 0.744
Guam 160,378 NULL NULL NULL NULL
Guatemala 14,373,472 123 29 125 0.628
Guernsey 65,605 NULL NULL NULL NULL
Guinea 11,176,026 150 24 179 0.392
Guinea-Bissau 1,660,870 163 19 177 0.396
Guyana 739,903 136 27 121 0.638
Haiti 9,893,934 163 19 168 0.471
Honduras 8,448,465 140 26 129 0.617
Hong Kong 7,182,724 15 75 15 0.891
Hungary 9,939,470 47 54 43 0.818
Iceland 315,281 12 78 13 0.895
India 1,220,800,359 94 36 135 0.586
Indonesia 251,160,124 114 32 108 0.684
Iran 79,853,900 144 25 75 0.749
Iraq 31,858,481 171 16 120 0.642
Ireland 4,775,982 21 72 11 0.899
Isle of Man 86,159 NULL NULL NULL NULL
Israel 7,707,042 36 61 19 0.888
Italy 61,482,297 69 43 26 0.872
Jamaica 2,909,714 83 38 96 0.715
Japan 127,253,075 18 74 17 0.89
Jersey 95,732 NULL NULL NULL NULL
Jordan 6,482,081 66 45 77 0.745
Kazakhstan 17,736,896 140 26 70 0.757
Kenya 44,037,656 136 27 147 0.535
Kiribati 103,248 NULL NULL 133 0.607
Kosovo 1,847,708 111 33 NULL NULL
Kuwait 2,695,316 69 43 46 0.814
Kyrgyzstan 5,548,042 150 24 125 0.628
Laos 6,695,166 140 26 139 0.569
Latvia 2,178,443 49 53 48 0.81
Lebanon 4,131,583 127 28 65 0.765
Lesotho 1,936,181 55 49 162 0.486
Liberia 3,989,703 83 38 175 0.412
Libya 6,002,347 172 15 55 0.784
Liechtenstein 37,009 NULL NULL 18 0.889
Lithuania 3,515,858 43 57 35 0.834
Luxembourg 514,862 11 80 21 0.881
Macau 583,003 NULL NULL NULL NULL
Macedonia 2,087,171 67 44 84 0.732
Madagascar 22,599,098 127 28 155 0.498
Malawi 16,777,547 91 37 174 0.414
Malaysia 29,628,392 53 50 62 0.773
Maldives 393,988 NULL NULL 103 0.698
Mali 15,968,882 127 28 176 0.407
Malta 411,277 45 56 39 0.829
Marshall Islands 69,747 NULL NULL NULL NULL
Mauritania 3,437,610 119 30 161 0.487
Mauritius 1,322,238 52 52 63 0.771
Mexico 116,220,947 106 34 71 0.756
Moldova 3,619,925 102 35 114 0.663
Monaco 30,500 NULL NULL NULL NULL
Mongolia 3,226,516 83 38 103 0.698
Montenegro 653,474 67 44 51 0.789
Montserrat 5,189 NULL NULL NULL NULL
Morocco 32,649,130 91 37 129 0.617
Mozambique 24,096,669 119 30 178 0.393
Myanmar 55,167,330 157 21 150 0.524
Namibia 2,182,852 57 48 127 0.624
Nauru 9,434 NULL NULL NULL NULL
Nepal 30,430,267 116 31 145 0.54
Netherlands 16,805,037 8 83 4 0.915
New Caledonia 264,022 NULL NULL NULL NULL
New Zealand 4,365,113 1 91 7 0.91
Nicaragua 5,788,531 127 28 132 0.614
Niger 16,899,327 106 34 187 0.337
Nigeria 174,507,539 144 25 152 0.504
Niue 1,229 NULL NULL NULL NULL
Norfolk Island 2,196 NULL NULL NULL NULL
North Korea 24,720,407 175 8 NULL NULL
Northern Mariana Islands 51,170 NULL NULL NULL NULL
Norway 4,722,701 5 86 1 0.944
Oman 3,154,134 61 47 56 0.783
Pakistan 193,238,868 127 28 146 0.537
Palau 21,108 NULL NULL 60 0.775
Panama 3,559,408 102 35 65 0.765
Papua New Guinea 6,431,902 144 25 157 0.491
Paraguay 6,623,252 150 24 111 0.676
Peru 29,849,303 83 38 82 0.737
Philippines 105,720,644 94 36 117 0.66
Poland 38,383,809 38 60 35 0.834
Portugal 10,799,270 33 62 41 0.822
Puerto Rico 3,674,209 33 62 NULL NULL
Qatar 2,042,444 28 68 31 0.851
Romania 21,790,479 69 43 54 0.785
Russia 142,500,482 127 28 57 0.778
Rwanda 12,012,589 49 53 151 0.506
Saint Lucia 162,781 22 71 97 0.714
Samoa 195,476 NULL NULL 106 0.694
San Marino 32,448 NULL NULL NULL NULL
Sao Tome and Principe 186,817 72 42 142 0.558
Saudi Arabia 26,939,583 63 46 34 0.836
Senegal 13,300,410 77 41 163 0.485
Serbia 7,243,007 72 42 77 0.745
Seychelles 90,846 47 54 71 0.756
Sierra Leone 5,612,685 119 30 183 0.374
Singapore 5,460,302 5 86 9 0.901
Slovakia 5,488,339 61 47 37 0.83
Slovenia 1,992,690 43 57 25 0.874
Solomon Islands 597,248 NULL NULL 157 0.491
Somalia 10,251,568 175 8 NULL NULL
South Africa 48,601,098 72 42 118 0.658
South Georgia and South Sandwich Islands NULL NULL NULL NULL NULL
South Korea 48,955,203 46 55 15 0.891
South Sudan 11,090,104 173 14 NULL NULL
Spain 47,370,542 40 59 27 0.869
Sri Lanka 21,675,648 91 37 73 0.75
Sudan 34,847,910 174 11 166 0.473
Suriname 566,846 94 36 100 0.705
Swaziland 1,403,362 82 39 148 0.53
Sweden 9,119,423 3 89 12 0.898
Switzerland 7,996,026 7 85 3 0.917
Syria 22,457,336 168 17 118 0.658
Taiwan 23,299,716 36 61 NULL NULL
Tajikistan 7,910,041 154 22 133 0.607
Tanzania 48,261,942 111 33 159 0.488
Thailand 67,448,120 102 35 89 0.722
Togo 7,154,237 123 29 166 0.473
Tokelau 1,353 NULL NULL NULL NULL
Tonga 106,322 NULL NULL 100 0.705
Trinidad and Tobago 1,225,225 83 38 64 0.766
Tunisia 10,835,873 77 41 90 0.721
Turkey 80,694,485 53 50 69 0.759
Turkmenistan 5,113,040 168 17 103 0.698
Turks and Caicos Islands 47,754 NULL NULL NULL NULL
Tuvalu 10,698 NULL NULL NULL NULL
Uganda 34,758,809 140 26 164 0.484
Ukraine 44,573,205 144 25 83 0.734
United Arab Emirates 5,473,972 26 69 40 0.827
United Kingdom 63,395,574 14 76 14 0.892
United States 316,668,567 19 73 5 0.914
Uruguay 3,324,460 19 73 50 0.79
Uzbekistan 28,661,637 168 17 116 0.661
Vanuatu 261,565 NULL NULL 131 0.616
Venezuela 28,459,085 160 20 67 0.764
Vietnam 92,477,857 116 31 121 0.638
Western Sahara 538,811 NULL NULL NULL NULL
Yemen 25,408,288 167 18 154 0.5
Zambia 14,222,233 83 38 141 0.561
Zimbabwe 13,182,908 157 21 156 0.492
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Corruption and Population Data</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
</head>
<body>
<style> svg { margin: 7em 10em; } </style>
<svg width="500" height="200">
<line x1="100" y1="85" x2="80" y2="120" stroke="blue" stroke-width="3" />
<line x1="115" y1="150" x2="90" y2="195" stroke="blue" stroke-width="3" />
<line x1="170" y1="85" x2="190" y2="120" stroke="red" stroke-width="3" />
<line x1="155" y1="150" x2="175" y2="195" stroke="red" stroke-width="3" />
<rect x="100" y="80" width="70" height="70" fill="orange" />
<circle cx="133" cy="57" r="30" fill="violet" />
<circle cx="125" cy="53" r="5" fill="black" />
<circle cx="142" cy="53" r="5" fill="black" />
<line x1="120" y1="75" x2="150" y2="75" stroke="black" stroke-width="3" />
<text x="208" y="100" fill="charcoal" font-size="30" font-weight="bold" font-family="Helvetica">I am data</text>
<text x="208" y="120" fill="charcoal" font-size="30" font-weight="bold" font-family="Helvetica">...</text>
<text x="208" y="150" fill="charcoal" font-size="30" font-weight="bold" font-family="Helvetica">I don't feel so good</text>
</svg>
<script type="text/javascript">
//Load in contents of CSV file
d3.csv("HDI_Corruption_Population.csv", function(data) {
//Now CSV contents have been transformed into //an array of JSON objects. //Log 'data' to the console, for verification.
console.log(data); });
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment