Milimetric has submitted this change and it was merged.
Change subject: Remove '100+' and 'all' cohorts from active editors graph
......................................................................
Remove '100+' and 'all' cohorts from active editors graph
The '100+' and 'all' cohorts are not required on analytics card #1155
and they'd all get shown all in the same color (dark blue), as the
their names contain the keyword 'total'. So we hide them.
As 'Active editors' implies the '5+' cohort by definition, and there
is now no longer confusion between the different cohorts, we remove
the appended cohort name.
Card: analytics 1555.1
Change-Id: Ia30a045dc29f29e84a87af15b13158fc07d86dcf
---
M scripts/make_limn_files.py
1 file changed, 7 insertions(+), 10 deletions(-)
Approvals:
Milimetric: Verified; Looks good to me, approved
diff --git a/scripts/make_limn_files.py b/scripts/make_limn_files.py
index 2c4a0c3..2924b62 100755
--- a/scripts/make_limn_files.py
+++ b/scripts/make_limn_files.py
@@ -367,27 +367,24 @@
Keyword arguments:
basedir -- string. Path to the data repository
- This function computes the total number of active editors for the
- 'all', '5+', and '100+' cohorts and writes out the necessary
- datafile, datasource, and graph files to show them in Limn. Those
- files get written into the corresponding subdirectories of
- basedir.
+ This function computes the total number of active editors and
+ writes out the necessary datafile, datasource, and graph files to
+ show them in Limn. Those files get written into the corresponding
+ subdirectories of basedir.
For the computation of the data, this function relies solely on
the global_south.csv file.
"""
df = pd.read_csv(basedir + '/datafiles/global_south.csv',
index_col='date', parse_dates=['date'])
- df['Active Editors Total (100+)'] = (df['Global South (100+)'] +
df['Global North (100+)'] + df['Unkown (100+)']).apply(float)
- df['Active Editors Total (5+)'] = (df['Global South (5+)'] +
df['Global North (5+)'] + df['Unkown (5+)'] ).apply(float)
- df['Active Editors Total (all)'] = (df['Global South (all)'] +
df['Global North (all)'] + df['Unkown (all)'] ).apply(float)
- df_total = df[['Active Editors Total (100+)', 'Active Editors Total (5+)',
'Active Editors Total (all)']]
+ df['Active Editors Total'] = (df['Global South (5+)'] + df['Global
North (5+)'] + df['Unkown (5+)'] ).apply(float)
+ df_total = df[['Active Editors Total']]
ds_total = limnpy.DataSource(limn_id='active_editors_total',
limn_name='Active Editors Total',
limn_group=LIMN_GROUP,
data = df_total)
ds_total.write(basedir)
- g = ds_total.get_graph(metric_ids=['Active Editors Total (100+)', 'Active
Editors Total (5+)', 'Active Editors Total (all)'],
+ g = ds_total.get_graph(metric_ids=['Active Editors Total'],
title='Active Editors Total',
graph_id='active_editors_total')
g.write(basedir)
--
To view, visit https://gerrit.wikimedia.org/r/86183
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia30a045dc29f29e84a87af15b13158fc07d86dcf
Gerrit-PatchSet: 2
Gerrit-Project: analytics/geowiki
Gerrit-Branch: master
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: Milimetric <[email protected]>
Gerrit-Reviewer: QChris <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits