Bearloga has submitted this change and it was merged.
Change subject: Fix external dashboard bug
......................................................................
Fix external dashboard bug
This fixes the weird spike in data around the 17th, and
does so in a way that'll solve for future issues too.
Bug: T123991
Change-Id: I698f89e90d6e6ea2c58dc32566be0ae3ab989657
---
M utils.R
1 file changed, 7 insertions(+), 1 deletion(-)
Approvals:
Bearloga: Verified; Looks good to me, approved
diff --git a/utils.R b/utils.R
index 28413b7..d717e80 100644
--- a/utils.R
+++ b/utils.R
@@ -1,13 +1,19 @@
library(polloi)
library(data.table)
+library(dplyr)
# Read in the traffic data
read_traffic <- function() {
- # Read in the initial data and format.
+ # Read in the initial data.
data <- polloi::read_dataset(path = "external_traffic/referer_data.tsv") %>%
dplyr::rename(date = timestamp) %>%
as.data.table
+
+ # Deduplicate
+ data <- data[!duplicated(data[,1:(ncol(data) - 1), with=FALSE])]
+
+ # Format
data$is_search <- ifelse(data$is_search, "Referred by search", "Not referred
by search")
data$search_engine[data$search_engine == "None"] <- "Not referred by search"
--
To view, visit https://gerrit.wikimedia.org/r/264983
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I698f89e90d6e6ea2c58dc32566be0ae3ab989657
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/wonderbolt
Gerrit-Branch: master
Gerrit-Owner: OliverKeyes <[email protected]>
Gerrit-Reviewer: Bearloga <[email protected]>
Gerrit-Reviewer: OliverKeyes <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits