Chelsyx has submitted this change and it was merged.

Change subject: Ungroup last_action_country and first_visits_country
......................................................................


Ungroup last_action_country and first_visits_country

I checked the function wmf::rewrite_conditional and sink file run.Rout at 
/a/discovery/golden, but couldn't find anything suspicious... Since 
most_common_country got no problem when updated, and "ungroup()" seems to be 
the main difference between it and the other two, I made this change to test if 
it can fix the bug. But I'm not sure why...

Bug: T146422
Change-Id: I914bb0a42afd5de0ec52fa1bfb6beb8067aa500b
---
M portal/portal.R
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Chelsyx: Verified; Looks good to me, approved



diff --git a/portal/portal.R b/portal/portal.R
index f5ae958..ec73cbf 100644
--- a/portal/portal.R
+++ b/portal/portal.R
@@ -153,7 +153,8 @@
     dplyr::filter(!duplicated(session, fromLast = TRUE)) %>%
     dplyr::group_by(date, section_used, country) %>%
     dplyr::summarize(events = n()) %>%
-    dplyr::mutate(proportion = round(events/sum(events), 4))
+    dplyr::mutate(proportion = round(events/sum(events), 4)) %>%
+    dplyr::ungroup()
 
   # Most common section clicked by country
   most_common_country <- data_w_countryname %>%
@@ -178,7 +179,8 @@
     dplyr::filter(visit == 1) %>%
     dplyr::group_by(date, section_used, country) %>%
     dplyr::summarize(sessions = n()) %>%
-    dplyr::mutate(proportion = round(sessions/sum(sessions), 4))
+    dplyr::mutate(proportion = round(sessions/sum(sessions), 4)) %>%
+    dplyr::ungroup()
 
   # Get user agent data
   wmf::set_proxies() # To allow for the latest YAML to be retrieved.

-- 
To view, visit https://gerrit.wikimedia.org/r/312440
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I914bb0a42afd5de0ec52fa1bfb6beb8067aa500b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Chelsyx <c...@wikimedia.org>
Gerrit-Reviewer: Chelsyx <c...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to