Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surveys info and surveys data for Configs #8

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions configs/dev-emulator-program-tripconfirm.nrel-op.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"version": 1,
"ts": 1655143472,
"intro": {
"program_or_study": "program",
"start_month": "9",
"start_year": "2020",
"mode_studied": "e-bike",
"program_admin_contact": "K. Shankari ([email protected])",
"deployment_partner_name": "National Renewable Energy Laboratory (NREL)",
"translated_text": {
"en": {
"deployment_name": "Development environment (program)",
"summary_line_1": "allows developers to work on the OpenPATH app",
"summary_line_2": "connect to a local server",
"summary_line_3": "and ensure that end-to-end program features work.",
"short_textual_description": "OpenPATH is the only open source platform for instrumenting mobility patterns. We welcome contributions and pull requests.",
"why_we_collect": "So that you can see how OpenPATH works",
"research_questions": ["Comparing the open-access group (no intervention) and programs that provide interventions.", "General monitoring of mobility trends for travel behavior, including shifts to travel behavior and the introduction of new mobility modes."]
}
}
},
"survey_info": {
"buttons": {
"trip-notes": {
"surveyName": "TimeUseSurvey",
"not-filled-in-label": {
"en": "Add Activity",
"es": "Añadir actividad"
},
"filled-in-label": {
"en": "",
"es": ""
}
},
"place-notes": {
"surveyName": "TimeUseSurvey",
"not-filled-in-label": {
"en": "Add Activity",
"es": "Añadir actividad"
},
"filled-in-label": {
"en": "",
"es": ""
}
},
"trip-labels": {
"survey-name": "TripConfirmSurvey",
"not-filled-in-label": {
"en": "Add trip details",
"es": "Agregar detalles del viaje"
},
"filled-in-label": {
"en": "Submitted",
"es": "Enviado"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be here, at least at this point. The trip confirm survey and the user profile survey are "special".

  • trip confirm: there is only one per trip
  • user profile: there is only one per user

This is also a regression wrt the TripConfirmSurvey because it is not using the more sophisticated filled-in-label from LABEL_FUNCTIONS.

That's why we decided to have different types of surveys in the first place.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I indicated in that really long meeting today morning, there are two separate versions of the trip label survey (MULTILABEL and ENKETO). The dynamic config should simply state which one we use. If we choose ENKETO, it will always be the TripConfirmSurvey defined in surveys.json

}
},
"display_config": {
"use_imperial": false
},
"profile_controls": {
"support_upload": true,
"trip_end_notification": true
}
}
26 changes: 26 additions & 0 deletions configs/dev-emulator-program.nrel-op.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,32 @@
}
}
},
"survey_info": {
"buttons": {
"trip-notes": {
"surveyName": "TimeUseSurvey",
"not-filled-in-label": {
"en": "Add Activity",
"es": "Añadir actividad"
},
"filled-in-label": {
"en": "",
"es": ""
}
},
"place-notes": {
"surveyName": "TimeUseSurvey",
"not-filled-in-label": {
"en": "Add Activity",
"es": "Añadir actividad"
},
"filled-in-label": {
"en": "",
"es": ""
}
}
}
},
"display_config": {
"use_imperial": false
},
Expand Down
44 changes: 44 additions & 0 deletions configs/dev-emulator-study-tripconfirm.nrel-op.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"version": 1,
"ts": 1655143472,
"intro": {
"program_or_study": "study",
"start_month": "9",
"start_year": "2020",
"program_admin_contact": "K. Shankari ([email protected])",
"deployment_partner_name": "National Renewable Energy Laboratory (NREL)",
"translated_text": {
"en": {
"deployment_name": "Development environment (study)",
"summary_line_1": "allows developers to work on the OpenPATH app",
"summary_line_2": "connect to a local server",
"summary_line_3": "and ensure that end-to-end study features work.",
"short_textual_description": "OpenPATH is the only open source platform for instrumenting mobility patterns. We welcome contributions and pull requests.",
"why_we_collect": "So that you can see how OpenPATH works",
"research_questions": ["Comparing the open-access group (no intervention) and programs that provide interventions.", "General monitoring of mobility trends for travel behavior, including shifts to travel behavior and the introduction of new mobility modes."]
}
}
},
"survey_info": {
"buttons": {
"trip-labels": {
"survey-name": "TripConfirmSurvey",
"not-filled-in-label": {
"en": "Add trip details",
"es": "Agregar detalles del viaje"
},
"filled-in-label": {
"en": "Submitted",
"es": "Enviado"
}
}
}
},
"display_config": {
"use_imperial": false
},
"profile_controls": {
"support_upload": true,
"trip_end_notification": true
}
}
4 changes: 4 additions & 0 deletions configs/dev-emulator-study.nrel-op.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
}
}
},
"survey_info": {
"buttons": {
}
},
"display_config": {
"use_imperial": false
},
Expand Down
22 changes: 22 additions & 0 deletions configs/surveys/surveys.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"surveys": {
"TripConfirmSurvey": {
"formPath": "https://raw.githubusercontent.com/sebastianbarry/nrel-openpath-deploy-configs/surveys-info-and-surveys-data/survey-resources/data-json/trip-end-survey-multiple-select.json",
"version": 1.2,
"compatibleWith": 1,
"dataKey": "manual/trip_user_input"
},
"UserProfileSurvey": {
"formPath": "json/demo-survey-v2.json",
"version": 1,
"compatibleWith": 1,
"dataKey": "manual/demographic_survey"
},
"TimeUseSurvey": {
"formPath": "https://raw.githubusercontent.com/sebastianbarry/nrel-openpath-deploy-configs/surveys-info-and-surveys-data/survey-resources/data-json/time-use-survey-form-v9.json",
"version": 9,
"compatibleWith": 1,
"dataKey": "manual/timeuse_survey"
}
}
}
2 changes: 2 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ <h3>Join your NREL OpenPATH-powered study!</h3>
$scope.currStudies = [
{name: "Devapp Program", joinurl: "emission://join_study?label=dev-emulator-program&source=github" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this to indicate that is uses TimeUse + Buttons

{name: "Devapp Study", joinurl: "emission://join_study?label=dev-emulator-study&source=github" },
{name: "Devapp Program Tripconfirm", joinurl: "emission://join_study?label=dev-emulator-program-tripconfirm&source=github" },
{name: "Devapp Study Tripconfirm", joinurl: "emission://join_study?label=dev-emulator-study-tripconfirm&source=github" },
{name: "Dev Program", joinurl: "nrelopenpath://join_study?label=dev-emulator-program&source=github" },
{name: "Dev Study", joinurl: "nrelopenpath://join_study?label=dev-emulator-study&source=github" },
{name: "Testing Program", joinurl: "nrelopenpath://join_study?label=stage-program&source=github" },
Expand Down
11 changes: 11 additions & 0 deletions survey-resources/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:8-alpine

WORKDIR /usr/app
COPY package.json package-lock.json index.js ./
RUN apk --no-cache add --virtual native-deps \
g++ gcc libgcc libstdc++ linux-headers make python && \
npm install --quiet node-gyp -g &&\
npm ci &&\
apk del native-deps

ENTRYPOINT node .
25 changes: 25 additions & 0 deletions survey-resources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# xform-transformer

Complementary xform transformer for e-mission-phone

Comment on lines +1 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you make sure to get the commit history of these changes while moving them over? it makes it much easier to review in the future and understand the context of changes.

## Installation

```bash
npm install
```

## Usage

1. Put your `xml` form (xform) file into `data-xml` directory.
2. Run this app `node .`
3. Grab your json form file under `data-json` directory.
4. Enjoy!

Consult *Input Data Preparation* if you do not have xform file yet.

## Input Data Preparation

1. Build your survey form on [https://www.kobotoolbox.org/](https://www.kobotoolbox.org/)
2. Download the XLS form file
3. Convert `XLS` form to `xml` form (xform) using [http://xlsform.opendatakit.org/](http://xlsform.opendatakit.org/)
4. Done!
1 change: 1 addition & 0 deletions survey-resources/data-json/demo-survey-v1.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions survey-resources/data-json/demo-survey-v2.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions survey-resources/data-json/time-use-survey-form-v9.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions survey-resources/data-json/trip-end-survey.json

Large diffs are not rendered by default.

Binary file added survey-resources/data-xls/demo-survey-v1.xlsx
Binary file not shown.
Binary file added survey-resources/data-xls/demo-survey-v2.xlsx
Binary file not shown.
Binary file not shown.
Loading