[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-web/release] Remove two unused R files from censorship detector.



commit c0a18aab9092c57f107732cb2f97f034909e94d9
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Thu Dec 20 14:09:24 2018 +0100

    Remove two unused R files from censorship detector.
    
    Still part of #21588.
---
 src/main/R/clients/merge-clients.R      | 19 -------------------
 src/main/R/clients/userstats-detector.R | 18 ------------------
 2 files changed, 37 deletions(-)

diff --git a/src/main/R/clients/merge-clients.R b/src/main/R/clients/merge-clients.R
deleted file mode 100644
index cce7e9d..0000000
--- a/src/main/R/clients/merge-clients.R
+++ /dev/null
@@ -1,19 +0,0 @@
-require(reshape)
-r <- read.csv("userstats-ranges.csv", stringsAsFactors = FALSE)
-r <- melt(r, id.vars = c("date", "country"))
-r <- data.frame(date = r$date, node = "relay", country = r$country,
-  transport = "", version = "",
-  variable = ifelse(r$variable == "maxusers", "upper", "lower"),
-  value = floor(r$value))
-u <- read.csv("userstats.csv", stringsAsFactors = FALSE)
-u <- melt(u, id.vars = c("date", "node", "country", "transport",
-  "version"))
-u <- data.frame(date = u$date, node = u$node, country = u$country,
-  transport = u$transport, version = u$version,
-  variable = ifelse(u$variable == "frac", "frac", "clients"),
-  value = u$value)
-c <- rbind(r, u)
-c <- cast(c, date + node + country + transport + version ~ variable)
-c <- c[order(as.Date(c$date), c$node, c$country, c$transport, c$version), ]
-write.csv(c, "clients.csv", quote = FALSE, row.names = FALSE, na = "")
-
diff --git a/src/main/R/clients/userstats-detector.R b/src/main/R/clients/userstats-detector.R
deleted file mode 100644
index c3a9041..0000000
--- a/src/main/R/clients/userstats-detector.R
+++ /dev/null
@@ -1,18 +0,0 @@
-library("reshape")
-export_userstats_detector <- function(path) {
-  c <- read.csv("userstats.csv", stringsAsFactors = FALSE)
-  c <- c[c$country != '' & c$transport == '' & c$version == '' &
-         c$node == 'relay', ]
-  u <- data.frame(country = c$country, date = c$date, users = c$users,
-                  stringsAsFactors = FALSE)
-  u <- rbind(u, data.frame(country = "zy",
-                aggregate(list(users = u$users),
-                          by = list(date = u$date), sum)))
-  u <- data.frame(date = u$date, country = u$country,
-                  users = floor(u$users))
-  u <- cast(u, date ~ country, value = "users")
-  names(u)[names(u) == "zy"] <- "all"
-  write.csv(u, path, quote = FALSE, row.names = FALSE)
-}
-export_userstats_detector("userstats-detector.csv")
-



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits