Visualizing nutrition facts, a project started at #code4health. This is built with the Haskell SnapFramework.
Charts are made with javascript code that renders SVG files.
#Installation
Install GHC from haskell.org/platform. It should be the latest. At the time of this writing the latest version is GHC 7.6.3. It comes with cabal, which is a package manager that helps you install packages from hackage.
The .cabal file lists dependencies.
You also need to install postgres.
#Usage
- Sign up for API accounts at Instagram, Jawbone Up, and FatSecret.
- Create a configuration file that lists the api secret keys.
- Build and run server
$ cabal build
$ createuser postgres
$ createdb testdb
$ dist/build/codeforhealth/codeforhealth
Developer Note: if you will be editing files, use the fswatch library to automatically reload your app. The command to watch for changes is shown below. Template places are saved in snaplets/heist/templates directory and media files saved in static.
$ fswatch snaplets/heist/templates:static "curl http://localhost:8000/heistReload"
#Links There are some javascript charting libraries available for visualizing nutrient data.
General charting libraries