Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 2.14 KB

README.md

File metadata and controls

56 lines (42 loc) · 2.14 KB

safe_walk_blacksburg

A hodgepodge of scripts to support the WalkBlacksburg app and data backend

An app designed to improve the safety of walking around Blacksburg, VA, particularly at night by showing routes that provide sidewalks and street lighting, and including historical crime data overlays.

safe_walk_blacksburg is currently a deployable heroku web app.

Data sources

Street lighting and sidewalk data has come from the Town of Blacksburg GIS Department. Lightning and sidewalk data is being interatively processed and bound to road segments stored in a postgres instance running on aws.

TODO

Crime data will come from

Heroku Deployment

This application can being deployed to heroku. The web server binary is located in cmd/safewalkd directory and is a go binary. See the heroku go tutorial to get started deploying safewalkd.

Environment

safewalkd requires a few heroku config(environment) variables to be set.

Postgres Settings

These vars are used to connect to the postgres instance that contains the road segment dataset. They should be set with heroku config:set NRV_PG_HOST=some.hostname.aws.amazon.com. See genkml.go for how the variables are used to build the database connection.

Required

NRV_PG_DBNAME
NRV_PG_DBPASS
NRV_PG_HOST
NRV_PG_USER

Dyno's URL

The google maps api requires an overlay kml to be referenced with an absolute URL, including protocol and hostname(http[s]://host.name/). For safewalkd to have access to the hostname of its dyno, it must have an env config value set to the hostname. The following bash command will set this config var for your heroku dyno.

$ heroku config:set HEROKU_URL=$(heroku info -s | grep web_url | cut -d= -f2)