Hello Milimetric, I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/84875 to review the following change. Change subject: Add 'Active Editor Totals' ...................................................................... Add 'Active Editor Totals' Card: analytics 1155 Change-Id: I5ff0bb8e39aef99ec6dbfcc438fb0b3f58fafc0f --- M scripts/make_limn_files.py 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/geowiki refs/changes/75/84875/1 diff --git a/scripts/make_limn_files.py b/scripts/make_limn_files.py index a3a324b..525cf73 100755 --- a/scripts/make_limn_files.py +++ b/scripts/make_limn_files.py @@ -357,6 +357,23 @@ graph_id='global_south_editor_fractions') g.write(basedir) +def plot_active_editor_totals(basedir): + 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)']] + + 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)'], + title='Active Editors Total', + graph_id='active_editors_total') + g.write(basedir) + if __name__ == '__main__': args = parse_args() @@ -393,5 +410,6 @@ write_overall_mysql(projects, cursor, args.basedir) plot_gs_editor_fraction(args.basedir) + plot_active_editor_totals(args.basedir) -- To view, visit https://gerrit.wikimedia.org/r/84875 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5ff0bb8e39aef99ec6dbfcc438fb0b3f58fafc0f Gerrit-PatchSet: 1 Gerrit-Project: analytics/geowiki Gerrit-Branch: master Gerrit-Owner: QChris <christ...@quelltextlich.at> Gerrit-Reviewer: Milimetric <dandree...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits