Giter VIP home page Giter VIP logo

safestway's Introduction

#SafestWay ####Making walking safer, one step at a time SafestWay is a mobile app that provides safe walking routes based on crime data. SafestWay is comprised of an easy to deploy Node.JS backend and a PhoneGap-based mobile app. It has been built from the ground up to encourage deployment anywhere that OpenStreetMap and crime data is available.

##Installation An automatic installer script is provided for the following operating systems:

  • OSX (10.7-10.9)
  • Ubuntu 12.04
  • FreeBSD 9.3 (Preliminary)
  • SmartOS (Preliminary)

The SafestWay installer targets platforms that are not officially supported by Project OSRM.

This means that although you could conceivably use an unsupported platform to prepare the requisite data for SafestWay, the routing server (Project OSRM) may not run. If you plan on running a full instance of SafestWay we recommend using OSX or a Debian-based Linux distribution

Bitdeli Badge

safestway's People

Contributors

jmealo avatar flibbertigibbet avatar bitdeli-chef avatar

Stargazers

Tom Buckley avatar Monica King avatar Sheik Hassan avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

gijs jebenexer

safestway's Issues

Installer: curl fallback

The installer uses curl for OSX compatibility. It should check for the presence of wget or curl before grumbling to install one/other.

Dependence on Google for Geocoding

There are open source Geocoding options available; however, they're not tolerant of typos. If we stick with PostGIS it has functionality to facilitate this.

My thinking is for typos in street names we can simply correct this by querying the street names.

I have JavaScript code that can roughly determine the different parts of addresses.

I'm thinking we can stick with Google for a while and perhaps log the queries temporarily and run them back with whatever solution we decide and compare the accuracy.

Installer: Ubuntu/Debian

If the system locale is not set gradle cannot be installed.

....
Unzipping /root/.gradle/wrapper/dists/gradle-1.4-bin/47n6g3pbi5plc7n8fn58nkinje/gradle-1.4-bin.zip to /root/.gradle/wrapper/dists/gradle-1.4-bin/47n6g3pbi5plc7n8fn58nkinje
Set executable permissions for: /root/.gradle/wrapper/dists/gradle-1.4-bin/47n6g3pbi5plc7n8fn58nkinje/gradle-1.4/bin/gradle

FAILURE: Build aborted because of an internal error.

  • What went wrong:
    Build aborted because of an unexpected internal error. Please file an issue at: http://forums.gradle.org.
  • Try:
    Run with --debug option to get additional debug info.
  • Exception is:
    net.rubygrapefruit.platform.NativeException: Could not open terminal for stdout: could not create locale
    at net.rubygrapefruit.platform.internal.TerminfoTerminal.init(TerminfoTerminal.java:29)
    at net.rubygrapefruit.platform.internal.WrapperTerminal.init(WrapperTerminal.java:25)
    at net.rubygrapefruit.platform.internal.AbstractTerminals.getTerminal(AbstractTerminals.java:19)
    at org.gradle.internal.nativeplatform.console.NativePlatformConsoleDetector.getConsole(NativePlatformConsoleDetector.java:42)
    at org.gradle.logging.internal.ConsoleConfigureAction.execute(ConsoleConfigureAction.java:32)
    at org.gradle.logging.internal.ConsoleConfigureAction.execute(ConsoleConfigureAction.java:27)
    at org.gradle.logging.internal.OutputEventRenderer.attachConsole(OutputEventRenderer.java:68)
    at org.gradle.logging.internal.DefaultLoggingManager.attachConsole(DefaultLoggingManager.java:149)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:168)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:48)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.Main.main(Main.java:39)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)

unzip: cannot find or open package/build/distribution/.zip, package/build/distribution/.zip.zip or package/build/distribution/*.zip.ZIP.

No zipfiles found.
chmod: cannot access `/usr/bin/osmosis': No such file or directory
./install.sh: line 64: ogr2ogr: command not found
GDAL is required for ogr2ogr. Install the latest version? [y/n]

Start using OSRM

osrm3-nq8

OSRM routes 1000x faster than pgrouting. It is very lightweight and was able to handle 200 concurrent connections on modest hardware without breaking a sweat. It installs without issue and imports files quickly.

That being said, it's easier to use than pgrouting, with only one gotcha:

OSRM doesn't support costs/weights right now; but it does support speed and routing by road type and one-way/turn restrictions.

Until they support LUA-based weight/costs (planned feature), I think the following solution should work:

By assigning walkable road types a new psuedo-road type based on safety we can trick the routing engine into routing by safest route.

Each psuedo-road type can have a speed assigned to it. We'll make the safest ones have the lowest speed and prefer the lowest speed (as the "foot" routing profile already does).

Modes of transportation and variable costs

I'd like to have Walking, Public Transportation, Driving and Biking modes of travel.

I'll be reaching out to SEPTA for any relevant data.

I'd like to dig through the crime statistics and see if there's anyway we can weight the cost of each crime differently depending on the mode of transportation we're routing for.

Does anyone else have any ideas for ways we can connect the data?

Here are some not fleshed-out ideas:

Bikes:
Bike thefts, bikes being struck in MVC, hit and runs, bike racks, bike lanes, width of roads, sidewalks (in municipalities where riding your bike on sidewalks is legal).

Driving:
MVC, car jacking, (It'd be cool to find safe places to park!)

Public transportation:
Cost (literally), hours of operation for entrances [many ways into the MFL are closed during certain hours, it'd be disappointing to route people there], not picking the closest station, but the safest.

Foot notes:
MVC = Motor Vehicle Collisions, I wrote it that way because it may appear that way in the police reports

Installer: OSX Upgrade uninstalls python libraries provided by GDAL package

If GDAL was installed on a previous version of OSX the python libraries included in the in the GDAL package are removed.

The installer needs to check not only for the existence of GDAL but the presence of the python modules.

This bug may occur when upgrading from any version of OSX to a later release that includes a newer version of Python.

Creation recipie for deploying SafestWay

Documentation and a shell script to set up everything you need to run SafestWay in addition to some ETL scripts for importing common data types.

I want to give any other cities or groups the "keys" to set this up elsewhere.

That being said, any notes you keep on data sources, the license for those data and how you loaded them in are really helpful moving forward.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.