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

Add *Fake* Missing trips survey #10

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
60 changes: 60 additions & 0 deletions configs/dev-emulator-program-missingtrip.nrel-op.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"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": {
"surveys": {
"UserProfileSurvey": {
"formPath": "json/demo-survey-v2.json",
"version": 1,
"compatibleWith": 1,
"dataKey": "manual/demographic_survey"
},
"MissingTripSurvey": {
"formPath": "https://raw.githubusercontent.com/sebastianbarry/nrel-openpath-deploy-configs/missing-trips-survey/survey-resources/data-json/fake-missing-trip-survey-v1.json",
"version": 9,
"compatibleWith": 1,
"dataKey": "manual/missingtrip-survey"
}
},
"buttons": {
"place-notes": {
"surveyName": "MissingTripSurvey",
"not-filled-in-label": {
"en": "Add Missing Trip",
"es": "Añadir viaje perdido"
},
"filled-in-label": {
"en": "",
"es": ""
}
}
},
"trip-labels": "MULTILABEL"
},
"display_config": {
"use_imperial": false
},
"profile_controls": {
"support_upload": true,
"trip_end_notification": true
}
}
77 changes: 77 additions & 0 deletions configs/dev-emulator-program-tripconfirm.nrel-op.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"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": {
"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"
}
},
"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": "ENKETO"
},
"display_config": {
"use_imperial": false
},
"profile_controls": {
"support_upload": true,
"trip_end_notification": true
}
}
41 changes: 41 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,47 @@
}
}
},
"survey_info": {
"surveys": {
"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"
}
},
"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": "MULTILABEL"
},
"display_config": {
"use_imperial": false
},
Expand Down
48 changes: 48 additions & 0 deletions configs/dev-emulator-study-tripconfirm.nrel-op.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"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": {
"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"
}
},
"buttons": {
},
"trip-labels": "ENKETO"
},
"display_config": {
"use_imperial": false
},
"profile_controls": {
"support_upload": true,
"trip_end_notification": true
}
}
13 changes: 13 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,19 @@
}
}
},
"survey_info": {
"surveys": {
"UserProfileSurvey": {
"formPath": "json/demo-survey-v2.json",
"version": 1,
"compatibleWith": 1,
"dataKey": "manual/demographic_survey"
}
},
"buttons": {
},
"trip-labels": "MULTILABEL"
},
"display_config": {
"use_imperial": false
},
Expand Down
7 changes: 5 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ <h3>Join your NREL OpenPATH-powered study!</h3>
app.controller('NRELOpenPATHCtrl', function($scope) {
console.log("Initialized the controller");
$scope.currStudies = [
{name: "Devapp Program", joinurl: "emission://join_study?label=dev-emulator-program&source=github" },
{name: "Devapp Study", joinurl: "emission://join_study?label=dev-emulator-study&source=github" },
{name: "Devapp Program (Multilabel buttons + Timeuse Survey)", joinurl: "emission://join_study?label=dev-emulator-program&source=github" },
{name: "Devapp Study (Multilabel buttons)", joinurl: "emission://join_study?label=dev-emulator-study&source=github" },
{name: "Devapp Program (Tripconfirm survey + Timeuse Survey)", joinurl: "emission://join_study?label=dev-emulator-program-tripconfirm&source=github" },
{name: "Devapp Study (Tripconfirm survey)", joinurl: "emission://join_study?label=dev-emulator-study-tripconfirm&source=github" },
{name: "Devapp Program (Multilabel buttons + Missing Trip Survey)", joinurl: "emission://join_study?label=dev-emulator-program-missingtrip&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

## 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.

Loading