diff --git a/bin/debug/extract_timeline_for_day_range_and_user.py b/bin/debug/extract_timeline_for_day_range_and_user.py index d0f376e66..52a9ff326 100644 --- a/bin/debug/extract_timeline_for_day_range_and_user.py +++ b/bin/debug/extract_timeline_for_day_range_and_user.py @@ -25,6 +25,7 @@ # only needed to read the motion_activity # https://github.com/e-mission/e-mission-docs/issues/356#issuecomment-520630934 import emission.export.export as eee +import emission.core.wrapper.user as ecwu def export_timeline(user_id, start_day_str, end_day_str, timezone, file_name): logging.info("Extracting timeline for user %s day %s -> %s and saving to file %s" % diff --git a/emission/core/wrapper/entry.py b/emission/core/wrapper/entry.py index 39c86a539..1faa6c6bc 100644 --- a/emission/core/wrapper/entry.py +++ b/emission/core/wrapper/entry.py @@ -73,6 +73,8 @@ def _getData2Wrapper(): "manual/mode_confirm": "userlabel", # user confirmation of the travel purpose "manual/purpose_confirm": "userlabel", + #user response to the survey questions + "manual/survey_response": "userlabel", # user survey results. The survey results are a JSON blob "manual/survey": "survey", # user confirmation of the destination (unsure how this will diff --git a/emission/net/usercache/formatters/android/survey_response.py b/emission/net/usercache/formatters/android/survey_response.py new file mode 100644 index 000000000..7e83d379d --- /dev/null +++ b/emission/net/usercache/formatters/android/survey_response.py @@ -0,0 +1,12 @@ +from __future__ import unicode_literals +from __future__ import print_function +from __future__ import division +from __future__ import absolute_import +from future import standard_library +standard_library.install_aliases() +from builtins import * +import logging +import emission.net.usercache.formatters.generic.userlabel as fgl + +def format(entry): + return fgl.format(entry) diff --git a/emission/net/usercache/formatters/ios/survey_response.py b/emission/net/usercache/formatters/ios/survey_response.py new file mode 100644 index 000000000..7e83d379d --- /dev/null +++ b/emission/net/usercache/formatters/ios/survey_response.py @@ -0,0 +1,12 @@ +from __future__ import unicode_literals +from __future__ import print_function +from __future__ import division +from __future__ import absolute_import +from future import standard_library +standard_library.install_aliases() +from builtins import * +import logging +import emission.net.usercache.formatters.generic.userlabel as fgl + +def format(entry): + return fgl.format(entry) diff --git a/emission/storage/timeseries/builtin_timeseries.py b/emission/storage/timeseries/builtin_timeseries.py index 10af6d75e..f5eb3da00 100644 --- a/emission/storage/timeseries/builtin_timeseries.py +++ b/emission/storage/timeseries/builtin_timeseries.py @@ -59,6 +59,7 @@ def __init__(self, user_id): "manual/incident": self.timeseries_db, "manual/mode_confirm": self.timeseries_db, "manual/purpose_confirm": self.timeseries_db, + "manual/survey_response": self.timeseries_db, "manual/destination_confirm": self.timeseries_db, "segmentation/raw_trip": self.analysis_timeseries_db, "segmentation/raw_place": self.analysis_timeseries_db,