Page MenuHomePhabricator

Convert Wikicharts code to modules and clean it up
Closed, ResolvedPublic

Description

The Wikicharts code is stored in Jupyter notebooks rather than as proper Python modules. We should fix this.

Along the way, we should also do the following clean-up tasks:

#create pivot
region_table = pd.pivot_table(map_df, values='pop_est', index=['wmf_region'], aggfunc=np.sum)
  • Remove unnecessary imports
  • Remove commented-out code
  • Ensure that dependencies in the "resources" directory are updated automatically (T361329)
  • Consistently use png format rather than jpg (unless there's some reason for the inconsistency)
  • Update the output file names of the regional unique device and regional active editor graphs so that you can find the one you want without viewing the images one by one

Details

TitleReferenceAuthorSource BranchDest Branch
Refactor Wikicharts code to follow Python conventions, streamline imports,...repos/movement-insights/movement-metrics!15hghaniwikicharts_refactormain
Remove unnecessary metrics and charts and make all Wikicharts code workrepos/movement-insights/movement-metrics!9nshahquinn-wmfprune_charts_and_datamain
Wikicharts: Clean up static data filesrepos/movement-insights/movement-metrics!8nshahquinn-wmfwikicharts_data_cleanupmain
Customize query in GitLab

Event Timeline

nshahquinn-wmf created this task.
nshahquinn-wmf moved this task from Incoming to Backlog on the Movement-Insights board.
nshahquinn-wmf renamed this task from Convert Wikicharts code to modules and edit it to follow the Python coding conventions to Convert Wikicharts code to modules and clean it up.Mar 13 2024, 6:35 PM
nshahquinn-wmf updated the task description. (Show Details)