10 years of Bitcoin

Valerio Vaccaro
Jan 2 · 3 min read

Dataset

./bitcoin-iterate --block='%bN %bs %bc %bl %bn' > blocks.csv
library(readr)
library(ggplot2)
dataset <- read_table2("blocks.csv", col_names = FALSE)
names(dataset) <- c("block_id", "timestamp", "transactions", "size", "nonce")
dataset$timestamp <- as.POSIXct(dataset$timestamp, origin = "1970-1-1")
dataset$transactions <- as.numeric(dataset$transactions)
dataset$size <- as.numeric(dataset$size)
dataset$nonce <- as.numeric(dataset$nonce)
dataset$delta <- c(0,tail(dataset$timestamp, -1) - head(dataset$timestamp, -1)) / 60

Block delay

delta <- ggplot(dataset, aes(x=timestamp, y=delta, color=transactions)) +
geom_point(alpha=0.01, size=1) +
geom_hline(yintercept = 10) +
geom_smooth() +
scale_y_log10() +
scale_color_gradientn(colours = rainbow(50)) +
ggtitle("Time between blocks - 10 years") +
labs(y="Time [m]", x="Date")
ggsave(filename="delta.png", plot=delta, width = 15, height = 10)

Block size

size <- ggplot(dataset, aes(x=timestamp, y=size, color=transactions)) +
geom_point(alpha=0.01, size=1) +
geom_hline(yintercept = 1000*1000) +
scale_color_gradientn(colours = rainbow(50)) +
ggtitle("Block sizes - 10 years") +
labs(y="Size [B]", x="Date")
ggsave(filename="size.png", plot=size, width = 15, height = 10)

Nonce

size <- ggplot(dataset, aes(x=timestamp, y=nonce, color=transactions)) +
geom_point(alpha=0.05, size=1) +
geom_hline(yintercept = 1000*1000) +
scale_color_gradientn(colours = rainbow(50)) +
ggtitle("Block nonce - 10 years") +
labs(y="nonce", x="Date")
ggsave(filename="nonce.png", plot=size, width = 15, height = 10)

Valerio Vaccaro

Written by

Engineer, Bitcoiner, Data Scientist, IoT Expert and Tech Enthusiast. Co-founder of @scamcoinbot. Dad of @otsproofbot.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade