Skip to content

Commit

Permalink
deflate transit fares to 2010 dollars
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-sijia committed May 18, 2021
1 parent 9dbe1ea commit 8f63f5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lasso/mtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,10 @@ def write_cube_fare_files(
fare_attributes_df = pd.read_csv(os.path.join(outpath, "fare_attributes.txt"))
fare_rules_df = pd.read_csv(os.path.join(outpath, "fare_rules.txt"))

# deflate 2015 fare to 2010 dollars
fare_attributes_df["price"] = fare_attributes_df["price"] * parameters.fare_2015_to_2010_deflator
fare_attributes_df["price"] = fare_attributes_df["price"].round(2)

fare_df = pd.merge(
fare_attributes_df,
fare_rules_df,
Expand Down
3 changes: 3 additions & 0 deletions lasso/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,9 @@ def __init__(self, **kwargs):
self.veh_cap_crosswalk_file = os.path.join(
self.data_file_location, "lookups", "transitSeatCap.csv"
)

# https://app.asana.com/0/12291104512575/1200287255197808/f
self.fare_2015_to_2010_deflator = 0.927
####
#MC
self.widot_count_variable_shp = "AADT_wi"
Expand Down

0 comments on commit 8f63f5a

Please sign in to comment.