mirror of
https://github.com/FlipsideCrypto/user_metrics.git
synced 2026-02-06 11:17:49 +00:00
final solarscored updates before first launch
This commit is contained in:
parent
7219388ba0
commit
6899ebbec7
@ -70,9 +70,9 @@ fluidPage(
|
||||
withSpinner(hide.ui = FALSE, color = "#9945FF", size = 2)),
|
||||
a(id = "pic",
|
||||
capture::capture(
|
||||
selector = "svg",
|
||||
selector = "#wheelpart",
|
||||
filename = "mysolarscore.png",
|
||||
options = list(bgcolor = "#FFF"),
|
||||
options = list(backgroundColor = "#FFF"),
|
||||
#scale = 2,
|
||||
img(src = "camera.svg", height = "20"),
|
||||
onclick = "rudderstack.track('solarscored-camera')",
|
||||
@ -92,7 +92,8 @@ fluidPage(
|
||||
div(class = "score", textOutput("userscore")),
|
||||
div(class = "yourscore", "SolarScore")),
|
||||
bsTooltip(id = "totalscore",
|
||||
title = "Your total score out of a possible 21 points, up to 3 for each of the 7 categories.",
|
||||
title = paste0("Your total score out of a possible 21 points, up to 3 for each of the 7 categories. ",
|
||||
last.blocks),
|
||||
placement = "top", trigger = "hover"),
|
||||
|
||||
fluidRow(class = "metricrow",
|
||||
@ -149,6 +150,7 @@ fluidPage(
|
||||
),
|
||||
div(id = "hovernote", "Hover over Metric for Details"),
|
||||
),
|
||||
br(),
|
||||
div(id = "botrightbox",
|
||||
div(class = "boxtitle", "Download All Scores"),
|
||||
div(id = "indent", "Select Addresses by Score:"),
|
||||
|
||||
@ -64,7 +64,6 @@ sol.long.act[, longevity := sapply(longevity_value, long.func) ]
|
||||
sol.long.act[, activity := sapply(activity_value, activity.func) ]
|
||||
|
||||
|
||||
|
||||
# GOVERNANCE
|
||||
gov.query <- "
|
||||
SELECT voter AS user_address
|
||||
@ -88,6 +87,7 @@ gov.func <- function(x) {
|
||||
sol.gov[, governance := sapply(governance_value, gov.func) ]
|
||||
|
||||
|
||||
|
||||
# Bridgor - How many times are they bridging assets onto Solana (from a bridge or CEX)?
|
||||
bridge.query <- "
|
||||
WITH tx AS (
|
||||
@ -167,7 +167,6 @@ var.func <- function(x) {
|
||||
}
|
||||
sol.variety[, variety := sapply(variety_value, var.func) ]
|
||||
|
||||
|
||||
# nfts
|
||||
mints.query <- "
|
||||
WITH buys AS (
|
||||
@ -251,11 +250,75 @@ full.data <- full.data[bridge_value < 24*90]
|
||||
|
||||
df <- full.data
|
||||
|
||||
#get min max timestamp for all data:
|
||||
|
||||
max.blocks <- QuerySnowflake(
|
||||
"
|
||||
SELECT
|
||||
max(block_id) AS max_block,
|
||||
max(block_timestamp) AS max_time,
|
||||
'transactions' AS table_name
|
||||
FROM solana.core.fact_transactions
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
max(block_id) AS max_block,
|
||||
max(block_timestamp) AS max_time,
|
||||
'proposal_votes' AS table_name
|
||||
FROM solana.core.fact_proposal_votes
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
max(block_id) AS max_block,
|
||||
max(block_timestamp) AS max_time,
|
||||
'events' AS table_name
|
||||
FROM solana.core.fact_events
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
max(block_id) AS max_block,
|
||||
max(block_timestamp) AS max_time,
|
||||
'transfers' AS table_name
|
||||
FROM solana.core.fact_transfers
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
max(block_id) AS max_block,
|
||||
max(block_timestamp) AS max_time,
|
||||
'staking_lp_actions' AS table_name
|
||||
FROM solana.core.ez_staking_lp_actions
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
max(block_id) AS max_block,
|
||||
max(block_timestamp) AS max_time,
|
||||
'nft_mints' AS table_name
|
||||
FROM solana.core.fact_nft_mints
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
max(block_id) AS max_block,
|
||||
max(block_timestamp) AS max_time,
|
||||
'nft_sales' AS table_name
|
||||
FROM solana.core.fact_nft_sales
|
||||
")
|
||||
|
||||
|
||||
last.blocks <- paste0("Data is updated through ", min(max.blocks$max_time),
|
||||
", block number ", min(max.blocks$max_block))
|
||||
|
||||
|
||||
file.location <- ifelse(
|
||||
isRstudio
|
||||
, '/rstudio-data/solarscored_data.RData'
|
||||
, '~/user_metrics/apps/solana/solarscored/solarscored_data.RData'
|
||||
)
|
||||
|
||||
save(df, file = file.location)
|
||||
save(df, last.blocks, file = file.location)
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
body {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
background: url('background.svg') no-repeat center center fixed;
|
||||
-webkit-background-size: cover;
|
||||
-moz-background-size: cover;
|
||||
@ -123,24 +123,24 @@ a[title]:hover::after {
|
||||
border-radius: 8px;
|
||||
padding: 3px;
|
||||
background-color: #ffffff99;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 10px;
|
||||
margin-top: 28px;
|
||||
padding-top: 25px;
|
||||
padding-bottom: 25px;
|
||||
margin-top: 50px;
|
||||
}
|
||||
#botrightbox {
|
||||
border: 2px #E2E4F7 solid;
|
||||
border-radius: 8px;
|
||||
padding: 3px;
|
||||
background-color: #ffffff99;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 25px;
|
||||
padding-bottom: 25px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
svg {
|
||||
max-height: 485px;
|
||||
max-width: 90%;
|
||||
margin: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user