Make the best choice to get across town!
Switch branches/tags
Nothing to show
Pull request Compare This branch is 63 commits behind codeforamerica:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
BART_google_transit
KCMetro_google_transit
MUNI_google_transit
SEPTA_bus
SoundTransit_gtfs
minifier
public
spec
.gitignore
Gemfile
Gemfile.lock
README.md
choices.rb
config.ru
constants.rb
fare.rb
taxi_generate.rb

README.md

TranspoChoices is all about making better transportation choices. However, our calculations are only approximations and should be treated as such.

API

/info_for_route_bing?origin=<>&destination=<>

Example:

info_for_route_bing?destination=88%202nd%20%20st,%20san%20francisco&origin=563%2046th%20st%20oakland

Returns:

{
	"units": {
		"distance": "kilometers",
		"duration": "seconds",
		"emissions": "milliliters of innocent bunny blood",
		"cost": "usd",
		"calories": "calories"
	},
	"results": {
		"driving": {
			"distance": 15.943,
			"duration": 900
		},
		"walking": null,
		"transit": {
			"duration": 2427,
			"while_walking": {
				"distance": 1.872,
				"duration": 1347
			},
			"while_transit": {
				"duration": 1080
			}
		}
	}
}

Deploying

some features depend on ruby 1.9.2. to deploy on heroku, use the following when creating:
heroku create --stack bamboo-mri-1.9.2 <appname>
or the following, to fix an existing app:
heroku stack:migrate bamboo-mri-1.9.2 <appname>

Assumptions

Walking

Cost - Always rounding to $0

Time - Calculated by Bing Walking Routes API

Calories - Using this table, assuming a 190lb individual

CO2 Emissions - Always rounding to 0

Biking

Cost - $0.115 per mile

Time - Calculated by Bing Walking Routes API, then extrapolates biking time

Calories - Assuming 30km/h and 24 calories/km

CO2 Emissions - Always rounding to 0

Transit

Cost - Uses fare data in the GTFS specification (SF Muni and BART only)

Time - Calculated by Bing Transit Routes API

Calories - Calories burned while walking to transit, then 1.4-1.7 calories per idle minute

CO2 Emissions - Currently not calculated

Taxi

Cost - Uses TaxiFareFinder.com

Time - Calculated by Bing Driving Routes API

Calories - 1.4-1.7 calories per idle minute

CO2 Emissions - 8.788 kg CO2/gallon gasoline at 35.4 km/gallon

Driving

Cost - Uses $0.585, the 2011 AAA average cost per mile

Time - Calculated by Bing Driving Routes API

Calories - 1.4-1.7 calories per idle minute

CO2 Emissions - 8.788 kg CO2/gallon gasoline at 35.4 km/gallon

Who Made This?

TranspoChoices was lovingly made by Code for America fellows Aaron Ogle and Talin Salway, with design work by Pete Fecteau. Feel free to send feedback to aaron [at] codeforamerica.org.

This is cool. Can I help?

Sure! TranspoChoices is an open-source project and we're looking for people with all kinds of talent to get involved.

Code for America Tracker