Sei sulla pagina 1di 5

Project Summary

December 18, 2014


Mark Dologuin, Priyanka Verma, Anahi Garnelo
SAFE: PROJECT SUMMARY
Aim
Our aim was to create an app that showed the likelihood of a person getting into an accident at a location in any
of the five boroughs of New York. We planned on doing so by putting map points at places where accidents had
previously occurred, both non-fatal as well as fatal.

How it works
The Android phone has the GPS feature enabled and a location service which is available upon connecting to the
internet. This locational information is sent as a query to the server via HTTP and the server receives this
information as coordinates and is able to retrieve an accident report of the area by calculating the number of
incidents in a 500 meters radius around the point. This report is retrieved as a summation of the number injured,
killed and the two most common contributing factors in the accident. This is then sent back to the phone in a
JSON format. The phone receives it by HTTP, decodes it and puts the results on the screen. Once the location
service in the app is turned on, the background color in the app changes based on the report depending on
whether the area is safe, passable or unsafe. A dark blue color represents an unsafe neighborhood, a medium
blue represents a passable neighborhood and light blue represents a safe neighborhood.

Mark Dologuin
My responsibilities to the project boiled down to the phone and server components. On the phone’s side, I was
able to create the basic app and the basic functionality of grabbing location data, send it to the server and have
the server respond back with its own data which is then shown on the phone screen.
On the server end, I created a PHP-front end to the PostgreSQL with PostGIS extension. The PHP page is
accessed by the phone which prompts the PHP page to query the PostgreSQL. This is where the bulk of the
problems we’ve encountered occurred. The php/database connection was not reliable for an unknown issue
which is apparent in the failures of querying the database seen on the user-experience of the phone. This also
prompted us to reduce the amount of data queried to better the reliability issues hence we went from many
accident reports comprising of location of accident, date, type and aggravating factors and many more to simply
amount of people injured, died and two factors within a 500 meter area.

Priyanka Verma
I dealt a lot with the data used in the project. My responsibilities included gathering, querying, tweaking and testing
the data at different times throughout the project. My responsibilities were changed a lot depending on what
worked for Mark and what didn't. Initially, the plan was for me to extrapolate the data based on location. I tried
methodologies for safety extrapolation but problems with the database made me stop that work. Thus, we
decided to place map points on incidents around the user's location. While I was working on this, it was proposed
during our presentation that an easier way to carry it out would be to summarize the data around the location of
the user. I helped in building the query which summarized the results of the crashes and optimize it in hopes of
alleviating the problems Mark encountered with the PHP/DATABASE which ultimately prompted us to abandon the
bigger queries for the summation of the data. I came up with the demarcations which categorized what made a
place safe, passable or unsafe based on mock maps created on QGIS. I also did much of the testing of the app at
various locations around NYC. I did a lot of the non-technical work involved including looking up literature on
android and PostGRES and PostGIS, organizational paper/presentations for the project.

Anahi Garnelo
My main responsibility in this project was creating the user interface. I created and experimented with the images
needed to create our logo, the splash page and our main activity page as seen in our Github repository in the
folder called images. Once the images had been set and Mark had finished implementing the basic functionality of
app, I began working on implementing our user interface.
The splash page was created with the intention of priming as this would expose the user to our terms: “Safe”,
“Unsafe” and “Passable” and the colors that represented these terms. Some small group testing was done with
the images of our splash page and it was decided that the blue splash page was the one that would best
represent our application as blue is a calming color and this was deemed the best option given that our app is
about safety.
The main activity page was split into three sections with a map fragment, a “Get My Location” button and a table
with our statistics. Using the parsed data, I was able to display the number of people killed, injured and the two
contributing factors in a table. The background of our main activity page changes based on the statistics returned
and we also display a label on top our table as “Safe”, “Passable” and “Unsafe” using the appropriate color. We
added a fourth color, purple, to account for the instances when we are unable to access the database and at the
launch of the application. Also, to maintain a uniform look, all text in the app was displayed using the same font we
used for our logo.

Testing
With the app fully functioning in time, we had a good amount of time to test it. The app was tested in Downtown
and the Upper East Side of Manhattan as well as parts of Queens. It seemed to work well in all these locations and
yielded interesting results about the areas. We also got other people at Hunter College to test our app and they
were liked how simplistic and informative the app was.

Future Work
We would like to work more towards our original plan of having map points on the map which showed the actual
locations of the accidents on the app. Since the modes of accidents were also listed in the data, we would like to
incorporate that into the app in order to make it mode specific. For example, if the app was being using by a
pedestrian, it would only show the accidents that were relevant to pedestrians.
Source Code
Repository: https://github.com/magliter/AreYouSafe

PHP File: https://github.com/magliter/AreYouSafe/blob/Data_Cleanup/QUERY/query.php

1. http://www.androidhive.info/2013/07/how-to-implement-android-splash-screen-2/

2. http://stackoverflow.com/questions/2748830/how-to-change-background-color-in-android-app

Potrebbero piacerti anche