[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: SRP visit times additional fixes

2017-08-31 Thread Chelsyx (Code Review)
Chelsyx has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/375057 )

Change subject: SRP visit times additional fixes
..


SRP visit times additional fixes

Bug: T170468
Change-Id: I8758a3559e8ca6ad5713afec171bbdeca29f4dc3
---
M modules/page_visit_times.R
M tab_documentation/srp_surv.md
M ui.R
3 files changed, 25 insertions(+), 18 deletions(-)

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



diff --git a/modules/page_visit_times.R b/modules/page_visit_times.R
index d312fcc..1321dd6 100644
--- a/modules/page_visit_times.R
+++ b/modules/page_visit_times.R
@@ -1,12 +1,13 @@
 output$lethal_dose_plot <- renderDygraph({
   req(length(input$filter_lethal_dose_plot) > 0)
   user_page_visit_dataset[, c("date", input$filter_lethal_dose_plot)] %>%
-polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_lethal_dose_plot)) %>%
+polloi::reorder_columns() %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_lethal_dose_plot), rename = FALSE) %>%
 polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at which 
N% users leave the visited page") %>%
 dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = 
polloi::custom_axis_formatter,
axisLabelWidth = 100, pixelsPerLabel = 80) %>%
 dyRoller(rollPeriod = input$rolling_lethal_dose_plot) %>%
-dyLegend(labelsDiv = "lethal_dose_plot_legend") %>%
+dyLegend(labelsDiv = "lethal_dose_plot_legend", width = 600) %>%
 dyRangeSelector(fillColor = "", strokeColor = "") %>%
 dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-04-25"), "S (rates)", labelLoc = "bottom")
@@ -17,17 +18,15 @@
   serp_page_visit_dataset[, c("date", "language", input$filter_srp_ld_plot)] 
%>%
 tidyr::gather(LD, time, -c(date, language)) %>%
 dplyr::filter(language %in% input$language_srp_ld_plot) %>%
-dplyr::transmute(
-  date = date, time = time,
-  label = paste0(LD, " (", language, ")")
-) %>%
+dplyr::transmute(date = date, time = time, label = paste0(LD, " (", 
language, ")")) %>%
 tidyr::spread(label, time) %>%
-polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_srp_ld_plot)) %>%
+polloi::reorder_columns() %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_srp_ld_plot), 
rename = FALSE) %>%
 polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at N% 
users leave the search results page") %>%
 dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = 
polloi::custom_axis_formatter,
axisLabelWidth = 100, pixelsPerLabel = 80) %>%
 dyRoller(rollPeriod = input$rolling_srp_ld_plot) %>%
-dyLegend(labelsDiv = "srp_ld_plot_legend") %>%
+dyLegend(labelsDiv = "srp_ld_plot_legend", width = 600) %>%
 dyRangeSelector(fillColor = "", strokeColor = "") %>%
 dyEvent(as.Date("2017-04-25"), "S (sampling rates)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-06-15"), "SS (sister search)", labelLoc = "bottom")
diff --git a/tab_documentation/srp_surv.md b/tab_documentation/srp_surv.md
index 254818f..c84fde7 100644
--- a/tab_documentation/srp_surv.md
+++ b/tab_documentation/srp_surv.md
@@ -1,11 +1,19 @@
 How long Wikipedia searchers stay on the search result pages
 ===
 
-When someone is randomly selected for search satisfaction tracking (using our 
[TSS2 schema](https://meta.wikimedia.org/wiki/Schema:TestSearchSatisfaction2)), 
we use a check-in system and survival analysis to estimate how long users stay 
on visited pages. When a Wikipedia visitor searches using autocomplete and ends 
up on a full-text search results page (SRP), we can track how long that page is 
"alive" before the user either closes the tab, clicks on a result, or navigates 
elsewhere.
+When someone is randomly selected for search satisfaction tracking (using our 
[TSS2 schema](https://meta.wikimedia.org/wiki/Schema:TestSearchSatisfaction2)), 
we use a check-in system and survival analysis to estimate how long users stay 
on visited pages. When a Wikipedia visitor searches using autocomplete and ends 
up on a **full-text _search results page_** (SRP), we can track how long that 
page is "alive" before the user either closes the tab, clicks on a result, or 
navigates elsewhere.
 
 To summarize the results on a daily basis, we record a set of statistics based 
on a measure formally known as "[median lethal 
dose](https://en.wikipedia.org/wiki/Median_lethal_dose)". This graph shows the 
length of time that must pass before N% of the users leave the search results 
page. When the number goes up, we can infer that users are staying on the pages 
longer.
 
-Outages and inaccuracies
+Notes
+-
+These summary statistics are the same between th

[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: SRP visit times additional fixes

2017-08-31 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375057 )

Change subject: SRP visit times additional fixes
..

SRP visit times additional fixes

Bug: T170468
Change-Id: I8758a3559e8ca6ad5713afec171bbdeca29f4dc3
---
M modules/page_visit_times.R
M tab_documentation/srp_surv.md
M ui.R
3 files changed, 25 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/57/375057/1

diff --git a/modules/page_visit_times.R b/modules/page_visit_times.R
index d312fcc..1321dd6 100644
--- a/modules/page_visit_times.R
+++ b/modules/page_visit_times.R
@@ -1,12 +1,13 @@
 output$lethal_dose_plot <- renderDygraph({
   req(length(input$filter_lethal_dose_plot) > 0)
   user_page_visit_dataset[, c("date", input$filter_lethal_dose_plot)] %>%
-polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_lethal_dose_plot)) %>%
+polloi::reorder_columns() %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_lethal_dose_plot), rename = FALSE) %>%
 polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at which 
N% users leave the visited page") %>%
 dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = 
polloi::custom_axis_formatter,
axisLabelWidth = 100, pixelsPerLabel = 80) %>%
 dyRoller(rollPeriod = input$rolling_lethal_dose_plot) %>%
-dyLegend(labelsDiv = "lethal_dose_plot_legend") %>%
+dyLegend(labelsDiv = "lethal_dose_plot_legend", width = 600) %>%
 dyRangeSelector(fillColor = "", strokeColor = "") %>%
 dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-04-25"), "S (rates)", labelLoc = "bottom")
@@ -17,17 +18,15 @@
   serp_page_visit_dataset[, c("date", "language", input$filter_srp_ld_plot)] 
%>%
 tidyr::gather(LD, time, -c(date, language)) %>%
 dplyr::filter(language %in% input$language_srp_ld_plot) %>%
-dplyr::transmute(
-  date = date, time = time,
-  label = paste0(LD, " (", language, ")")
-) %>%
+dplyr::transmute(date = date, time = time, label = paste0(LD, " (", 
language, ")")) %>%
 tidyr::spread(label, time) %>%
-polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_srp_ld_plot)) %>%
+polloi::reorder_columns() %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_srp_ld_plot), 
rename = FALSE) %>%
 polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at N% 
users leave the search results page") %>%
 dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = 
polloi::custom_axis_formatter,
axisLabelWidth = 100, pixelsPerLabel = 80) %>%
 dyRoller(rollPeriod = input$rolling_srp_ld_plot) %>%
-dyLegend(labelsDiv = "srp_ld_plot_legend") %>%
+dyLegend(labelsDiv = "srp_ld_plot_legend", width = 600) %>%
 dyRangeSelector(fillColor = "", strokeColor = "") %>%
 dyEvent(as.Date("2017-04-25"), "S (sampling rates)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-06-15"), "SS (sister search)", labelLoc = "bottom")
diff --git a/tab_documentation/srp_surv.md b/tab_documentation/srp_surv.md
index 254818f..c84fde7 100644
--- a/tab_documentation/srp_surv.md
+++ b/tab_documentation/srp_surv.md
@@ -1,11 +1,19 @@
 How long Wikipedia searchers stay on the search result pages
 ===
 
-When someone is randomly selected for search satisfaction tracking (using our 
[TSS2 schema](https://meta.wikimedia.org/wiki/Schema:TestSearchSatisfaction2)), 
we use a check-in system and survival analysis to estimate how long users stay 
on visited pages. When a Wikipedia visitor searches using autocomplete and ends 
up on a full-text search results page (SRP), we can track how long that page is 
"alive" before the user either closes the tab, clicks on a result, or navigates 
elsewhere.
+When someone is randomly selected for search satisfaction tracking (using our 
[TSS2 schema](https://meta.wikimedia.org/wiki/Schema:TestSearchSatisfaction2)), 
we use a check-in system and survival analysis to estimate how long users stay 
on visited pages. When a Wikipedia visitor searches using autocomplete and ends 
up on a **full-text _search results page_** (SRP), we can track how long that 
page is "alive" before the user either closes the tab, clicks on a result, or 
navigates elsewhere.
 
 To summarize the results on a daily basis, we record a set of statistics based 
on a measure formally known as "[median lethal 
dose](https://en.wikipedia.org/wiki/Median_lethal_dose)". This graph shows the 
length of time that must pass before N% of the users leave the search results 
page. When the number goes up, we can infer that users are staying on the pages 
longer.
 
-Outages and inaccuracies
+Notes
+-
+These summary sta