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.
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.
Crime data will come from
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
.
safewalkd
requires a few heroku config(environment) variables to be set.
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.
NRV_PG_DBNAME
NRV_PG_DBPASS
NRV_PG_HOST
NRV_PG_USER
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)