AFG-Polio-Data / APMIS-Project

APMIS (Afghanistan Polio Management Information System) is an supplemental Immunization Activities management system to manage the vaccination activities in the country.
https://test.afghanistan-apmis.com
GNU General Public License v3.0
4 stars 8 forks source link

Allow for transposed form data export format #654

Closed bnygren closed 1 month ago

bnygren commented 4 months ago

Currently, Intracampaign DC Daily Compilation sheet data export as "wide", with each day's data repeated as a set of columns. Users struggle to transform these data to "long" format, with a day column instead. Thus they would like a button to export these data in a long format csv. While this could be done in Shiny, the delayed timing due to the API pull for Shiny suggests this would be better built into APMIS since intracampaign data are regularly utilized during an active campaign.

Example of current (wide):

ID var1_day1 var2_day1 var1_day2 var2_day2
1 a 1 b 6

Requested format (long):

day ID var1 var2
1 1 a 1
2 1 b 6
bnygren commented 4 months ago

discussed 9 May dev meeting with Yahaya, will follow up with more info.

bnygren commented 3 months ago

Revisited as country priority 11-Jun during PM meeting

bnygren commented 3 months ago

@Eutit5 @DevSeg There are some fields missing in the transposed export, notably: campaign, form, area, rcode, region, pcode, district, dcode, ccode. I will check all the others but without these fields the data are not really usable (as we don't know what the rows link to). Thus, this needs to be corrected before the feature can be included in the push to Live. Thanks.