Hey Duwamish! and Hey Willamette! are community engagement tools designed for environmental cleanup projects
JavaScript CSS HTML Python Other
Latest commit 8344e89 Feb 27, 2017 @goldpbear goldpbear committed on GitHub Merge pull request #647 from mapseed/lakewashington-design-updates
update lake washington header style
Permalink
Failed to load latest commit information.
ci sa_web -> base folder rename Jan 16, 2017
doc sa_web -> base folder rename Jan 16, 2017
docker-data-container Update Dockerfile Feb 19, 2017
scripts renable gzip and disable source maps on prod Feb 19, 2017
src update lake washington header style Feb 27, 2017
.buildpacks Add the nodejs buildpack to run the grunt task Dec 13, 2014
.dockerignore sa_web -> base folder rename Jan 16, 2017
.gitignore sa_web -> base folder rename Jan 16, 2017
.travis.yml Update travis.yml Nov 20, 2016
CHANGELOG.md Update CHANGELOG with webpack updates Feb 19, 2017
Dockerfile Update Dockerfile Feb 19, 2017
LICENSE.txt Add license file Sep 28, 2012
Procfile Add shareabouts flavor and dataset config variables Dec 3, 2014
README.md Update README.md Jan 30, 2017
SHAREABOUTS_CHANGELOG.md Rename Shareabouts changelog to make room for new mapseed changelog Oct 14, 2016
VERSION 3.20.3 Nov 8, 2015
app-requirements.txt Enable emails and refactor settings with django-dotenv Dec 4, 2016
app.json Update the default dataset path Dec 12, 2014
docker-build.sh Add docker build script Apr 27, 2015
dotcloud.yml Add a systempackages section to the dotcloud config to install gettext Aug 9, 2012
package.json Add NODE_ENV=production to build Feb 20, 2017
postinstall sa_web -> base folder rename Jan 16, 2017
requirements.txt Enable emails and refactor settings with django-dotenv Dec 4, 2016
setup.cfg Add setup.cfg linter config Dec 4, 2016
webpack.config.js Include flavor-specific 'extra files' and view overrides in bundle Feb 3, 2017
wsgi.py Add dotcloud config and wsgi file for easy dotcloud deploy Jul 18, 2012

README.md

Hey Duwamish! - HeyDuwamish.org

Hey Willamette! - HeyWillamette.org

Community powered mapping for environmental health, starting with our most polluted rivers.

Build Status

For a brief summary, please view: http://smartercleanup.org/

Take a look at our roadmap to see where we're headed

Local Setup

Hey Duwamish! requires Python 2.7 (Instructions for Windows found here).

Install pip and virtualenv, if not already installed. These will keep your python code isolated from the rest of your machine and ensure you have the correct versions.

easy_install pip
pip install virtualenv

You may need to use sudoto install these tools.

sudo easy_install pip
sudo pip install virtualenv

If you are still getting an error, it means you need to install Python Setup Tools.

sudo apt-get install python-setuptools

Create a new virtual environment inside of the repository folder, and install the project requirements:

virtualenv env --python=python2.7
source env/bin/activate
pip install -r app-requirements.txt

NOTE: If you run into trouble with gevent, you can safely comment it out of the requirements.txt file. It is not needed for local development. To comment it out, just add a hash "#" to the beginning of the line for gevent.

NOTE: If you have trouble with pip install -r app-requirements.txt, you may need to install the Python development libraries (for Python.h). The Windows installation has them by default, but some UNIX-based systems with a pre-installed Python may not. On such systems, you may need to run sudo apt-get install python-dev or download a fresh installer from python.org.

NOTE: For Linux users on RHEL/CentOS distros, you will need to have the following libraries installed: sudo yum groupinstall 'Development Tools' and sudo yum install python-devel postgresql-devel

NOTE: Mac OS X users need a command line C/C++ compiler in place for the above steps to work. This can be done by downloading Xcode from the App Store and then installing the Command Line Tools via Xcode's Preferences > Downloads area.

Install npm dependencies

Make sure that you are somewhere inside the project folder, then run:

npm install

Also, for best results, install Node version 7+ and the latest npm.

Configuring the Dev API

Now that you have the client installed, all you need to do is load the API. The API powers the database that manages the community generated reports.

The platform is capable of manging multiple "flavors" - a flavor is a custom front end map deployment that can have it's own configuration and style rules, but still connect with other flavors on a shared back end, powered by the same data API.

Hey Duwamish has its own flavor configuration in the duwamish_flavor folder for Seattle residents, and Hey Willamette has its own flavor configuration in the willamette folder for Portland residents.

We have a Dev API with dummy data that you can load locally. To enable it, go to the src folder and create a new hidden text file called .env and paste in the following information:

FLAVOR=duwamish_flavor
SITE_URL=https://dev-api.heyduwamish.org/api/v2/smartercleanup/datasets/duwamish/
SITE_KEY=MGMzOWU2ZmUwZmFkZDYzZTI1ZmQ3MDhi

DUWAMISH_SITE_URL=https://dev-api.heyduwamish.org/api/v2/smartercleanup/datasets/duwamish
DUWAMISH_DATASET_KEY=MGMzOWU2ZmUwZmFkZDYzZTI1ZmQ3MDhi

TREES_SITE_URL=https://dev-api.heyduwamish.org/api/v2/smartercleanup/datasets/trees/
TREES_DATASET_KEY=YmIxZjA1OTlmNjUxYWM5NDgwM2Q5NmMx

AIR_SITE_URL=https://dev-api.heyduwamish.org/api/v2/smartercleanup/datasets/air/
AIR_DATASET_KEY=MTc3Y2E2OGM2NDQyMWYyZjJhNWVhM2E4

If you want to load a different flavor, like Hey Willamette, just replace the first line with FLAVOR=willamette

NOTE: Flavors can load data from any number of Shareabouts datasets, provided you have a URL and key for each dataset you'd like to load. Dataset URLs and keys are set in your .env file, as follows:

<DATASET-ID>_SITE_URL=https://path/to/dataset/
<DATASET-ID>_DATASET_KEY=dataset_key

<DATASET-ID> should be replaced with the id (in UPPERCASE) of your dataset. This is the same id that is referenced in your flavor's config.yml file, and corrseponds to the value of the dataset's Slug property defined when the dataset was created.

Now you're ready to run your server locally. Just enter this command:

npm start

The server will, by default, be started at http://localhost:8000/. Here is the documentation if you want to reconfigure it.

NOTE: If you're new to programming with virtualenv, be sure to remember to activate your virtual environment every time you start a new terminal session:

source env/bin/activate

Credits

Many features are powered by Shareabouts, an open-source project of OpenPlans.

Read more about Shareabouts and find links to recent sites on the OpenPlans website.