Chelsyx has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/361902 )
Change subject: Add sister search traffic ...................................................................... Add sister search traffic - Adds a "Sister Search" section with a "Traffic" subsection Bug: T164854 Change-Id: Ic89b51f3b89b25b50387389ef84ba9496423be4b --- M server.R A tab_documentation/sister_search_traffic.md M ui.R M utils.R 4 files changed, 91 insertions(+), 13 deletions(-) Approvals: Chelsyx: Verified; Looks good to me, approved diff --git a/server.R b/server.R index 0de1586..92e94c1 100644 --- a/server.R +++ b/server.R @@ -18,20 +18,22 @@ read_desktop() progress$set(message = "Downloading apps data", value = 0.1) read_apps() - progress$set(message = "Downloading mobile web data", value = 0.3) + progress$set(message = "Downloading mobile web data", value = 0.2) read_web() - progress$set(message = "Downloading API usage data", value = 0.4) + progress$set(message = "Downloading API usage data", value = 0.3) read_api() - progress$set(message = "Downloading zero results data", value = 0.5) + progress$set(message = "Downloading zero results data", value = 0.4) read_failures() - progress$set(message = "Downloading engagement data", value = 0.6) + progress$set(message = "Downloading engagement data", value = 0.5) read_augmented_clickthrough() - progress$set(message = "Downloading language-project engagement data", value = 0.7) + progress$set(message = "Downloading language-project engagement data", value = 0.6) read_augmented_clickthrough_langproj() - progress$set(message = "Downloading survival data", value = 0.8) + progress$set(message = "Downloading survival data", value = 0.7) read_lethal_dose() - progress$set(message = "Downloading PaulScore data", value = 0.9) + progress$set(message = "Downloading PaulScore data", value = 0.8) read_paul_score() + progress$set(message = "Downloading sister search data", value = 0.9) + read_sister_search() progress$set(message = "Finished downloading datasets", value = 1) existing_date <<- Sys.Date() progress$close() @@ -359,6 +361,40 @@ dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") }) + # Sister Search + output$sister_search_traffic_plot <- renderDygraph({ + switch( + input$sister_search_traffic_split, + "project" = { + sister_search_traffic %>% + dplyr::rename(split = project) + }, + "destination" = { + sister_search_traffic %>% + dplyr::mutate(split = dplyr::if_else(is_serp, "Search results page", "Article")) + }, + "language" = { + sister_search_traffic %>% + dplyr::filter(project != "wikimedia commons", !is.na(language)) %>% + dplyr::mutate(split = language) + }, + "access_method" = { + sister_search_traffic %>% + dplyr::mutate(split = access_method) + } + ) %>% + dplyr::group_by(date, split) %>% + dplyr::summarize(pageviews = sum(pageviews)) %>% + tidyr::spread(split, pageviews, fill = 0) %>% + polloi::smoother(smooth_level = polloi::smooth_switch(input$smoothing_global, input$smoothing_sister_search_traffic_plot)) %>% + polloi::make_dygraph(xlab = "Date", ylab = "Pageviews", title = "Traffic to sister projects from Wikipedia SERPs") %>% + dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = polloi::custom_axis_formatter, + axisLabelWidth = 100, pixelsPerLabel = 80) %>% + dyLegend(labelsDiv = "sister_search_traffic_plot_legend") %>% + dyRangeSelector(fillColor = "", strokeColor = "") %>% + dyEvent(as.Date("2017-06-15"), "A (deployed)", labelLoc = "bottom") + }) + # Survival output$lethal_dose_plot <- renderDygraph({ user_page_visit_dataset %>% diff --git a/tab_documentation/sister_search_traffic.md b/tab_documentation/sister_search_traffic.md new file mode 100644 index 0000000..6258a6b --- /dev/null +++ b/tab_documentation/sister_search_traffic.md @@ -0,0 +1,28 @@ +Sister search traffic +======= +Sister (cross-wiki) search is a feature that adds results from other projects to a sidebar on the search engine results page (SERP). For example: if there are additional results found, users are shown images from Wikimedia Commons, definitions from Wiktionary, and results from works on Wikisource. See [T146667](https://phabricator.wikimedia.org/T146667) for more details. + +Notes +----- +Some communities (e.g. Italian Wikipedia) developed their own cross-wiki search results sidebars, which is why we see some sister traffic before the deployment of the sister search feature across all Wikipedias. + +__\*__ Users can click on a cross-wiki result or view all the results at the sister project + +__†__ This excludes the language-less Wikimedia Commons + +Outages and inaccuracies +------ +* '__A__': [on 2017-06-15](https://lists.wikimedia.org/pipermail/discovery/2017-June/001536.html) we deployed the sister search feature to all Wikipedia in all languages. + +Questions, bug reports, and feature suggestions +------ +For technical, non-bug questions, [email Mikhail](mailto:mpo...@wikimedia.org?subject=Dashboard%20Question) or [Chelsy](mailto:c...@wikimedia.org?subject=Dashboard%20Question). If you experience a bug or notice something wrong or have a suggestion, [open a ticket in Phabricator](https://phabricator.wikimedia.org/maniphest/task/create/?projects=Discovery) in the Discovery board or [email Deb](mailto:d...@wikimedia.org?subject=Dashboard%20Question). + +<hr style="border-color: gray;"> +<p style="font-size: small;"> + <strong>Link to this dashboard:</strong> <a href="https://discovery.wmflabs.org/metrics/#sister_search_traffic">https://discovery.wmflabs.org/metrics/#sister_search_traffic</a> + | Page is available under <a href="https://creativecommons.org/licenses/by-sa/3.0/" title="Creative Commons Attribution-ShareAlike License">CC-BY-SA 3.0</a> + | <a href="https://phabricator.wikimedia.org/diffusion/WDRN/" title="Search Metrics Dashboard source code repository">Code</a> is licensed under <a href="https://phabricator.wikimedia.org/diffusion/WDRN/browse/master/LICENSE.md" title="MIT License">MIT</a> + | Part of <a href="https://discovery.wmflabs.org/">Discovery Dashboards</a> + | Data available at <a href="https://analytics.wikimedia.org/datasets/discovery/" title="Specifically: metrics/search/sister_search_traffic.tsv">Wikimedia Analytics</a> +</p> diff --git a/ui.R b/ui.R index 05c5720..c9fb719 100644 --- a/ui.R +++ b/ui.R @@ -63,6 +63,8 @@ menuSubItem(text = "Summary", tabName = "failure_rate"), menuSubItem(text = "Search Type Breakdown", tabName = "failure_breakdown"), menuSubItem(text = "Search Suggestions", tabName = "failure_suggestions")), + menuItem(text = "Sister Search", + menuSubItem(text = "Traffic", tabName = "sister_search_traffic")), menuItem(text = "Page Visit Times", tabName = "survival"), menuItem(text = "Language/Project Breakdown", tabName = "langproj_breakdown"), menuItem(text = "Global Settings", @@ -271,6 +273,20 @@ dygraphOutput("suggestion_dygraph_plot"), includeMarkdown("./tab_documentation/failure_suggests.md") ), + tabItem(tabName = "sister_search_traffic", + fluidRow( + column(polloi::smooth_select("smoothing_sister_search_traffic_plot"), width = 3), + column(shiny::radioButtons("sister_search_traffic_split", "Split pageviews by", choices = list("Project" = "project", "Search results pages vs Articles*" = "destination", "English vs other languages†" = "language", "Desktop vs Mobile Web" = "access_method"), inline = TRUE), width = 9) + ), + dygraphOutput("sister_search_traffic_plot"), + div(id = "sister_search_traffic_plot_legend"), + includeMarkdown("./tab_documentation/sister_search_traffic.md")), + tabItem(tabName = "survival", + polloi::smooth_select("smoothing_lethal_dose_plot"), + div(id = "lethal_dose_plot_legend"), + dygraphOutput("lethal_dose_plot"), + includeMarkdown("./tab_documentation/survival.md") + ), tabItem(tabName = "langproj_breakdown", fluidRow(column(polloi::smooth_select("smoothing_langproj_breakdown"), width = 4), column(selectInput("langproj_metrics", "Metrics", @@ -296,12 +312,6 @@ column(dygraphOutput("langproj_breakdown_plot"), div(id = "langproj_breakdown_legend", style = "margin-top:30px;"), width = 8)), includeMarkdown("./tab_documentation/langproj_breakdown.md") - ), - tabItem(tabName = "survival", - polloi::smooth_select("smoothing_lethal_dose_plot"), - div(id = "lethal_dose_plot_legend"), - dygraphOutput("lethal_dose_plot"), - includeMarkdown("./tab_documentation/survival.md") ) ) ), diff --git a/utils.R b/utils.R index aa74626..6fd2953 100644 --- a/utils.R +++ b/utils.R @@ -317,6 +317,10 @@ label = sprintf("%s (%.3f%%)", project, 100 * prop)) } +read_sister_search <- function() { + sister_search_traffic <<- polloi::read_dataset("discovery/metrics/search/sister_search_traffic.tsv", col_types = "Dcccli") +} + aggregate_wikis <- function(data, languages, projects, input_metric) { languages <- sub(" \\([0-9]{1,2}\\.[0-9]{1,3}%\\)", "", languages) projects <- sub(" \\([0-9]{1,2}\\.[0-9]{1,3}%\\)", "", projects) -- To view, visit https://gerrit.wikimedia.org/r/361902 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic89b51f3b89b25b50387389ef84ba9496423be4b Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/rainbow Gerrit-Branch: develop Gerrit-Owner: Bearloga <mpo...@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