Skip to content

Instantly share code, notes, and snippets.

@davetaz
Forked from weiglemc/.block
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davetaz/7eea18730ec24f4408c4 to your computer and use it in GitHub Desktop.
Save davetaz/7eea18730ec24f4408c4 to your computer and use it in GitHub Desktop.
ODBRank Country ISO2 ODB-Score Readiness Implementation Impact ODB-Scaled Readiness-Scaled Implementation-Scaled Impact-Scaled Sub-components: Readiness_Government Readiness_Government-Scaled Readiness_Citizens Readiness_Citizens-Scaled Readiness_Entrepreneurs Readiness_Entrepreneurs-Scaled Readiness-Rank Datasets_Innovation Datasets_Social_Policy Datasets_Accountability Datasets_Average Datasets_Normalised Implementation Implementation-Scaled Implementation-Rank Impact_Political Impact_Political-Scaled Impact_Social Impact_Social-Scaled Impact_Economic Impacts_Economic-Scaled Classifications: Region HDI HDI-Rank RTI
1 United Kingdom GB 0.48 0.501000286 3.094334792 0.708617919 100 100 100 80 1.592065164 99 1.173804402 93 1.743133006 97 1 93.75 96 95 95 3.094334792 3.094334792 100 1 2.021665362 80 1.699024636 52 2.656871277 92 Europe 0.875368403 Very High 3
2 United States US 0.43 0.455578141 2.485788481 0.940939121 93.38 95 87 100 1.623851724 100 0.889011645 83 1.587339898 92 2 86.25 90 73 82.85714286 2.485788481 2.485788481 87 2 1.829507851 75 3.686162766 100 2.952781473 100 Americas 0.937142347 Very High 3
3 Sweden SE 0.38 0.454989767 2.324702693 0.616661215 85.75 95 83 72 1.421850717 94 0.999929783 87 1.673127403 95 3 87.5 67 86 79.64285714 2.324702693 2.324702693 83 3 1.253947167 58 2.490068479 71 1.805935292 68 Europe 0.916179437 Very High 3
4 New Zealand NZ 0.3 0.327269345 1.519273753 0.823152356 74.34 82 65 90 0.747940213 74 1.174088548 93 1.023395347 74 9 63.75 75 52 63.57142857 1.519273753 1.519273753 65 7 2.724723153 100 2.581802567 73 2.101845488 77 Asia Pacific 0.918843229 Very High 3
5 Denmark DK 0.28 0.343234953 1.734054804 0.429057816 71.78 84 70 56 0.926648579 79 0.998313186 87 1.164152812 79 8 67.5 66 70 67.85714286 1.734054804 1.734054804 70 5 1.829507851 75 0.521987395 24 1.510025096 60 Europe 0.90138556 Very High 2
5 Norway NO 0.28 0.423161521 1.769851645 0.318372729 71.86 92 71 46 1.043808021 83 0.928037878 85 1.836607794 100 4 87.5 67 55 68.57142857 1.769851645 1.769851645 71 4 0.870543994 47 0.411196261 21 1.583614303 62 Europe 0.955202335 Very High 2
7 Australia AU 0.25 0.384833008 1.483476911 0.376648019 67.68 88 65 51 1.366954877 92 0.989056297 87 1.107485902 77 6 85 57 51 62.85714286 1.483476911 1.483476911 65 8 1.509853232 65 1.110506016 38 0.769472921 40 Asia Pacific 0.93798457 Very High 4
8 Canada CA 0.24 0.300762747 1.447680069 0.38123051 65.87 79 64 52 1.231010373 88 0.917830617 84 0.558023735 60 11 87.5 57 47 62.14285714 1.447680069 1.447680069 64 10 1.509853232 65 0.411196261 21 1.510025096 60 Americas 0.911154831 Very High 1
9 Germany DE 0.23 0.256564549 1.411883227 0.406842816 65.01 75 63 54 0.571751129 68 0.972061183 86 0.765268625 66 14 76.25 54 57 61.42857143 1.411883227 1.411883227 63 11 1.446104678 64 0.705455571 28 1.510025096 60 Europe 0.920098308 Very High 1
10 France FR 0.22 0.303461097 1.46557849 0.236467473 63.92 79 64 39 1.040921966 83 1.043286863 89 0.646941039 62 10 86.25 61 45 62.5 1.46557849 1.46557849 64 9 0.487140822 36 1.018771928 36 0.622294507 36 Europe 0.893086527 Very High 2
10 Netherlands NL 0.22 0.366010432 1.590867436 0.032432431 63.66 86 67 21 1.145050908 86 0.910190325 84 1.238852652 81 7 80 57 61 65 1.590867436 1.590867436 67 6 -0.153080265 18 -0.17732236 7 0.622294507 36 Europe 0.921019189 Very High 2
12 Korea, Republic of KR 0.15 0.282373568 1.036016389 0.068686403 54.21 77 55 25 1.096985062 84 0.360747218 65 1.083629832 76 12 52.5 50 59 53.92857143 1.036016389 1.036016389 55 12 0.358731865 33 -0.17732236 7 0.436768122 31 Asia Pacific 0.908503574 Very High 3
13 Iceland IS 0.13 0.146212825 0.946524284 0.090577283 51.01 63 53 26 -0.007290706 51 0.759902807 79 0.563303322 60 24 60 66 32 52.14285714 0.946524284 0.946524284 53 13 0.294983311 31 -0.47158167 0 0.991793911 46 Europe 0.906476478 Very High 2
14 Estonia EE 0.12 0.236188055 0.785438496 0.062215152 49.45 72 49 24 0.413984274 64 0.794669224 80 0.917039 71 15 27.5 61 54 48.92857143 0.785438496 0.785438496 49 14 0.358731865 33 0.319462173 19 -0.118257667 15 Europe 0.846009834 Very High 3
14 Finland FI 0.12 0.416582903 0.409571657 0.257232993 49.44 91 41 41 0.793560366 75 1.369425993 100 1.586259771 92 5 76.25 32 23 41.42857143 0.409571657 0.409571657 41 22 0.358731865 33 0.705455571 28 1.250909503 53 Europe 0.892477949 Very High 4
14 Japan JP 0.12 0.280389274 0.678047971 0.107799417 49.17 77 47 28 0.763324155 74 0.82810319 81 0.932076121 71 13 27.5 55 54 46.78571429 0.678047971 0.678047971 47 16 -0.792389503 0 2.176752122 64 -0.414167863 7 Asia Pacific 0.911836589 Very High 2
17 Spain ES 0.11 0.189261841 0.785438496 0.029080934 48.19 67 49 21 0.648805296 71 0.304676523 63 0.74987475 66 19 47.5 56 43 48.92857143 0.785438496 0.785438496 49 14 0.039077246 24 -0.17732236 7 0.399973518 30 Europe 0.884827918 Very High 0
18 Austria AT 0.1 0.199564724 0.320079553 0.346865298 46.03 69 39 49 0.68071014 72 0.497446999 70 0.61792538 61 18 45 37 38 39.64285714 0.320079553 0.320079553 39 25 0.998041102 51 0.613721483 26 1.510025096 60 Europe 0.895331096 Very High 1
18 Israel IL 0.09 0.135021004 0.624352708 0.077955801 45.58 62 46 25 0.303122494 60 0.572523515 72 0.339543027 53 26 53.75 32 53 45.71428571 0.624352708 0.624352708 46 17 0.550889376 38 -0.47158167 0 0.622294507 36 Middle East & C. Asia 0.900216591 Very High 2
20 Italy IT 0.09 0.025392887 0.481165341 0.313017851 45.3 50 43 46 0.074878976 54 0.619003825 74 -0.465346815 27 33 32.5 38 56 42.85714286 0.481165341 0.481165341 43 20 1.190198613 56 0.116936951 14 1.510025096 60 Europe 0.880552295 Very High 1
20 Russian Federation RU 0.09 0.06411417 0.373774816 0.349628437 44.79 54 40 49 0.380860488 63 -0.009482275 52 0.205649313 48 31 37.5 47 37 40.71428571 0.373774816 0.373774816 40 23 1.446104678 64 0.116936951 14 1.583614303 62 Europe 0.787681141 High 1
22 Czech Republic CZ 0.08 0.135054049 0.355876395 0.193534059 43.18 62 40 35 -0.29174929 43 0.890912389 83 0.61632334 61 25 36.25 57 27 40.35714286 0.355876395 0.355876395 40 24 0.487140822 36 0.521987395 24 0.732678318 39 Europe 0.872564292 Very High 2
22 Kenya KE 0.08 0.01879702 0.624352708 0.033964577 43.06 50 46 22 0.049804543 53 -0.166593738 47 0.285962374 51 34 50 48 40 45.71428571 0.624352708 0.624352708 46 17 0.1028258 25 0.025202863 12 0.177652529 23 Africa 0.518914949 Low 2
22 Switzerland CH 0.08 0.166570574 0.427470078 0.094655323 43.24 65 42 27 0.131469621 55 0.803641967 80 0.564023574 60 22 50 44 33 41.78571429 0.427470078 0.427470078 42 21 0.039077246 24 0.116936951 14 0.695883714 38 Europe 0.91292195 Very High 0
25 Chile CL 0.05 0.173052922 0.320079553 -0.003971159 40.11 66 39 18 0.548643978 68 0.563330845 72 0.445501479 56 21 38.75 26 54 39.64285714 0.320079553 0.320079553 39 25 0.294983311 31 -0.47158167 0 0.140857926 22 Americas 0.819422457 Very High 4
25 Mexico MX 0.06 0.013027412 0.606454287 -0.118420416 40.3 49 45 8 0.113788424 55 0.092121198 56 -0.088662914 39 35 45 55 36 45.35714286 0.606454287 0.606454287 45 19 -0.216828819 16 -0.47158167 0 -0.377373259 8 Americas 0.774959314 High 4
27 Portugal PT 0.04 0.12117069 0.26638429 0.007373485 38.63 60 38 19 0.424460456 64 0.708065027 77 -0.041989277 41 28 55 40 24 38.57142857 0.26638429 0.26638429 38 28 0.1028258 25 -0.17732236 7 0.140857926 22 Europe 0.816446913 Very High 2
28 Brazil BR 0.03 0.175347285 -0.002092023 0.106968514 36.83 66 32 28 0.505543211 67 0.524982869 71 0.547599481 59 20 20 41 36 33.21428571 -0.002092023 -0.002092023 32 35 0.231234757 29 1.404765326 45 -0.673283455 0 Americas 0.729970447 High 4
29 Ireland IE 0.02 0.134905352 0.015806398 0.061305178 35.76 62 33 24 0.037579658 52 0.732416287 78 0.444152223 56 27 30 42 28 33.57142857 0.015806398 0.015806398 33 34 0.422480418 35 0.025202863 12 0.104063322 21 Europe 0.916192996 Very High 0
29 Singapore SG 0.03 0.216119812 0.141095344 -0.111520676 36.29 70 35 9 1.06972404 83 -0.266849891 43 1.142204161 78 17 36.25 42 30 36.07142857 0.141095344 0.141095344 35 30 -0.153080265 18 -0.17732236 7 -0.673283455 0 Asia Pacific 0.894788856 Very High 3
31 Argentina AR 0.02 -0.015887858 0.194790607 -0.015290458 35 46 36 17 -0.256805332 44 0.177725674 59 -0.063911066 40 37 31.25 50 29 37.14285714 0.194790607 0.194790607 36 29 -0.280577373 15 0.816246705 31 -0.673283455 0 Americas 0.811316984 Very High 2
31 Belgium BE 0.02 0.232712546 -0.163177811 0.081147431 34.8 72 29 26 0.427752345 64 0.972727409 86 0.693933158 64 16 28.75 48 13 30 -0.163177811 -0.163177811 29 40 1.062701505 53 -0.17732236 7 -0.15505227 14 Europe 0.896733025 Very High 2
31 Thailand TH 0.02 -0.092500374 0.320079553 -0.043220014 35.33 38 39 15 -0.467949598 37 -0.2644535 43 -0.10010027 39 48 41.25 43 35 39.64285714 0.320079553 0.320079553 39 25 -0.280577373 15 -0.47158167 0 0.363178915 29 Asia Pacific 0.689656555 Medium 1
34 India IN 0.01 0.092234519 0.06950166 -0.101157871 33.38 57 34 10 0.040685635 53 0.673173777 76 0.116251262 46 29 25 52 25 34.64285714 0.06950166 0.06950166 34 32 -0.024671308 22 -0.47158167 0 -0.414167863 7 Asia Pacific 0.554212505 Medium 4
34 Uruguay UY 0 0.066399431 0.033704819 -0.06137922 33.04 55 33 13 0.104320611 54 0.901119649 84 -0.407845382 29 30 43.75 25 35 33.92857143 0.033704819 0.033704819 33 33 0.039077246 24 -0.17732236 7 -0.414167863 7 Americas 0.791790861 High 3
36 Costa Rica CR -0.01 -0.003844341 0.141095344 -0.215250514 31.21 47 35 0 0.22729147 58 -0.06843496 50 -0.193455582 36 36 28.75 37 41 36.07142857 0.141095344 0.141095344 35 30 -0.792389503 0 -0.47158167 0 -0.673283455 0 Americas 0.772552289 High 0
37 Greece GR -0.03 -0.036308587 -0.198974653 -0.073080478 27.59 44 28 12 -0.763699929 28 0.582446629 73 -0.145523985 37 39 37.5 26 26 29.28571429 -0.198974653 -0.198974653 28 42 0.487140822 36 -0.47158167 0 -0.673283455 0 Europe 0.859576929 Very High 0
37 Kazakhstan KZ -0.03 -0.122483622 -0.002092023 -0.182371604 27.61 35 32 3 0.171154404 56 -1.173818068 11 -0.099688934 39 55 31.25 45 23 33.21428571 -0.002092023 -0.002092023 32 35 -0.792389503 0 -0.47158167 0 -0.377373259 8 Middle East & C. Asia 0.754232689 High 1
37 Turkey TR -0.03 -0.055785217 -0.037888865 -0.215250514 27.58 42 31 0 -0.354566452 41 -0.112188989 48 -0.035311512 41 41 23.75 50 22 32.5 -0.037888865 -0.037888865 31 37 -0.792389503 0 -0.47158167 0 -0.673283455 0 Europe 0.72222372 High 2
40 Colombia CO -0.04 -0.032651638 -0.14527939 -0.186459893 26.71 44 29 2 0.397382046 63 -0.111904843 48 -0.579341941 24 38 32.5 37 22 30.35714286 -0.14527939 -0.14527939 29 39 -0.792389503 0 -0.47158167 0 -0.414167863 7 Americas 0.71945882 High 0
40 Morocco MA -0.04 -0.108066599 -0.198974653 -0.023396953 27.24 36 28 17 -0.335604265 41 -0.218419488 45 -0.418575639 29 51 25 23 39 29.28571429 -0.198974653 -0.198974653 28 42 0.934292548 49 -0.47158167 0 -0.673283455 0 Africa 0.590934731 Medium 2
42 Hungary HU -0.04 -0.14678954 -0.163177811 -0.093718084 26.09 32 29 11 -0.464891378 37 -0.584850242 32 -0.271364239 33 58 48.75 33 12 30 -0.163177811 -0.163177811 29 40 -0.216828819 16 -0.47158167 0 -0.15505227 14 Europe 0.83084295 Very High 3
42 Mauritius MU -0.04 -0.115290311 -0.073685707 -0.215250514 26.08 36 31 0 -0.461330858 38 -0.262155808 43 -0.314126129 32 53 37.5 29 30 31.78571429 -0.073685707 -0.073685707 31 38 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.73711537 High 0
44 United Arab Emirates AE -0.06 0.058887167 -0.485349387 -0.073080478 24.59 54 22 12 0.843745793 77 -0.969113771 19 0.655352476 63 32 30 36 6 23.57142857 -0.485349387 -0.485349387 22 49 0.487140822 36 -0.47158167 0 -0.673283455 0 Middle East & C. Asia 0.818085446 Very High 0
45 Rwanda RW -0.06 -0.105709365 -0.198974653 -0.215250514 24.27 37 28 0 0.074165156 54 -0.684775739 29 -0.340773702 31 50 23.75 57 6 29.28571429 -0.198974653 -0.198974653 28 42 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.433863207 Low 0
46 Jamaica JM -0.07 -0.145450685 -0.288466758 -0.186459893 22.69 33 26 2 -0.815721995 27 -0.14886818 47 -0.344465988 31 57 23.75 45 13 27.5 -0.288466758 -0.288466758 26 45 -0.792389503 0 -0.47158167 0 -0.414167863 7 Europe 0.730493758 High 3
47 Ghana GH -0.08 -0.078857152 -0.395857283 -0.215250514 21.6 40 24 0 -0.417123685 39 0.422716009 67 -0.715306693 19 45 13.75 35 25 25.35714286 -0.395857283 -0.395857283 24 46 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.55844397 Medium 0
47 Peru PE -0.08 -0.109037873 -0.413755704 -0.158025886 21.74 36 23 5 -0.786112312 28 0.306638646 63 -0.50186719 26 52 11.25 37 24 25 -0.413755704 -0.413755704 23 47 -0.536483438 7 -0.47158167 0 -0.414167863 7 Americas 0.74092877 High 3
47 Philippines PH -0.07 -0.071012505 -0.503247808 -0.096101046 21.91 40 21 10 0.072411143 54 -0.665100853 29 -0.046422838 40 44 11.25 20 36 23.21428571 -0.503247808 -0.503247808 21 51 -0.216828819 16 0.025202863 12 -0.673283455 0 Asia Pacific 0.654358257 Medium 0
50 Ecuador EC -0.08 -0.088420141 -0.449552546 -0.182555035 21.12 39 22 3 -0.683720108 31 0.215676701 60 -0.327737859 32 47 17.5 25 29 24.28571429 -0.449552546 -0.449552546 22 48 -0.792389503 0 -0.17732236 7 -0.673283455 0 Americas 0.723952604 High 2
50 Tunisia TN -0.08 0.15133458 -0.968606752 0.09069569 21.02 64 11 26 0.497421797 66 0.719317753 77 0.145271668 47 23 16.25 13 13 13.92857143 -0.968606752 -0.968606752 11 62 1.702010743 71 -0.47158167 0 -0.414167863 7 Africa 0.711816916 High 3
52 Indonesia ID -0.1 -0.122943292 -0.53904465 -0.215250514 18.66 35 20 0 -0.177349684 46 -0.076298019 50 -0.852841923 15 56 18.75 33 15 22.5 -0.53904465 -0.53904465 20 52 -0.792389503 0 -0.47158167 0 -0.673283455 0 Asia Pacific 0.628666434 Medium 3
52 South Africa ZA -0.09 -0.118322166 -0.628536755 -0.096101046 19.2 35 18 10 -0.818226395 27 -0.173329403 46 -0.0733437 40 54 30 9 25 20.71428571 -0.628536755 -0.628536755 18 53 -0.216828819 16 0.025202863 12 -0.673283455 0 Africa 0.629413282 Medium 3
54 Bahrain BH -0.1 -0.045991686 -0.646435175 -0.215250514 18.18 43 18 0 0.572823683 69 -1.229271121 10 0.242522264 50 40 22.5 17 22 20.35714286 -0.646435175 -0.646435175 18 55 -0.792389503 0 -0.47158167 0 -0.673283455 0 Middle East & C. Asia 0.795507201 High 0
55 Botswana BW -0.12 -0.341074555 -0.485349387 -0.215250514 16.08 12 22 0 -0.898202764 24 -1.143834384 13 -1.027633842 9 70 8.75 25 34 23.57142857 -0.485349387 -0.485349387 22 49 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.634418321 Medium 3
55 Nepal NP -0.12 -0.254847534 -0.628536755 -0.182371604 15.7 21 18 3 -1.000456205 21 -0.125235335 48 -1.167936268 5 64 21.25 13 28 20.71428571 -0.628536755 -0.628536755 18 53 -0.792389503 0 -0.47158167 0 -0.377373259 8 Asia Pacific 0.463047862 Low 0
55 Uganda UG -0.12 -0.22761006 -0.861216226 0.05148243 16.15 24 13 23 -0.636673171 32 -0.44496869 37 -0.966848676 11 62 22.5 15 12 16.07142857 -0.861216226 -0.861216226 13 58 0.614637929 40 0.521987395 24 -0.673283455 0 Africa 0.456081163 Low 4
58 Tanzania TZ -0.13 -0.261759594 -0.664333596 -0.215250514 14.51 20 18 0 -0.748980725 29 -0.33255595 41 -1.274299672 2 65 26.25 22 13 20 -0.664333596 -0.664333596 18 56 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.475956236 Low 0
59 Malawi MW -0.13 -0.186901676 -0.93280991 -0.024228588 14.47 28 12 17 -0.774277135 28 -0.314500501 41 -0.593337451 23 61 8.75 21 13 14.64285714 -0.93280991 -0.93280991 12 60 0.039077246 24 -0.47158167 0 0.214447133 24 Africa 0.418269134 Low 0
60 Qatar QA -0.14 -0.083664074 -0.93280991 -0.215250514 13.09 39 12 0 0.389728747 63 -1.315985282 7 0.173279866 47 46 22.5 19 4 14.64285714 -0.93280991 -0.93280991 12 60 -0.792389503 0 -0.47158167 0 -0.673283455 0 Middle East & C. Asia 0.833584765 Very High 0
61 China CN -0.15 -0.057706021 -1.040200435 -0.215250514 11.82 42 9 0 0.183876777 57 -0.523318558 34 -0.179912405 36 42 12.5 15 10 12.5 -1.040200435 -1.040200435 9 65 -0.792389503 0 -0.47158167 0 -0.673283455 0 Asia Pacific 0.699241853 Medium 2
62 Venezuela VE -0.15 -0.365669125 -0.789622543 -0.215250514 10.91 10 15 0 -1.240532867 14 -1.104428912 14 -0.946060348 12 74 20 20 13 17.5 -0.789622543 -0.789622543 15 57 -0.792389503 0 -0.47158167 0 -0.673283455 0 Americas 0.748283069 High 0
63 Bangladesh BD -0.16 -0.237141173 -1.004403593 -0.215250514 9.56 23 10 0 -0.627338724 33 -0.629652576 30 -0.877279259 14 63 12.5 12 15 13.21428571 -1.004403593 -1.004403593 10 64 -0.792389503 0 -0.47158167 0 -0.673283455 0 Asia Pacific 0.515418052 Low 2
63 Jordan JO -0.16 -0.160948203 -1.075997277 -0.215250514 9.63 31 9 0 -0.295489764 43 -1.053333607 16 -0.099710456 39 59 8.75 15 11 11.78571429 -1.075997277 -1.075997277 9 68 -0.792389503 0 -0.47158167 0 -0.673283455 0 Middle East & C. Asia 0.700495142 Medium 1
63 Pakistan PK -0.16 -0.317747262 -0.914911489 -0.215250514 9.7 15 12 0 -1.179584922 16 -0.973245148 18 -0.706895284 20 69 21.25 12 13 15 -0.914911489 -0.914911489 12 59 -0.792389503 0 -0.47158167 0 -0.673283455 0 Asia Pacific 0.514988832 Low 4
66 Ethiopia ET -0.17 -0.309533524 -0.986505172 -0.215250514 8.7 15 11 0 -0.667188448 31 -1.18000031 11 -0.938612954 12 67 11.25 10 19 13.57142857 -0.986505172 -0.986505172 11 63 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.395667329 Low 4
67 Benin BJ -0.18 -0.346415651 -1.040200435 -0.215250514 7.28 12 9 0 -1.312940289 12 -0.478005707 36 -1.326794859 0 72 5 9 22 12.5 -1.040200435 -1.040200435 9 65 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.436040665 Low 0
67 Burkina Faso BF -0.18 -0.288650463 -1.093895698 -0.215250514 7.35 18 8 0 -0.709426476 30 -0.5778184 32 -1.310609288 1 66 10 13 11 11.42857143 -1.093895698 -1.093895698 8 69 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.343389276 Low 0
67 Namibia NA -0.18 -0.346731931 -1.058098856 -0.215250514 7 12 9 0 -0.849588183 26 -1.22241621 10 -1.048582982 9 73 15 13 9 12.14285714 -1.058098856 -1.058098856 9 67 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.608376517 Medium 0
67 Saudi Arabia SA -0.18 -0.066317123 -1.398168853 -0.149492693 7.09 41 2 6 0.593691672 69 -1.364638451 5 0.174092675 47 43 10 6 1 5.357142857 -1.398168853 -1.398168853 2 75 -0.792389503 0 -0.47158167 0 -0.081463063 16 Middle East & C. Asia 0.782480875 High 0
71 Cameroon CM -0.19 -0.389450758 -1.165489381 -0.150942713 5.65 7 7 6 -0.862838625 26 -1.360848995 5 -1.281369202 1 75 11.25 9 10 10 -1.165489381 -1.165489381 7 71 -0.472734884 9 -0.47158167 0 -0.414167863 7 Africa 0.495469726 Low 0
71 Senegal SN -0.18 -0.183756285 -1.254981486 -0.215250514 6.46 29 5 0 -0.976121036 22 -0.035841403 51 -0.641844131 22 60 5 8 11 8.214285714 -1.254981486 -1.254981486 5 74 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.470034373 Low 0
73 Yemen YE -0.2 -0.457613387 -1.093895698 -0.215250514 4.69 0 8 0 -1.715199505 0 -1.10916874 14 -1.294152238 1 77 7.5 16 10 11.42857143 -1.093895698 -1.093895698 8 69 -0.792389503 0 -0.47158167 0 -0.673283455 0 Middle East & C. Asia 0.458294024 Low 0
73 Zimbabwe ZW -0.19 -0.311919316 -1.201286223 -0.215250514 5.3 15 6 0 -1.185296571 16 -0.652329463 30 -0.969647807 11 68 8.75 8 11 9.285714286 -1.201286223 -1.201286223 6 72 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.397178827 Low 4
75 Nigeria NG -0.2 -0.103908291 -1.469762537 -0.215250514 4.35 37 0 0 -0.362144365 41 -0.062316172 50 -0.510714077 26 49 2.5 1 8 3.928571429 -1.469762537 -1.469762537 0 77 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.471137881 Low 3
75 Zambia ZM -0.2 -0.344067369 -1.237083065 -0.215250514 4.23 12 5 0 -0.905583263 24 -1.058452675 16 -1.132570378 6 71 5 7 13 8.571428571 -1.237083065 -1.237083065 5 73 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.447722655 Low 0
77 Mali ML -0.23 -0.398634038 -1.451864116 -0.215250514 0 6 0 0 -0.935804533 23 -1.504250727 0 -1.147651086 6 76 3.75 3 6 4.285714286 -1.451864116 -1.451864116 0 76 -0.792389503 0 -0.47158167 0 -0.673283455 0 Africa 0.344311205 Low 0
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<!-- Example based on http://bl.ocks.org/mbostock/3887118 -->
<!-- Tooltip example from http://www.d3noob.org/2013/01/adding-tooltips-to-d3js-graph.html -->
<style>
body {
font: 11px sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.dot {
stroke: #000;
}
.tooltip {
position: absolute;
width: 200px;
height: 28px;
pointer-events: none;
}
</style>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var margin = {top: 20, right: 20, bottom: 30, left: 40},
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
/*
* value accessor - returns the value to encode for a given data object.
* scale - maps value to a visual display encoding, such as a pixel position.
* map function - maps from data value to display value
* axis - sets up axis
*/
// setup x
var xValue = function(d) { return d.ODBRank;}, // data -> value
xScale = d3.scale.linear().range([0, width]), // value -> display
xMap = function(d) { return xScale(xValue(d));}, // data -> display
xAxis = d3.svg.axis().scale(xScale).orient("bottom");
// setup y
var yValue = function(d) { return d["RTI"];}, // data -> value
yScale = d3.scale.linear().range([height, 0]), // value -> display
yMap = function(d) { return yScale(yValue(d));}, // data -> display
yAxis = d3.svg.axis().scale(yScale).orient("left");
// setup fill color
var cValue = function(d) { return d.Region;},
color = d3.scale.category10();
// add the graph canvas to the body of the webpage
var svg = d3.select("body").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
// add the tooltip area to the webpage
var tooltip = d3.select("body").append("div")
.attr("class", "tooltip")
.style("opacity", 0);
// load data
d3.csv("data.csv", function(error, data) {
// change string (from CSV) into number format
data.forEach(function(d) {
console.log(d);
});
// don't want dots overlapping axis, so add in buffer to data domain
xScale.domain([0, 77]);
yScale.domain([0, 4]);
// x-axis
svg.append("g")
.attr("class", "x axis")
.attr("transform", "translate(0," + height + ")")
.call(xAxis)
.append("text")
.attr("class", "label")
.attr("x", width)
.attr("y", -6)
.style("text-anchor", "end")
.text("ODP Position");
// y-axis
svg.append("g")
.attr("class", "y axis")
.call(yAxis)
.append("text")
.attr("class", "label")
.attr("transform", "rotate(-90)")
.attr("y", 6)
.attr("dy", ".71em")
.style("text-anchor", "end")
.text("RTI");
// draw dots
svg.selectAll(".dot")
.data(data)
.enter().append("circle")
.attr("class", "dot")
.attr("r", 3.5)
.attr("cx", xMap)
.attr("cy", yMap)
.style("fill", function(d) { return color(cValue(d));})
.on("mouseover", function(d) {
tooltip.transition()
.duration(200)
.style("opacity", .9);
tooltip.html(d["Country"])
.style("left", (d3.event.pageX + 5) + "px")
.style("top", (d3.event.pageY - 28) + "px");
})
.on("mouseout", function(d) {
tooltip.transition()
.duration(500)
.style("opacity", 0);
});
// draw legend
var legend = svg.selectAll(".legend")
.data(color.domain())
.enter().append("g")
.attr("class", "legend")
.attr("transform", function(d, i) { return "translate(0," + i * 20 + ")"; });
// draw legend colored rectangles
legend.append("rect")
.attr("x", width - 18)
.attr("width", 18)
.attr("height", 18)
.style("fill", color);
// draw legend text
legend.append("text")
.attr("x", width - 24)
.attr("y", 9)
.attr("dy", ".35em")
.style("text-anchor", "end")
.text(function(d) { return d;})
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment