Design Your Transit System Survey
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
components
data
models
pages
static
.babelrc
.gitignore
LICENSE
README.md
next-wrapper.js
package-lock.json
package.json
server.js

README.md

Design Your Transit System

XO code style

Description

This is a web-based survey system for collecting user preferences about improvements. It can be used to survey about any set of options, but has been tailored to be used for surveying about transportation investments and improvements.

Users are given a "budget" and asked to spend it on a set of investments and improvements. The budget provided isn't enough to cover all of the options, so users have to make choices. Users are shown the costs and benefits they have accrued as they add and remove options. In this way, the survey serves two purposes: collecting data on user preferences while at the same time educating users about the costs and benefits of investments and improvements in transit systems.

The results of the survey can be exported by an admin as a CSV file for use in comparing how different groups of transit users prioritize various improvements and investments.

The system supports multiple languages, see the data/settings.js and data/strategies.js for an example of how to set up more than one language.

An example can be seen at http://design-your-transit-system.blinktag.com/

Local setup

Install node.js and mongodb

On OS X, if you have brew installed:

brew install node
brew install mongodb

Install dependencies

npm install

Create a .env file

Create a file in the project root called .env. Setup values for MONGODB_URI, ADMIN_USERNAME, and ADMIN_PASSWORD.

MONGODB_URI=mongodb://127.0.0.1:27017/yoursurveydatabase
ADMIN_USERNAME=username
ADMIN_PASSWORD=securepassword

The ADMIN_USERNAME and ADMIN_PASSWORD are used for bulk .csv export of survey responses.

Start mongodb

mongod

In a new tab, run the app

npm run dev

Open your browser and visit:

http://localhost:3000

Exporting responses

While running the app, visit:

http://localhost:3000/export

The username and password are defined in the .env file in the root of the project.

Current Use

A version of this survey system has been used by over 30 transportation agencies, including Long Beach Transit, Boulder Transit, BART, Santa Monica Big Blue Bus, Lincoln Transit, Chapel Hill Transit, Foothill Transit, Ohio DOT, Salt Lake City and Fort Worth Transportation Authority and The Kauaʻi Bus.

License

This project is licensed under GNU General Public License v3.0.