This source code is accompanied by a tutorial screencast.
WARNING: This project is currently broken because of an issue with the River View data service.
This application has two or more parts.
This server runs NuPIC within the HTM Engine. You must follow those installation instructions before this will work. Then you should start the server with supervisord (see the README).
This fetches the data, controls the HTM Engine via HTTP, pipes in mountains of data, displays results in webapp.
3. River View Traffic Data Service
This application is using a data service called River View, which is currently running at http://data.numenta.org. It provides temporal data within a 6-month window, which includes NYC traffic data.
This project started with a fork of the skeleton-htmengine-app. That project is a great place to start if you want to create your own HTM Engine instance. All you really need to change is the MySQL database name and RabbitMQ queue names.
- HTM Engine, which also needs:
- NTA Utils
- Supervisor
- MySQL
- RabbitMQ ( just do it )
- Node.js
Also, if you want to view the map of all the traffic paths (at http://localhost:8083/map
) you'll need a Google Maps API key.
export GOOGLE_MAPS_API_KEY=<your key>
Read and follow python-engine/README.md
, then continue with the directions below.
This provides a simple GET
/POST
/PUT
HTTP interface on top of the HTM Engine, which is really useful if you don't want to write your HTM application in python. HTM services must be running in supervisor for this HTTP interface to work properly.
cd python-engine
python webapp.py
This will run at http://localhost:8080.
cd node-client
npm install .
npm start
This will run at http://localhost:8083.
Immediately after startup, the Node.js client application will start pulling traffic data from River View and pushing it into the HTM Engine. A model is created for every traffic route available. For example, traffic path "1" contains traffic data for "11th ave n ganservoort - 12th ave @ 40th st" in Manhattan. This correlates to an HTM Engine model named "1". You can see the raw data for this model by querying the Python HTM Engine HTTP wrapper at http://localhost:8080/1. You should see a bunch of text data in the response.
There are lots of Dygraphs and Google Maps.