JGonera has submitted this change and it was merged.
Change subject: Story 1261: Limn graph - Active Mobile Edits
......................................................................
Story 1261: Limn graph - Active Mobile Edits
Change-Id: If74760046bc78e9312c4e7584aa145345524bab8
---
M dashboards/reportcard.json
A datasources/edits-monthly-active-editors.json
A graphs/edits-monthly-active-editors.json
M mobile/config.yaml
A mobile/edits-monthly-active-editors.sql
5 files changed, 156 insertions(+), 1 deletion(-)
Approvals:
JGonera: Verified; Looks good to me, approved
diff --git a/dashboards/reportcard.json b/dashboards/reportcard.json
index 481d0b1..1562134 100644
--- a/dashboards/reportcard.json
+++ b/dashboards/reportcard.json
@@ -8,7 +8,8 @@
"graph_ids": [
"edits-monthly-unique-editors",
"edits-monthly-successful",
- "edits-monthly-5plus-editors"
+ "edits-monthly-5plus-editors",
+ "edits-monthly-active-editors"
]
},
{
diff --git a/datasources/edits-monthly-active-editors.json
b/datasources/edits-monthly-active-editors.json
new file mode 100644
index 0000000..7411e00
--- /dev/null
+++ b/datasources/edits-monthly-active-editors.json
@@ -0,0 +1,18 @@
+{
+ "name": "Active editors (per month)",
+ "url":
"http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/edits-monthly-active-editors.csv",
+ "format": "csv",
+ "shortName": "edits-monthly-active-editors",
+ "type": "timeseries",
+ "id": "edits-monthly-active-editors",
+ "columns": [
+ {
+ "type": "date",
+ "label": "Month"
+ },
+ {
+ "type": "int",
+ "label": "Active editors"
+ }
+ ]
+}
diff --git a/graphs/edits-monthly-active-editors.json
b/graphs/edits-monthly-active-editors.json
new file mode 100644
index 0000000..144ed95
--- /dev/null
+++ b/graphs/edits-monthly-active-editors.json
@@ -0,0 +1,113 @@
+{
+ "graph_version": "0.6.0",
+ "name": "Users who edited 5 or more times on mobile during month",
+ "slug": "edits-monthly-active-editors",
+ "root": {
+ "nodeType": "canvas",
+ "minWidth": 750,
+ "minHeight": 500,
+ "height": 500,
+ "width": "auto",
+ "x": {
+ "padding": 0.001
+ },
+ "children": [
+ {
+ "disabled": false,
+ "nodeType": "axis",
+ "options": {
+ "tickFormat": "MMM YY",
+ "dimension": "x",
+ "orient": "bottom"
+ }
+ },
+ {
+ "disabled": false,
+ "nodeType": "axis",
+ "options": {
+ "tickFormat": "MMM YY",
+ "dimension": "y",
+ "orient": "left"
+ }
+ },
+ {
+ "disabled": false,
+ "nodeType": "grid",
+ "options": {
+ "ticks": 10,
+ "dimension": "x"
+ }
+ },
+ {
+ "disabled": false,
+ "nodeType": "grid",
+ "options": {
+ "ticks": 10,
+ "dimension": "y"
+ }
+ },
+ {
+ "disabled": false,
+ "nodeType": "zoom-brush",
+ "options": {
+ "allowY": true,
+ "allowX": true
+ }
+ },
+ {
+ "nodeType": "callout",
+ "target": "latest",
+ "disabled": false,
+ "steps": [
+ "1y",
+ "1M"
+ ],
+ "metricRef": 0,
+ "options": {
+ "deltaPercent": true,
+ "dateFormat": "MMM YYYY",
+ "colorDelta": true
+ }
+ },
+ {
+ "disabled": false,
+ "nodeType": "legend",
+ "options": {
+ "valueFormat": ",.2s",
+ "dateFormat": "MMM YYYY"
+ },
+ "label": "Aug 2012"
+ },
+ {
+ "disabled": false,
+ "nodeType": "bar-group",
+ "options": {
+ "palette": "wmf_projects",
+ "scale": "log",
+ "stack" : {
+ "enabled": true
+ },
+ "dateFormat": "MMM YYYY"
+ },
+ "children": [
+ {
+ "disabled": false,
+ "index": 0,
+ "metric": {
+ "source_id": "edits-monthly-active-editors",
+ "type": "int",
+ "source_col": 1
+ },
+ "nodeType": "bar",
+ "options": {
+ "label": "Main namespace",
+ "noLegend": false,
+ "dateFormat": "MMM YYYY"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "id": "edits-monthly-active-editors"
+}
diff --git a/mobile/config.yaml b/mobile/config.yaml
index bd54324..1cfb5ee 100644
--- a/mobile/config.yaml
+++ b/mobile/config.yaml
@@ -59,6 +59,8 @@
title: Percentage of files with a category added
deleted-uploads:
title: Uploads deleted (per month)
+ edits-monthly-active-editors:
+ title: Unique editors who made 5+ edits during this month on
their mobile phone
edits-monthly-unique-editors:
title: Unique editors (per month)
edits-monthly-successful:
diff --git a/mobile/edits-monthly-active-editors.sql
b/mobile/edits-monthly-active-editors.sql
new file mode 100644
index 0000000..f998f96
--- /dev/null
+++ b/mobile/edits-monthly-active-editors.sql
@@ -0,0 +1,21 @@
+SELECT
+ DATE_FORMAT(CONCAT(Month.month, '01'), '%Y-%m-%d') AS Month,
+ COALESCE(COUNT(*), 0) AS Count
+
+-- http://stackoverflow.com/a/6871220/365238
+FROM (
+ SELECT EXTRACT(YEAR_MONTH FROM SUBDATE(CURDATE(), INTERVAL @num:=@num+1
MONTH)) AS month
+ FROM information_schema.columns, (SELECT @num:=-1) num LIMIT 12
+) AS Month
+
+LEFT JOIN (
+ SELECT
+ EXTRACT(YEAR_MONTH FROM timestamp) AS month,
+ event_username,
+ count(*) AS count
+ FROM {{ tables.edits_web }}
+ WHERE event_action = 'success'
+ GROUP BY month, event_username
+ HAVING count > 5
+) AS Main ON Month.month = Main.month
+GROUP BY Month;
--
To view, visit https://gerrit.wikimedia.org/r/92591
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If74760046bc78e9312c4e7584aa145345524bab8
Gerrit-PatchSet: 2
Gerrit-Project: analytics/limn-mobile-data
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits