{"id":131,"date":"2021-02-26T14:39:49","date_gmt":"2021-02-26T14:39:49","guid":{"rendered":"https:\/\/streetmindfood.com\/plutohash\/?p=131"},"modified":"2021-04-25T20:09:56","modified_gmt":"2021-04-25T20:09:56","slug":"daily-average-fee-by-year-in-usd","status":"publish","type":"post","link":"http:\/\/www.plutohash.com\/2021\/02\/26\/daily-average-fee-by-year-in-usd\/","title":{"rendered":"Daily average Fee by year in USD"},"content":{"rendered":"\n
In this post we’ll see how it’s possible, with just a few lines in Python, to analyze how the average daily cost of fees changes over time, from one year to the next but also from one month to the next. As a reminder, we are analyzing the bitcoin blockchain.<\/p>\n\n\n\n
Let’s start by importing the libraries.<\/p>\n\n\n\n
import blocksci\nimport pandas as pd\nimport seaborn\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker\nimport collections\nimport numpy as np\n%matplotlib notebook<\/code><\/pre>\n\n\n\n
We use the fees_by_year()<\/code> function to define the year of interest and then be able to apply it to different years. This is the code:<\/p>\n\n\n\n
From the chart we can see that the average fee per transaction in 2019 has remained essentially stable. On the other hand, if we look at 2017, there has been a noticeable increase in the last few months. The reason for this is easy to guess, because as we know there was a significant growth in the popularity of bitcoin in 2017, this meant more purchases and an increase in competition for transaction validation. As we can see something similar happened in the last months of 2020.<\/p>\n\n\n\n
Would you like to analyze the bitcoin blockchain using Python?<\/p>\n\n\n\n