# Last edited on 2016-10-31 10:22:47 by stolfilocal BLOCKCHAIN-DERIVED DATA Obtained some data files from "https://blockchain.info/charts" ndate="2015-06-29" # Date used in file names. fdate="2015-06-29" # Last reliable entry in the files. # 2009-01-03--${ndate}-unique-bitcoin-addresses.csv # Number Of Unique Bitcoin Addresses Used # "A chart of the number of unique bitcoin addresses used per day." # # 2009-01-03--${ndate}-avg-trans-per-block.csv # Number of transactions per block # "A chart of the average number of transactions per block." # # 2009-01-03--${ndate}-transaction-cost.csv # Cost Per Transaction # "A chart showing miners revenue divided by the number of transactions." # # 2009-01-03--${ndate}-cost-as-pct-of-volume.csv # Cost % of transaction volume # "A chart showing miners revenue as as percentage of the transaction volume." # # 2009-01-03--${ndate}-trans-fees-btc.csv # Total Transaction Fees # "A charts showing the total BTC value of transaction fees miners earn per day." # # 2009-01-03--${ndate}-transactions-per-day.csv # Number Of Transactions # "A chart of the total number of unique bitcoin transactions per day." # # 2009-01-03--${ndate}-output-volume.csv # Total Output Volume # "The total value of all transaction outputs per day. This includes # coins which were returned to the sender as change." # # 2009-01-03--${ndate}-estimated-trasaction-volume.csv # Estimated Transaction Volume # "Similar to the total output volume with the addition of # an algorithm which attempts to remove change from the total value. This # may be a more accurate reflection of the true transaction volume." # # 2009-01-03--${ndate}-network-hash-rate.csv # Hash Rate # The estimated number of giga hashes per second # (billions of hashes per second) the bitcoin network is performing. # # 2009-01-03--${ndate}-bitcoins-created-cumul.csv # Bitcoins in circulation # The total number of bitcoins that have already been mined; in # other words, the current supply of bitcoins on the network. # At some point, blockchain.info changed the date format # from "%d/%m/%Y 18:15:05" to "%Y-%m-%d 00:00:00" even though # the values were apparently the same. CLEANUP # Converting the CSV format to cleaner text: cleanup_all_blockchain_csv_files.sh "${ndate}" "${fdate}" DERIVED DATA # Computing the number of coins mined per day: cat txt/2009-01-03--${fdate}-bitcoins-created-cumul.txt \ | gawk \ ' BEGIN{ onc = 0; } /^20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { dt = $1; tm = $2; nc = $3; printf "%s %s %20.2f\n", dt, tm, nc - onc; onc = nc; next; } // { printf "** bad format [[%s]]\n", $0; } ' \ > txt-der/2009-01-03--${fdate}-bitcoins-mined.txt # Computing the number new mywallet users per day: cat txt/2009-01-03--${fdate}-mywallet-users.txt \ | gawk \ ' BEGIN{ onu = 0; } /^20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { dt = $1; tm = $2; nu = $3; printf "%s %s %18d\n", dt, tm, nu - onu; onu = nu; next; } // { printf "** bad format [[%s]]\n", $0; } ' \ > txt-der/2009-01-03--${fdate}-mywallet-new-users.txt plot_mywallet_new_users.sh \ "Blockchain.Info MtWallet new users per day" \ "${fdate}" "2014-03-01" "2015-07-30" # Computing the average cost per block (while Blockchain.info does not provide it directly): join -a 1 -a 2 -j 1 -e '-1' -o 0,1.2,1.3,2.3 \ txt/2009-01-03--${fdate}-avg-trans-per-block.txt \ txt/2009-01-03--${fdate}-transaction-cost.txt \ | gawk \ ' BEGIN { } /^20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { dt = $1; tm = $2; atb = $3; tc = $4; printf "%s %s %18.2f\n", dt, tm, tc*atb; next; } // { printf "** bad format [[%s]]\n", $0; } ' \ > txt-der/2009-01-03--${fdate}-avg-block-cost.txt