jofaichow commited on
Commit
bc2ed50
·
1 Parent(s): 5bde136

minor improvements in payout summary

Browse files
Files changed (1) hide show
  1. app/app.R +6 -6
app/app.R CHANGED
@@ -929,19 +929,19 @@ server <- function(input, output) {
929
  # ============================================================================
930
 
931
  output$payout_resolved <- renderValueBox({
932
- valueBox(value = paste(as.character(format(round(sum(react_d_filter()[resolved == T, ]$payout, na.rm = T), 1), nsmall = 1)), "NMR"),
933
  subtitle = "Total Payout (Resolved)",
934
  color = "olive")
935
  })
936
 
937
  output$payout_pending <- renderValueBox({
938
- valueBox(value = paste(as.character(format(round(sum(react_d_filter()[resolved == F, ]$payout, na.rm = T), 1), nsmall = 1)), "NMR"),
939
  subtitle = "Total Payout (Pending)",
940
  color = "yellow")
941
  })
942
 
943
  output$payout_total <- renderValueBox({
944
- valueBox(value = paste(as.character(format(round(sum(react_d_filter()$payout, na.rm = T), 1), nsmall = 1)), "NMR"),
945
  subtitle = "Total Payout (All)",
946
  color = "light-blue")
947
  })
@@ -953,21 +953,21 @@ server <- function(input, output) {
953
 
954
  output$payout_average_resolved <- renderValueBox({
955
  # Use rounds with stake > 0 only
956
- valueBox(value = paste(as.character(format(round(mean(react_d_payout_summary()[resolved == T & total_stake > 0, ]$net_payout, na.rm = T), 1), nsmall = 1)), "NMR"),
957
  subtitle = "Avg. Round Payout (Resolved)",
958
  color = "olive")
959
  })
960
 
961
  output$payout_average_pending <- renderValueBox({
962
  # Use rounds with stake > 0 only
963
- valueBox(value = paste(as.character(format(round(mean(react_d_payout_summary()[resolved == F & total_stake > 0, ]$net_payout, na.rm = T), 1), nsmall = 1)), "NMR"),
964
  subtitle = "Avg. Round Payout (Pending)",
965
  color = "yellow")
966
  })
967
 
968
  output$payout_average <- renderValueBox({
969
  # Use rounds with stake > 0 only
970
- valueBox(value = paste(as.character(format(round(mean(react_d_payout_summary()[total_stake > 0, ]$net_payout, na.rm = T), 1), nsmall = 1)), "NMR"),
971
  subtitle = "Avg. Round Payout (All)",
972
  color = "light-blue")
973
  })
 
929
  # ============================================================================
930
 
931
  output$payout_resolved <- renderValueBox({
932
+ valueBox(value = paste(as.character(format(round(sum(react_d_filter()[resolved == T, ]$payout, na.rm = T), 2), nsmall = 2)), "NMR"),
933
  subtitle = "Total Payout (Resolved)",
934
  color = "olive")
935
  })
936
 
937
  output$payout_pending <- renderValueBox({
938
+ valueBox(value = paste(as.character(format(round(sum(react_d_filter()[resolved == F, ]$payout, na.rm = T), 2), nsmall = 2)), "NMR"),
939
  subtitle = "Total Payout (Pending)",
940
  color = "yellow")
941
  })
942
 
943
  output$payout_total <- renderValueBox({
944
+ valueBox(value = paste(as.character(format(round(sum(react_d_filter()$payout, na.rm = T), 2), nsmall = 2)), "NMR"),
945
  subtitle = "Total Payout (All)",
946
  color = "light-blue")
947
  })
 
953
 
954
  output$payout_average_resolved <- renderValueBox({
955
  # Use rounds with stake > 0 only
956
+ valueBox(value = paste(as.character(format(round(mean(react_d_payout_summary()[resolved == T & total_stake > 0, ]$net_payout, na.rm = T), 2), nsmall = 2)), "NMR"),
957
  subtitle = "Avg. Round Payout (Resolved)",
958
  color = "olive")
959
  })
960
 
961
  output$payout_average_pending <- renderValueBox({
962
  # Use rounds with stake > 0 only
963
+ valueBox(value = paste(as.character(format(round(mean(react_d_payout_summary()[resolved == F & total_stake > 0, ]$net_payout, na.rm = T), 2), nsmall = 2)), "NMR"),
964
  subtitle = "Avg. Round Payout (Pending)",
965
  color = "yellow")
966
  })
967
 
968
  output$payout_average <- renderValueBox({
969
  # Use rounds with stake > 0 only
970
+ valueBox(value = paste(as.character(format(round(mean(react_d_payout_summary()[total_stake > 0, ]$net_payout, na.rm = T), 2), nsmall = 2)), "NMR"),
971
  subtitle = "Avg. Round Payout (All)",
972
  color = "light-blue")
973
  })