Skip to content

Latest commit

 

History

History

node-client

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

HTM Engine Client

This is a Node.js application. In order to start it, you should have the HTM Engine running and a the Python HTTP server at ../python-engine/webapp.py running on port 8081. See the main README for all the details.


This program has two primary parts:

Traffic Data Pusher

New York City traffic data is fetched from a River View data source currently hosted on http://data.numenta.org. When the program starts, it retrieves every possible stream of data for each available traffic route provided by the NYCDOT. Using the HTM Engine HTTP interface provided by the Skeleton HTM Engine App, it creates a model for each traffic stream, then fetches all the historical data for each route from River View, passing each value into the HTM Engine.

If you are just starting the server for the first time, this will take a really, really long time (2-3 hours?). It actually depends on how much traffic data is in River View (it could be up to 6 months). So, sit back and relax, cause your CPUs are going to be pegged.

If you kill the application and restart it, it will start pulling data again from River View from the point it left off, so don't worry about restarting. You can always kill it and restart later. This also means that every time the HTM Engine Client is started, it will try to get back up-to-date with the traffic data, by fetching all the data it hasn't seen and pushing it into the HTM Engine.

Upon receiving new data points from the client, the HTM Engine will queue up all the data and process them over time. Since the client app is pushing a whole lot more data than the HTM Engine can process, it will take awhile for it to run all the data through its NuPIC models and get up-to-date. That's why this initial startup process takes a long time, because NuPIC is processing 153 routes, each with potentially thousands of data points.

All this data fetching and pushing happens in the background, in a file called traffic-pusher.

Web Server

The web application gives you several different ways of viewing traffic speed information and the associated anomaly likelihoods generated by the HTM Engine. Hopefully, it is self-explanitory: http://localhost:8083.

This server uses Dygraphs and Google Maps to visualize traffic anomalies.

To Run

Change into this directory and run:

npm start

Point your browser to http://localhost:8083.