Comes in two flavors:
- Demo - Static version with demo data from the 2012 deployment.
- Live - User must authenticate with Ohmage to explore his data from a current survey.
Dashboards must be configured for a certain dataset (i.e. campaign). This is done using the config.json
. The repo has some examples of configuration files in the config
directory. The config file is self-explanatory, take one of the examples and modify it to your needs and put it in the config
dir.
To compile, we need to install npm
and the npm packages jade
, recess
, and uglify-js
. For Ubuntu:
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install node
sudo npm install -g jade recess uglify-js
Some build parameters can be configured by editing Makefile
. By default the output dir is /var/www
.
To build the included demo dashboards:
make CAMPAIGN=snackdemo
make CAMPAIGN=mediademo
To build the included live dashboards:
make CAMPAIGN=snack
make CAMPAIGN=media
make CAMPAIGN=litter
make CAMPAIGN=trash
make CAMPAIGN=holiday
make CAMPAIGN=nutrition
Below the steps to update the data of demo campaigns:
- Study the
snackdemo.json
andmediademo.json
file, especiallyphoto.thumb
andphoto.img
properties. These must resolve to local or external locations of the pictures. - Study the included
data/snackdemo.csv
anddata/mediademo.csv
, especially column names. Order of the columns is not important, but the exact name is. - Export the campaign data in CSV format from Ohmage. Combine all data into a single dataset.
- Check that the column names are the same as in the current
snackdemo.csv
andmediademo.csv
. Rename where necessary. - Remove un-needed columns from the dataset.
- Clean up the data: remove all rows with uncomplete survey responses.
- Export all the icons and images from all photos in the dataset and put them on a web server somewhere.
- Update the
photo.thumb
andphoto.img
properties in the config file to point to the image server. - (optional) add random values to the longitude and latitude columns for privacy.
The code in this respository is open-source and licensed under the Apache License, version 2.0. The full text of the license may be found at this link: http://www.apache.org/licenses/LICENSE-2.0.