Champstarr / hitraffic-work

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hitraffic-work

"Work" will provide geo-coordinate data to supplement data provided by Hawaii Open Data for Traffic Incidents, adding the capability to plot map locations. Data will be stored in a separate database to be utilized by mid and front end developers.

Team Members:

A = Andrew

B = Joanne

Work Modules:

  1. [A] getIncidentData - retrieve JSON data from Traffic API

  2. [J] processAddress - prepare valid address

  3. [J] getGeoCodes - provide valid address to Geo Code API to retrieve geo coordinates (lat=latitude, lng=longitude)

  4. [A] storeIncidents - insert incidents with valid geo coordinates to PostgreSQL database

API Data:

incident_number, date, code, type, address, location, area

Source Data: https://data.honolulu.gov/api/views/INLINE/rows.json?accessType=DOWNLOAD

Notes: 2 hour delay, over 162,000+ records, dates back to Aug 2012

Source Data: http://www4.honolulu.gov/hpdtraffic/

Notes: Real-Time data, requires scrapping (later)

Source: http://open.mapquestapi.com/geocoding/

Notes: Account required (J)

Database: PostgreSQL 9.4.1

Notes: development using Mac OS X version

Production: (TBD)

database name: hitraffic (tbd)

table name: incidents

index: [PK, INT, AUTO]

number: [INT, over 160,000+]

date: [DATE/TIME]

code: [INT or code table?]

type: [STRING or FK to code_index?]

address: [STRING]

location: [STRING]

area: [STRING]

geo_coord: gc_index [FK]

table name: geo_coords

gc_index: [PK, INT, AUTO]

col: lat [FLOAT]

col: lng [FLOAT]

About