Neighborhood Compass 2.0 (development).
Durham NC's adaptations of Tobin Bradley's Quality of Life Explorer v2 (https://github.com/tobinbradley/Mecklenburg-County-Quality-of-Life-Dashboard). Changes made here will roll into the Durham Neighborhood Compass (http://compass.durhamnc.gov).
Directory structure
bower_components
: This directory contains client-side javascript packages managed by bower for the website.data_resources
: This directory contains data resources (shapefiles, geodatabases, etc.) which are not part of the build process but are used to manually generate new datasets.src
: This directory contains the source files (HTML, Javascript, data resources, etc.) which gulp uses to build the site.dist
: This directory will be generated by the gulp process and contains the final built website. Note: do not edit files in this directory! Instead edit the correspondingsrc/
files instead.
How to set up the project
Modified from the Mecklenburg QoL Dashboard Readme
Install node
Install NodeJS by following the instructions on nodejs.org for your platform.
Clone the project locally
Use the Clone or Download
link on the Github repo page to clone locally.
Set up the project
I'm using gulp as the build/dev system, because awesome. We'll be using topojson to encode our geography. From inside the project directory, run the following commands.
npm install -g gulp topojson
npm install
Finishing touches
The search function is set up to use Mecklenburg's search API's and won't work for other areas. To swap Mecklenburg's search out for a generic search that will work for any area:
gulp init
Finally, build the project.
gulp build
Fire it up!
The default gulp task starts BrowserSync and launches your current web browser to view the site. Live reload is enabled, so changes will automatically refresh in your browser.
gulp