Analyze ETC blockchain utilization


#1

Ever wondered what people are using ETC for? Thanks to @Wizward and saturn.tools it’s now easy to tell.

library(ggplot2)
library(ggthemr)
library(dplyr)
library(tidyr)
library(httr)

ggthemr('fresh')

url <- 'https://saturn.tools/exp/explorer/txscore'
transactions <- GET(url) %>% content

lastupdated <- as.POSIXct(transactions$lastupdate, origin = '1970-01-01', tz = 'UTC')

month <- data.frame(
  minerpayouts = transactions$month$minerpayouts / transactions$month$total * 100,
  saturnnetwork = (transactions$month$saturn + transactions$month$gastoken + transactions$month$tokentransfers) / transactions$month$total * 100,
  binance = transactions$month$cex / transactions$month$total * 100
)
month$unknown = 100 - sum(unlist(month))

day <- data.frame(
  minerpayouts = transactions$day$minerpayouts / transactions$day$total * 100,
  saturnnetwork = (transactions$day$saturn + transactions$day$gastoken + transactions$day$tokentransfers) / transactions$day$total * 100,
  binance = transactions$day$cex / transactions$day$total * 100
)
day$unknown = 100 - sum(unlist(day))

all <- cbind(
  data.frame(timeperiod = as.factor(c("1 month", "1 day"))),
  rbind(month, day)
) %>% gather(key = "txtype", value = "txcount", -timeperiod, factor_key = TRUE)

p <- ggplot(all, aes(x=factor(1), y = txcount, fill = txtype)) +
  facet_wrap(~timeperiod) +
  geom_bar(stat = "identity") +
  coord_polar("y", start=0, direction = -1) +
  ylab("Transaction count") +
  xlab("") +
  ggtitle(paste0("Types of Transactions on $ETC network (c) saturn.tools\nCaptured at ", lastupdated, " UTC")) +
  theme(
    axis.ticks.y=element_blank(),
    axis.title.y=element_blank(),
    axis.text.y=element_blank(),
    axis.ticks.x=element_blank(),
    axis.text.x=element_blank()
  )

print(p)