GithubHelp home page GithubHelp logo

jkebinger / transit-system-neo4j-example Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 0.0 86 KB

The code to create a simple model of transit times on one line of a transit system using the neo4j graph database

Home Page: http://www.monkeyatlarge.com/projects/redline-travel-time/

Ruby 100.00%

transit-system-neo4j-example's Introduction

Neo4j transit network demo code

This code generated the data behind a visualization of transit times from points across the Boston metro area to Park Street station via just one of the transit lines in the MBTA system.

It isn't well polished Ruby by any stretch, but there aren't a lot of example code for Neo4j and even less for using it from Ruby via the neo4jr-simple gem, so I thought someone might find it useful.

The project page is http://www.monkeyatlarge.com/projects/redline-travel-time/

About the code

create_model.rb contains code to read data about station locations and travel times from the included files (derived from MBTA's GTFS feed) and build a graph model of the red line along with a grid of walking points located every tenth of a mile connected to every station within 1.5 miles.

cost_at_station.rb uses the model created in create_model to print out a file of transit times at various lat,lon points

model_utils.rb contains shared code used by both the above files

haversine.rb contains an implementation by Landon Cox of the haversine distance calculation used to calculate the distance in miles between two points

transit-system-neo4j-example's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.