• Stars
    star
    130
  • Rank 276,554 (Top 6 %)
  • Language
    JavaScript
  • Created almost 7 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸš‰ interactive NYC subway map that adjusts distance based on travel time

NYC Travel Time Map

Animation

How does it work?

The main page is index.html, but most of the code is in map.js. map.js uses d3.js to render the map based on JSON data generated by a couple Python scripts.

If you'd like to set this up yourself, you'll need to unzip the google_transit.zip file into this directory, then run python3 generate_routes_json.py and python3 gtfs_json.py to generate the required subway.js and gtfs_json.js files. These are required by virtual_rider.js, which implements Djiksta-like algorithm for simulating a rider's journey from a starting stop throughout the system. virtual_rider.js is invoked by map.js whenever a stop is clicked, and the results are used to shift the distance of each stop away from the clicked stop.

Adapting to another city

If your city's transit system provides data in the GTFS format, you can probably get this map working fairly well for it. Here's a rough set of steps, which may be incomplete:

  1. Download and unzip the gtfs data, and place the folder (rename it google_transit if it's not called that already).

  2. Use Python 3 to run generate_routes_json.py This generates a file called subway.json, which you'll need.

  3. Use Python 3 to run gtfs_json.py β€” this generates a new copy of the schedules/ folder and its contents.

Feel free to post an issue if you have any questions!

More Repositories

1

Flashlight

The missing Spotlight plugin system
Python
5,390
star
2

ball

Swift
1,632
star
3

lettercrap

a Javascript library that generates dynamic ascii art on the web
JavaScript
178
star
4

web98

fantasy internet simulator
Swift
153
star
5

reeeed

reader mode view for SwiftUI, based on the feeeed app
Swift
103
star
6

openai-streaming-completions-swift

generate streaming LLM completions using openai in swift
Swift
98
star
7

juypter-notebooks

neural network explorations ⚑️ i know it's misspelled
Jupyter Notebook
58
star
8

infinite-app-store

Swift
52
star
9

sous

Swift
40
star
10

uhohlingo

teach yourself anything with short digital lessons that are often completely wrong
Swift
35
star
11

letterdance

Javascript library that makes text transition as you scrollβ€”by animating individual letter positions.
JavaScript
35
star
12

aamoji

⚑ Not updated anymore. Use this fork instead! πŸ”€
Swift
31
star
13

chattoys

Swift
24
star
14

commanding

A simple module for parsing natural-language commands in Python.
Python
21
star
15

astro-bot

Browse the web entirely over SMS β€” no apps required.
Python
19
star
16

SRParticleSystem

Super-fast GPU-based particle system for OpenGL ES on iOS.
Objective-C
18
star
17

tortellini

Swift
18
star
18

m.py

Takes an HTML document, minifies and inlines all CSS and JS. Includes WSGI middleware for platforms like Google AppEngine, and optional memcached caching.
Python
15
star
19

emojicode

Encode bits as emoji. Like base64, but better.
Swift
13
star
20

sketch-scatter

Select some elements and randomly duplicate, scatter and rotate them across your artboard.
11
star
21

Produce-Hunt

The freshest produce, every day. (super insecure + slow! not a real project!)
JavaScript
9
star
22

the-ball

Revolutionary write-only datastore
JavaScript
6
star
23

Sketch

Simple vector graphics app for iPad.
Objective-C
5
star
24

tweet-camera-roll

lurks in your phone, looking at each pic you take and tweeting what the google vision api thinks it is
Swift
4
star
25

StreamKit

Map, filter and fold over collections or arbitrary generators in Objective-C.
Objective-C
3
star
26

beautiful_print

Prettier pretty-printing of HTML, in Python.
Python
3
star
27

PatternPicker

A drop-in color picker component that also suppports gradients and repeating patterns.
Swift
3
star
28

facespace

🎭 facespace
Swift
3
star
29

Ratty

an app for vegan rice pilaf.
Objective-C
3
star
30

SwipeAwayTableViewController

A UITableViewController subclass that you can dismiss by swiping downward. More convenient than an unreachable "Done" button on a large iPhone.
Swift
3
star
31

onehundrednewyorkers

A simple data visualization of 100 random responses to the American Community Survey.
JavaScript
2
star
32

hey-there-its-me

Python
2
star
33

ptrptr

...
Swift
2
star
34

googly-eyes

Objective-C
1
star
35

bigeditor

🌍 it's gonna be a big editor
JavaScript
1
star
36

botmachine

bot machine
Python
1
star
37

republicare

HTML
1
star
38

spiceX

🌢🌢🌢
Python
1
star
39

SQExpandingTableView

A simple, UITableView-esque component that expands a single cell in focus as you scroll.
Objective-C
1
star
40

popcorn

Objective-C
1
star
41

Stickers

Objective-C
1
star
42

gamified

HTML
1
star
43

feeeed-website

TypeScript
1
star
44

arglitch

ar but vr
JavaScript
1
star
45

spookimon

spooky
Swift
1
star
46

weatherping

Objective-C
1
star
47

facenet

Objective-C
1
star
48

computopias

Python
1
star
49

flightsim

GDScript
1
star
50

Idea-Hunt

A simple app for making and sharing lists of ideas that anyone can add to. ideahunt.meteor.com
JavaScript
1
star
51

cityscape2

metro oriented game for transit oriented teens
JavaScript
1
star