GithubHelp home page GithubHelp logo

emissions-calc's Introduction

emissions-calc

Calculates the distance traveled based on amtrac and airport lookup tables, included.

Both detailed output and error output are in the output directory.

Developer details

Repository: https://github.com/williamscollege/emissions-calc

Script location: Run locally

Developers: Cheryl Handsaker (2018), Updated by Sam Gilman, Cheryl Handsaker (2019)

Stakeholders

Zilkha Center

Instructions

Input

Replace the file travel.csv in the /input folder with your file. Maggie Koperniak is the source for the data. Data includes baggage fees marked with "XAO", "XAA", and "FEE".

IMPORTANT: Data should be sorted in the following order:

  1. Passenger Name ASC then by
  2. Merchant (ASC) then by
  3. Origin City (ASC) then by
  4. Desination City (ASC) then by
  5. Amount (DESC)

Execute

Run on the command line "php index.php"

Produces a summary of the mileage, broken out by train and airline travel.

#Output There are four detailed files produced in the /output directory

processed.csv is the file that outputs each line in the input file with a status code indicating how it was interpreted.

  • P - Processed and included in the mileage calculation
  • C - Credit without a corresponding charge. No mileage is added or subtracted.
  • N - No miles calculated. This indicates the origin and destination city are the same.
  • I - Incidentals. This line assumes these charges are for baggage fees, seat upgrades and meals.
  • M - Manual review needed.
  • X - Coded incidenentals using "XAO", "XAA", and "FEE".
  • E - Error indicates that one of the fields required for processing is missing. Typically this is the origin or destination city.
  • U - Unused. Indicated this line was somehow missed in the processing.

manualreview.csv is a file for items that require human review in context.

unprocessed.csv is a file of the errors encountered, such as missing origin or destination city.

mileage.csv is a file of the rows that go into the calculated mileage.

emissions-calc's People

Contributors

cph2 avatar

Watchers

James Cloos avatar  avatar

Forkers

samsgilman

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.