mirror of
https://github.com/FlipsideCrypto/eth_activity.git
synced 2026-02-06 10:46:46 +00:00
remove commented code - accept major UI change
note: some defaults e.g., 'You' prior to data load need to be fixed
This commit is contained in:
parent
ec5e52c768
commit
2fe00f2e51
31
eoa/global.R
31
eoa/global.R
@ -86,30 +86,6 @@ plot_eoa <- function(eoadh = eoa_daily_history,
|
||||
|
||||
eoadh <- eoadh %>% group_by(eoa_bucket) %>%
|
||||
summarise(sum_eoa = sum(EOA_FREQ))
|
||||
|
||||
# if(is.null(user_bar)){
|
||||
#
|
||||
# eoa_plotly <- eoadh %>%
|
||||
# plot_ly(x = ~eoa_bucket,
|
||||
# y = ~sum_eoa/1e6,
|
||||
# color = I("#696286"),
|
||||
# type = "bar",
|
||||
# hoverinfo = 'text',
|
||||
# hovertext = ~paste0(
|
||||
# "Days Active: ", eoa_bucket,
|
||||
# "\nAddresses: ",
|
||||
# scales::label_comma(accuracy = 1)(sum_eoa)))
|
||||
#
|
||||
# urhere <- list(
|
||||
# x = 0,
|
||||
# y = 0,
|
||||
# text = "",
|
||||
# xref = "x",
|
||||
# yref = "y",
|
||||
# showarrow = FALSE
|
||||
# )
|
||||
#
|
||||
# } else {
|
||||
|
||||
eoadh$lab <- c("Others")
|
||||
eoadh$lab[eoadh$eoa_bucket == user_bar] <- "You"
|
||||
@ -135,8 +111,6 @@ plot_eoa <- function(eoadh = eoa_daily_history,
|
||||
yref = "y",
|
||||
showarrow = FALSE
|
||||
)
|
||||
# }
|
||||
|
||||
|
||||
eoa_plotly <-
|
||||
eoa_plotly %>%
|
||||
@ -198,9 +172,7 @@ plot_tx <- function(eoa_tx) {
|
||||
levels = c("MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"),
|
||||
labels = c("Mon", "Tues", "Wed", "Thurs", "Fri", "Sat", "Sun"))
|
||||
|
||||
|
||||
#colfunc <- colorRampPalette(c("#C8B1F2", "#696286"))
|
||||
colfunc <- colorRampPalette(c("#C8B1F2", "#4F4A59"))
|
||||
colfunc <- colorRampPalette(c("#C8B1F2", "#4F4A59"))
|
||||
|
||||
data[data$NUM_TX == 0,]$NUM_TX <- 0.01
|
||||
|
||||
@ -223,7 +195,6 @@ plot_tx <- function(eoa_tx) {
|
||||
color = "#423E75",
|
||||
line = list(width = 0, color = "#423E75")
|
||||
),
|
||||
#name = ~address_name,
|
||||
text = paste0(
|
||||
data$day,", ",
|
||||
data$date,
|
||||
|
||||
47
eoa/server.R
47
eoa/server.R
@ -20,8 +20,6 @@ shinyServer(function(input, output, session) {
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
eoa_stats <- reactive({
|
||||
eoa_activity <- list(
|
||||
"txn" = sum(results$table$NUM_TX),
|
||||
@ -36,51 +34,14 @@ shinyServer(function(input, output, session) {
|
||||
|
||||
|
||||
output$median_days <- renderText(ifelse(eoa_stats()$txn > 0, "<1 day", ""))
|
||||
|
||||
output$percentile <- renderText({
|
||||
round(
|
||||
100*(eoa_daily_history[eoa_daily_history$UNIQUE_DAYS == eoa_stats()$days, "eoa_cumprop"]),
|
||||
2)
|
||||
})
|
||||
|
||||
# output$title <- renderUI({
|
||||
#
|
||||
# da <- eoa_stats()$days
|
||||
#
|
||||
# percent <- {
|
||||
# round(
|
||||
# 100*(eoa_daily_history[eoa_daily_history$UNIQUE_DAYS == da, "eoa_cumprop"]),
|
||||
# 2)
|
||||
# }
|
||||
#
|
||||
# tagList(
|
||||
# div(class = 'chart-title', span(
|
||||
# paste0("You've shown up more than ", percent, "% of ETH users")
|
||||
# )))
|
||||
#
|
||||
# })
|
||||
|
||||
# output$compare <- renderUI({
|
||||
# tagList(
|
||||
# lapply(names(eoa_stats()),
|
||||
# FUN = function(x){card_eoa(eoa_stats()[[x]], x)})
|
||||
# )
|
||||
# })
|
||||
|
||||
# plot_ <- reactive({
|
||||
#
|
||||
# if(input$submit == 0){
|
||||
# plot_eoa(eoadh = eoa_daily_history)
|
||||
#
|
||||
# } else {
|
||||
#
|
||||
# x = cut(as.numeric(eoa_stats()[["Days Active"]]),
|
||||
# breaks = c(0, 1,10,100,1000, Inf),
|
||||
# labels = c("1","2-10","11-100","101-1000","1001+"))
|
||||
#
|
||||
# plot_eoa(eoadh = eoa_daily_history, x)
|
||||
# }
|
||||
# })
|
||||
|
||||
|
||||
output$main_plot <- renderPlotly({
|
||||
x = cut(as.numeric(eoa_stats()$txn),
|
||||
breaks = c(0, 1,10,100,1000, Inf),
|
||||
@ -90,8 +51,4 @@ shinyServer(function(input, output, session) {
|
||||
|
||||
output$heatmap <- renderPlotly(plot_tx(results$table))
|
||||
|
||||
# output$heatmap <- renderUI({
|
||||
# renderPlotly(plot_tx(results()))
|
||||
# })
|
||||
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user