kobotoolbox / formpack

formpack is a tool used by kpi to parse and repackage survey data for exports, reports, and maps based on different languages available from the form definition.
GNU General Public License v3.0
14 stars 21 forks source link

Duplicate HXL when exporting GPS questions #209

Open jnm opened 6 years ago

jnm commented 6 years ago

Really a https://github.com/kobotoolbox/formpack/ issue, but kept here for continuity with the source issue: https://github.com/kobotoolbox/kpi/issues/1479

For the location questions, if UNHCR is adamant, then I would offer to hard-code +lat, +lon, etc. in our exports when a HXL tag is present on the GPS question. Example export header, given a GPS question called label with the HXL tag #tag would look like:

label | _label_latitude | _label_longitude |  _label_altitude | _label_precision
#tag  | #tag+lat        | #tag+lon         |  #tag+elevation  | #tag+accuracy   

This would be simple concatenation, so if the user tagged the GPS question with #tag+attr, then the split columns would show #tag+attr+lat, #tag+attr+lon, ...

Don't forget: confirm that the HXL standard actually matches the location attributes provided in the UNHCR feedback (updated elevation per https://github.com/kobotoolbox/kpi/issues/1479#issuecomment-346070695)

jnm commented 6 years ago

Support request: https://app.intercom.io/a/apps/s6hn3a8q/inbox/inbox/conversation/16203189094