{"id":5,"date":"2011-09-10T19:17:06","date_gmt":"2011-09-10T19:17:06","guid":{"rendered":"http:\/\/41j.com\/blog\/?p=5"},"modified":"2011-09-28T16:03:18","modified_gmt":"2011-09-28T16:03:18","slug":"the-distribution-of-bitcoin-users","status":"publish","type":"post","link":"https:\/\/41j.com\/blog\/2011\/09\/the-distribution-of-bitcoin-users\/","title":{"rendered":"The Distribution of Bitcoin users"},"content":{"rendered":"<p>I wanted to get an idea of the distribution of bitcoin clients throughout the world. While bitcoin is a distributed network clients current connect to a central IRC channel to find initial peers. I connected an IRC client to the channel and monitored connections for a couple of days. I then ran the results through a geoip lookup tool.<\/p>\n<p>The 10 countries with the most bitcoin clients are:<\/p>\n<table border=\"1\">\n<tr>\n<td>Position<\/td>\n<td>Count<\/td>\n<td>Country<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>2769<\/td>\n<td>US, United States<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>868<\/td>\n<td>DE, Germany<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>518<\/td>\n<td>RU, Russian Federation<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>478<\/td>\n<td>GB, United Kingdom<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>368<\/td>\n<td>CA, Canada<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>332<\/td>\n<td>PL, Poland<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>227<\/td>\n<td>CN, China<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>227<\/td>\n<td>AU, Australia<\/td>\n<\/tr>\n<tr>\n<td>9<\/td>\n<td>179<\/td>\n<td>SE, Sweden<\/td>\n<\/tr>\n<tr>\n<td>10<\/td>\n<td>171<\/td>\n<td>UA, Ukraine<\/td>\n<\/tr>\n<\/table>\n<p>I was slightly surprised to see that the US was so far ahead to everyone else. Also to find that Japan was so far down the list, considering the technology is said to have originated there, and that the largest bitcoin exchange is hosted there.<\/p>\n<h2>Notes<\/h2>\n<p>The irc log file contains lines which look like this:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n10:25 -!- u4qBM3jsFJbVbpo &#x5B;u4qBM3jsFJ@c-68-46-236-193.hsd1.fl.comcast.net] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:25 -!- u5R1WUESwqDJAH4 &#x5B;u5R1WUESwq@host-78-144-186-235.as13285.net] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:25 -!- uCj5PhnxQtuXvRE &#x5B;uCj5PhnxQt@208.180.143.71] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:25 -!- u5vMMajjqPPNxqT &#x5B;x895457775@p5791EE2F.dip.t-dialin.net] has joined #bitcoin\r\n10:25 -!- uDEdr5uhnbT2e4f &#x5B;uBo8KV3CtM@217.198.214.132] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:26 -!- uAiz7fBo8XnZZ1i &#x5B;x667997331@173-20-36-177.client.mchsi.com] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:26 -!- u5jSfdNqpwjJ9eV &#x5B;x988978976@dslb-084-056-239-104.pools.arcor-ip.net] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:26 -!- u7LamexRgFDoHdu &#x5B;x313154898@112.206.61.106] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:26 -!- u69NdViycJWVKYm &#x5B;x330853706@91.144.248.161] has joined #bitcoin\r\n10:26 -!- u4W2ih7yRg7TH72 &#x5B;x108114699@cs78140135.pp.htv.fi] has joined #bitcoin\r\n10:26 -!- uB2dfUQ2HC94KkT &#x5B;x123481046@178.126.145.180] has joined #bitcoin\r\n10:26 -!- u6NXdjDMZoatVNi &#x5B;uBpn2daN5n@95.154.123.102] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:26 -!- uBrRc777VmroaKp &#x5B;x240748133@193.41.62.121] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:26 -!- u7yETCjt7iCtDL1 &#x5B;u7yESyN1VP@124.13.137.118] has joined #bitcoin\r\n10:26 -!- u6M6WhB6r7ucQTM &#x5B;u6M6WhB6r7@apn-77-114-127-153.dynamic.gprs.plus.pl] has quit &#x5B;Ping timeout: 600 seconds]\r\n10:26 -!- u6DPECS8Ti8uSkD &#x5B;u6DPJvLqgS@port-92-204-8-68.dynamic.qsc.de] has joined #bitcoin\r\n10:26 -!- u5Dp18HMdzYBwjs &#x5B;uLT6ynRagq@75-32-244-171.lightspeed.rbrnca.sbcglobal.net] has quit &#x5B;Ping timeout: 600 seconds]\r\n<\/pre>\n<p>I used the following procedure to extract the lines containing the joins and perform the geoip lookups and counts. I only used unique addresses. The GeoIP database was from MaxMind and the database was updated on the 9th of September.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ngrep join irc.log &gt; bitcoin.joins\r\n... I then lazily replaced all the ]s with @s in the file bitcoin.joins\r\nawk 'BEGIN{FS=&quot;@&quot;;}{print $2}' bitcoin.join &gt; bitcoin.addrs\r\nawk '{print &quot;geoiplookup &quot; $0}' bitcoin.addrs | sort | uniq | sh &gt; bitcoin.countries.1\r\ncat bitcoin.countries.1 | awk 'BEGIN{FS=&quot;:&quot;}{print $2}' | sort | uniq -c | sort -k 1 -n -r &gt; bitcoin.cntcount\r\n<\/pre>\n<p>The full breakdown of countries is as follows:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n   2769  US, United States\r\n    868  DE, Germany\r\n    518  RU, Russian Federation\r\n    478  GB, United Kingdom\r\n    368  CA, Canada\r\n    332  PL, Poland\r\n    227  CN, China\r\n    227  AU, Australia\r\n    179  SE, Sweden\r\n    171  UA, Ukraine\r\n    160  NL, Netherlands\r\n    143  FR, France\r\n    109  IT, Italy\r\n     95  DK, Denmark\r\n     95  AR, Argentina\r\n     90  FI, Finland\r\n     85  BR, Brazil\r\n     82  RO, Romania\r\n     72  ES, Spain\r\n     72  AT, Austria\r\n     71  CH, Switzerland\r\n     64  ZA, South Africa\r\n     59  MX, Mexico\r\n     56  --, N\/A\r\n     48  IE, Ireland\r\n     48  CZ, Czech Republic\r\n     45  IL, Israel\r\n     44  BE, Belgium\r\n     43  NZ, New Zealand\r\n     42  CO, Colombia\r\n     41  NO, Norway\r\n     35  IN, India\r\n     27  SG, Singapore\r\n     27  RS, Serbia\r\n     27  BG, Bulgaria\r\n     26  BY, Belarus\r\n     24  TW, Taiwan\r\n     20  TH, Thailand\r\n     20  CL, Chile\r\n     18  SI, Slovenia\r\n     17  KZ, Kazakhstan\r\n     17  JP, Japan\r\n     17  HU, Hungary\r\n     16  PT, Portugal\r\n     16  GR, Greece\r\n     15  PH, Philippines\r\n     14  SK, Slovakia\r\n     14  LT, Lithuania\r\n     13  LV, Latvia\r\n     12  MD, Moldova, Republic of\r\n     12  HK, Hong Kong\r\n     11  SA, Saudi Arabia\r\n     11  MY, Malaysia\r\n     10  MA, Morocco\r\n     10  BA, Bosnia and Herzegovina\r\n      9  HR, Croatia\r\n      8  VN, Vietnam\r\n      8  DO, Dominican Republic\r\n      7  PE, Peru\r\n      7  KR, Korea, Republic of\r\n      7  A1, Anonymous Proxy\r\n      6  VE, Venezuela\r\n      6  IS, Iceland\r\n      6  ID, Indonesia\r\n      6  EC, Ecuador\r\n      6  AE, United Arab Emirates\r\n      5  PG, Papua New Guinea\r\n      5  IR, Iran, Islamic Republic of\r\n      4  TT, Trinidad and Tobago\r\n      4  LK, Sri Lanka\r\n      4  HN, Honduras\r\n      4  EG, Egypt\r\n      4  EE, Estonia\r\n      4  BS, Bahamas\r\n      3  UY, Uruguay\r\n      3  TR, Turkey\r\n      3  PA, Panama\r\n      3  MK, Macedonia\r\n      3  LU, Luxembourg\r\n      3  JM, Jamaica\r\n      3  JE, Jersey\r\n      3  CR, Costa Rica\r\n      3  BO, Bolivia\r\n      2  ZM, Zambia\r\n      2  TN, Tunisia\r\n      2  MT, Malta\r\n      2  LB, Lebanon\r\n      2  ET, Ethiopia\r\n      2  DZ, Algeria\r\n      1  TZ, Tanzania, United Republic of\r\n      1  SY, Syrian Arab Republic\r\n      1  QA, Qatar\r\n      1  PY, Paraguay\r\n      1  PR, Puerto Rico\r\n      1  PK, Pakistan\r\n      1  OM, Oman\r\n      1  MN, Mongolia\r\n      1  KE, Kenya\r\n      1  JO, Jordan\r\n      1  GY, Guyana\r\n      1  GU, Guam\r\n      1  GT, Guatemala\r\n      1  GI, Gibraltar\r\n      1  CI, Cote D'Ivoire\r\n      1  BN, Brunei Darussalam\r\n      1  BB, Barbados\r\n      1  AZ, Azerbaijan\r\n      1  AL, Albania\r\n      1  AG, Antigua and Barbuda\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to get an idea of the distribution of bitcoin clients throughout the world. While bitcoin is a distributed network clients current connect to a central IRC channel to find initial peers. I connected an IRC client to the channel and monitored connections for a couple of days. I then ran the results through [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1RRoU-5","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":25,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":211,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions\/211"}],"wp:attachment":[{"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/41j.com\/blog\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}