Skip to content

Commit

Permalink
Merge pull request #17 from MetropolitanTransportationCommission/buil…
Browse files Browse the repository at this point in the history
…ding-summary

Building summary
  • Loading branch information
fscottfoti committed Apr 14, 2016
2 parents d74cf38 + 4a3ddd3 commit 5bcc052
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions baus/summaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,28 @@ def pda_output(parcels, households, jobs, buildings, taz_geography,
format(run_number, year)
df.to_csv(uf_summary_csv)

@orca.step()
def building_summary(parcels, run_number, year,
buildings,
initial_year, final_year):

if year not in [initial_year, final_year]:
return

df = orca.merge_tables(
'buildings',
[parcels, buildings],
columns=['urban_footprint', 'year_built',
'residential_units','unit_price',
'zone_id','non_residential_sqft',
'deed_restricted_units'])

df2 = df[(df.urban_footprint==1)]

df2.to_csv(
os.path.join("runs", "run%d_building_data_%d.csv" %
(run_number, year))
)

@orca.step()
def parcel_summary(parcels, run_number, year,
Expand Down
1 change: 1 addition & 0 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def get_simulation_models(SCENARIO):

"topsheet",
"parcel_summary",
"building_summary",
"diagnostic_output",
"geographic_summary",
"travel_model_output"
Expand Down

0 comments on commit 5bcc052

Please sign in to comment.