Gilles has submitted this change and it was merged.

Change subject: Show page view / image view comparison
......................................................................


Show page view / image view comparison

Bug: T78189
Change-Id: Id5aba74d1aac5e4a550f50dd9db028eb06120a7d
---
M dashboards/mmv.json
M dashboards/mmv_template.json
A datasources/mmv_pageviews_template.json
M generate.py
A graphs/mmv_pageviews_template.json
5 files changed, 151 insertions(+), 2 deletions(-)

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



diff --git a/dashboards/mmv.json b/dashboards/mmv.json
index 6fe0374..1109444 100644
--- a/dashboards/mmv.json
+++ b/dashboards/mmv.json
@@ -39,7 +39,8 @@
                        "name": "Media Viewer vs File page",
                        "graph_ids": [
                                "mmv_duration_global",
-                               "mmv_versus_file_page"
+                               "mmv_versus_file_page",
+                               "mmv_pageviews_global"
                        ]
                },
                {
diff --git a/dashboards/mmv_template.json b/dashboards/mmv_template.json
index b9b73b9..92502b8 100644
--- a/dashboards/mmv_template.json
+++ b/dashboards/mmv_template.json
@@ -37,7 +37,8 @@
                {
                        "name": "Media Viewer vs File page",
                        "graph_ids": [
-                               "mmv_duration_%wiki%"
+                               "mmv_duration_%wiki%",
+                               "mmv_pageviews_%wiki%"
                        ]
                },
                {
diff --git a/datasources/mmv_pageviews_template.json 
b/datasources/mmv_pageviews_template.json
new file mode 100644
index 0000000..e314039
--- /dev/null
+++ b/datasources/mmv_pageviews_template.json
@@ -0,0 +1,26 @@
+{
+    "id": "mmv_pageviews_%wiki%",
+    "slug": "mmv_pageviews_%wiki%",
+    "format": "tsv",
+    "type": "timeseries",
+    "url": 
"http://datasets.wikimedia.org/public-datasets/all/multimedia/media-viewer-pageviews-%wiki%.tsv";,
+    "name": "Pageviews: %wiki%",
+    "shortName": "mmv_pageviews_%wiki%",
+    "columns": [
+        {
+            "id": "datestring",
+            "label": "datestring",
+            "type": "Date"
+        },
+        {
+            "id": "file_views",
+            "label": "File page views",
+            "type": "Number"
+        },
+        {
+            "id": "nonfile_views",
+            "label": "Other pageviews",
+            "type": "Number"
+        }
+    ]
+}
\ No newline at end of file
diff --git a/generate.py b/generate.py
index b367eb7..3bb1d03 100644
--- a/generate.py
+++ b/generate.py
@@ -66,6 +66,8 @@
     './graphs/mmv_optout': None,
     './datasources/mmv_duration': None,
     './graphs/mmv_duration': None,
+    './datasources/mmv_pageviews': None,
+    './graphs/mmv_pageviews': None,
 }
 
 def generate(wiki, templates):
diff --git a/graphs/mmv_pageviews_template.json 
b/graphs/mmv_pageviews_template.json
new file mode 100644
index 0000000..b1eb8ba
--- /dev/null
+++ b/graphs/mmv_pageviews_template.json
@@ -0,0 +1,119 @@
+{
+    "graph_version": "0.6.0",
+    "id": "mmv_pageviews_%wiki%",
+    "desc": "Comparison of image views via Media Viewer and direct views of 
the file description page.<br/><dl><dt>image view</dt><dd>number of times Media 
Viewer displays an image</dd><dt>thumbnail click</dt><dd>number of times Media 
Viewer is opened via a thumbnail click</dd><dt>hash load</dt><dd>number of 
times Media Viewer is opened via an URL hash</dd><dt>next image</dt><dd>number 
of times \"Next\" button is used in Media Viewer</dd><dt>file 
view</dt><dd>number of File: namespace page views</dd><dt>non-file 
view</dt><dd>number of other page views (for traffic comparisons)</dd></dl>",
+    "name": "Image views",
+    "slug": "mmv_pageviews_%wiki%",
+    "root": {
+        "nodeType": "canvas",
+        "width": "auto",
+        "height": 500,
+        "children": [
+            {
+                "nodeType": "zoom-brush"
+            },
+            {
+                "nodeType": "axis",
+                "options": {
+                    "orient": "bottom",
+                    "dimension": "x"
+                }
+            },
+            {
+                "nodeType": "axis",
+                "options": {
+                    "orient": "left",
+                    "dimension": "y",
+                    "label": "total count"
+                }
+            },
+            {
+                "nodeType": "grid",
+                "options": {"dimension": "x"}
+            },
+            {
+                "nodeType": "grid",
+                "options": {"dimension": "y"}
+            },
+            {
+                "nodeType": "legend",
+                "options": {
+                    "label" : "Legend",
+                    "dateFormat" : "DD MMM YYYY"
+                }
+            },
+            {
+                "nodeType": "line-group",
+                "children": [
+                    {
+                        "nodeType": "line",
+                        "metric": {
+                            "source_id": "mmv_actions_%wiki%",
+                            "source_col": "image-view",
+                            "type": "Number"
+                        },
+                        "options": {
+                            "label": "image view"
+                        }
+                    },
+                    {
+                        "nodeType": "line",
+                        "metric": {
+                            "source_id": "mmv_actions_%wiki%",
+                            "source_col": "thumbnail",
+                            "type": "Number"
+                        },
+                        "options": {
+                            "label": "thumbnail click"
+                        }
+                    },
+                    {
+                        "nodeType": "line",
+                        "metric": {
+                            "source_id": "mmv_actions_%wiki%",
+                            "source_col": "hash-load",
+                            "type": "Number"
+                        },
+                        "options": {
+                            "label": "hash load"
+                        }
+                    },
+                    {
+                        "nodeType": "line",
+                        "metric": {
+                            "source_id": "mmv_actions_%wiki%",
+                            "source_col": "next-image",
+                            "type": "Number"
+                        },
+                        "options": {
+                            "label": "next image"
+                        }
+                    },
+                    {
+                        "nodeType": "line",
+                        "metric": {
+                            "source_id": "mmv_pageviews_%wiki%",
+                            "source_col": "file_views",
+                            "type": "Number"
+                        },
+                        "options": {
+                            "label": "file view"
+                        }
+                    },
+                    {
+                        "nodeType": "line",
+                        "metric": {
+                            "source_id": "mmv_pageviews_%wiki%",
+                            "source_col": "nonfile_views",
+                            "type": "Number"
+                        },
+                        "options": {
+                            "label": "non-file view",
+                            "disabled": true
+                        }
+                    }
+                ]
+            }
+        ]
+    }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5aba74d1aac5e4a550f50dd9db028eb06120a7d
Gerrit-PatchSet: 1
Gerrit-Project: analytics/multimedia/config
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza <gti...@wikimedia.org>
Gerrit-Reviewer: Gilles <gdu...@wikimedia.org>

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

Reply via email to