mirror of
https://gitlab.com/Anson-Projects/projects.git
synced 2025-08-02 19:41:38 +00:00
where I left off last night
This commit is contained in:
@@ -29,7 +29,6 @@ Band Protocol (BAND) 5
|
||||
Basic Attention Token (BAT) 5
|
||||
Bifrost (BNC) 4
|
||||
Bitcoin (BTC) 40
|
||||
Bitcoin Cash (BCH) 150
|
||||
Cardano (ADA) 10
|
||||
Cartesi (CTSI) 5
|
||||
Chainlink (LINK) 5
|
||||
@@ -48,7 +47,6 @@ Enjin Coin (ENJ) 5
|
||||
Enzyme Finance (MLN) 5
|
||||
EOS (EOS) 0
|
||||
Ethereum (ETH) 5
|
||||
Filecoin (FIL) 100
|
||||
Flow (FLOW) 1
|
||||
Gnosis (GNO) 5
|
||||
ICON (ICX) 0
|
||||
@@ -112,7 +110,9 @@ df.symbol = [split(split(sym, "(")[end], ")")[1] |> lowercase for sym in df.cryp
|
||||
coins = HTTP.get("https://api.coingecko.com/api/v3/coins/list").body |>
|
||||
StringView |> JSON.parse .|> DataFrame |> x -> vcat(x...)
|
||||
|
||||
coins = unique(coins, :symbol);
|
||||
coins = coins[coins.id.!="xeno-token", :]
|
||||
|
||||
coins = unique(coins[end:-1:1, :], :symbol);
|
||||
|
||||
df = innerjoin(df, coins, on = :symbol)
|
||||
|
||||
@@ -133,12 +133,11 @@ let
|
||||
annotate!(45, 975, "Bitcoin")
|
||||
annotate!(-1, 1000, text("Prices as of: $(today())", :left, 8))
|
||||
|
||||
savefig("caps.svg")
|
||||
# savefig("caps.svg")
|
||||
end
|
||||
|
||||
fast = df[df.confirmationMinutes.==0, :]
|
||||
|
||||
fast.logcap = log2.(fast.mktcap)
|
||||
|
||||
cats = [
|
||||
"cosmos" "Parachain"
|
||||
@@ -148,8 +147,9 @@ cats = [
|
||||
"oxygen" "DeFi"
|
||||
"raydium" "DeFi"
|
||||
"serum" "DeFi"
|
||||
# "solana" "Smart Contract" # Only smart contract and market cap is way too high
|
||||
"solana" "Smart Contract" # Only smart contract and market cap is way too high
|
||||
"stellar" "Parachain"
|
||||
"ripple" "Currency"
|
||||
] |> x -> DataFrame(x, [:id, :category])
|
||||
|
||||
fast = innerjoin(cats, fast, on = :id)
|
||||
@@ -161,10 +161,17 @@ let
|
||||
group = :category,
|
||||
xrotation = 15,
|
||||
legend = :topleft,
|
||||
fillcolor = [jlc.blue jlc.green jlc.purple],
|
||||
# yaxis = :log10
|
||||
# fillcolor = [jlc.blue jlc.green jlc.purple jlc.red],
|
||||
)
|
||||
|
||||
title!("Market Caps of Fast Coins")
|
||||
ylabel!("Market Cap (Billions USD)")
|
||||
savefig("fast.svg")
|
||||
end
|
||||
# savefig("fast.svg")
|
||||
end
|
||||
|
||||
currency = fast[fast.category.=="Currency", :]
|
||||
|
||||
@df currency pie(:cryptocurrency, :mktcap, title = "Market Cap")
|
||||
|
||||
currency
|
Reference in New Issue
Block a user