https://github.com/faradayio/energy
Energy use information client
https://github.com/faradayio/energy
Last synced: 12 months ago
JSON representation
Energy use information client
- Host: GitHub
- URL: https://github.com/faradayio/energy
- Owner: faradayio
- License: mit
- Created: 2011-07-11T22:59:16.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2011-07-15T17:18:38.000Z (almost 15 years ago)
- Last Synced: 2025-03-06T18:41:34.279Z (about 1 year ago)
- Language: Ruby
- Homepage: http://energy.brighterplanet.com
- Size: 89.8 KB
- Stars: 2
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: MIT-LICENSE.txt
Awesome Lists containing this project
README
=energy
Get energy use estimates for flights, rail trips, and automobile trips (more coming soon!). BETA from Brighter Planet.
==BETA
This is beta software and subject to change at any time.
==Examples
===Fuel used by a Bentley
?> Energy::AutomobileTrip.fuel_use(:make => 'Bentley', :distance => 500)
=> [how many litres of gas a Bentley uses to drive 500km]
===Fuel used by a Continental Airlines flight
?> Energy::Flight.fuel_use(:airline => 'Continental Airlines')
=> [how many litres of aviation fuel a Continental Airlines flight consumes]
===Fuel used by an Amtrak train
?> Energy::RailTrip.fuel_use(:rail_class => 'intercity', :distance => 500)
=> [how many litres of diesel an intercity uses over 500km]
==TODO
* always provide a conversion of, for example, fuel use in litres to energy use in joules to be true to the intent of the gem
* decide how we expect people to use this gem (maybe it should be more like Carbon and not define its own classes)
* hit impact.brighterplanet.com or energy.brighterplanet.com directly
Copyright 2011 Brighter Planet, Inc.