UI changes

This commit is contained in:
Carlos R. Mercado 2022-08-23 15:38:48 -04:00
parent 3b23f22fcd
commit efb7bff76f
3 changed files with 31 additions and 5 deletions

View File

@ -76,7 +76,9 @@ get_tx_by_day <- function(eoa_address, api_key = api_key, ttl = 0){
}
plot_eoa <- function(eoadh = eoa_daily_history, user_bar = NULL){
plot_eoa <- function(eoadh = eoa_daily_history,
user_bar = NULL,
title = "ETH Accounts by their Historic Days Active"){
eoadh <- eoadh %>% group_by(eoa_bucket) %>%
summarise(sum_eoa = sum(EOA_FREQ))
@ -113,7 +115,7 @@ plot_eoa <- function(eoadh = eoa_daily_history, user_bar = NULL){
eoa_plotly <- eoa_plotly %>%
layout(title = "ETH Accounts by their Historic Days Active",
layout(title = title,
font = list(
family = "Inter",
color = 'white'),

View File

@ -32,6 +32,23 @@ shinyServer(function(input, output, session) {
})
output$title <- renderUI({
da <- eoa_stats()[["Days Active"]]
percent <- {
round(
100*(1 - eoa_daily_history[eoa_daily_history$UNIQUE_DAYS == da, "eoa_cumprop"]),
2)
}
tagList(
div(class = 'chart-title', span(
paste0("You are in the top ", percent, "% of ETH users for Days Active!")
)))
})
output$compare <- renderUI({
tagList(
lapply(names(eoa_stats()),

View File

@ -66,8 +66,10 @@ shinyUI(fluidPage(
class = 'chart-container',
div(
class = 'chart-block',
div(class = 'chart-title', span('Your ETH Activity')),
div(class = 'chart',
conditionalPanel("input.submit > 0",
uiOutput('title')
),
fluidRow(
column(3,
conditionalPanel("input.submit > 0",
@ -81,6 +83,7 @@ shinyUI(fluidPage(
)
)
),
br(),
plotlyOutput("main_plot")
)
)
@ -88,10 +91,14 @@ shinyUI(fluidPage(
div(class = "about",
h3("About"),
br(),
p("Built w/ ❤️ by the team and community at Flipside Crypto."),
HTML(
paste0(
"Built w/ ❤️ by the team at Flipside Crypto. Powered by ",
"<u><a href = 'https://sdk.flipsidecrypto.xyz/shroomdk'>ShroomDK</a></u>"
)),
p("Have a feature request, or want to build using Flipside's free data?"),
HTML(
paste0("Join us in ","<u><a href = 'https://flipside.com/discord'>Discord</a><u>")
paste0("Join us in ","<u><a href = 'https://flipside.com/discord'>Discord</a></u>")
)
)