def subsidized_residential_feasibility( parcels, settings, add_extra_columns_func, parcel_sales_price_sqft_func, parcel_is_allowed_func, parcels_geography): kwargs = settings['feasibility'].copy() kwargs["only_built"] = False kwargs["forms_to_test"] = ["residential"] # step 1 utils.run_feasibility(parcels, parcel_sales_price_sqft_func, parcel_is_allowed_func, **kwargs) feasibility = orca.get_table("feasibility").to_frame() # get rid of the multiindex that comes back from feasibility feasibility = feasibility.stack(level=0).reset_index(level=1, drop=True) # join to parcels_geography for filtering feasibility = feasibility.join(parcels_geography.to_frame()) # add the multiindex back feasibility.columns = pd.MultiIndex.from_tuples( [("residential", col) for col in feasibility.columns]) feasibility = policy_modifications_of_profit(feasibility, parcels) orca.add_table("feasibility", feasibility)
def subsidized_residential_feasibility(parcels, settings, add_extra_columns_func, parcel_sales_price_sqft_func, parcel_is_allowed_func, parcels_geography): kwargs = settings['feasibility'].copy() kwargs["only_built"] = False kwargs["forms_to_test"] = ["residential"] # step 1 utils.run_feasibility(parcels, parcel_sales_price_sqft_func, parcel_is_allowed_func, **kwargs) feasibility = orca.get_table("feasibility").to_frame() # get rid of the multiindex that comes back from feasibility feasibility = feasibility.stack(level=0).reset_index(level=1, drop=True) # join to parcels_geography for filtering feasibility = feasibility.join(parcels_geography.to_frame()) # add the multiindex back feasibility.columns = pd.MultiIndex.from_tuples([ ("residential", col) for col in feasibility.columns ]) feasibility = policy_modifications_of_profit(feasibility, parcels) orca.add_table("feasibility", feasibility) df = orca.get_table("feasibility").to_frame() df = df.stack(level=0).reset_index(level=1, drop=True) df.to_csv("runs/run{}_feasibility_{}.csv".format( orca.get_injectable("run_number"), orca.get_injectable("year")))
def feasibility(parcels, settings, parcel_sales_price_sqft_func, parcel_is_allowed_func): kwargs = settings['feasibility'] utils.run_feasibility(parcels, parcel_sales_price_sqft_func, parcel_is_allowed_func, **kwargs)
def alt_feasibility(parcels, settings, parcel_sales_price_sqft_func, parcel_is_allowed_func): kwargs = settings['feasibility'] config = sqftproforma.SqFtProFormaConfig() config.parking_rates["office"] = 1.5 config.parking_rates["retail"] = 1.5 utils.run_feasibility(parcels, parcel_sales_price_sqft_func, parcel_is_allowed_func, config=config, **kwargs) f = subsidies.policy_modifications_of_profit( orca.get_table('feasibility').to_frame(), parcels) orca.add_table("feasibility", f)
def alt_feasibility(parcels, settings, parcel_sales_price_sqft_func, parcel_is_allowed_func): kwargs = settings['feasibility'] config = sqftproforma.SqFtProFormaConfig() config.parking_rates["office"] = 1.5 config.parking_rates["retail"] = 1.5 utils.run_feasibility(parcels, parcel_sales_price_sqft_func, parcel_is_allowed_func, config=config, **kwargs) f = subsidies.policy_modifications_of_profit( orca.get_table('feasibility').to_frame(), parcels) orca.add_table("feasibility", f)
def alt_feasibility(parcels, settings, parcel_sales_price_sqft_func, parcel_is_allowed_func): kwargs = settings['feasibility'] config = sqftproforma.SqFtProFormaConfig() config.parking_rates["office"] = 1.5 config.parking_rates["retail"] = 1.5 config.building_efficiency = .85 config.parcel_coverage = .85 # use the cap rate from settings.yaml config.cap_rate = settings["cap_rate"] utils.run_feasibility(parcels, parcel_sales_price_sqft_func, parcel_is_allowed_func, config=config, **kwargs) f = subsidies.policy_modifications_of_profit( orca.get_table('feasibility').to_frame(), parcels) orca.add_table("feasibility", f)
def subsidized_residential_feasibility(parcels, settings, add_extra_columns_func, parcel_sales_price_sqft_func, parcel_is_allowed_func, parcels_geography): kwargs = settings['feasibility'].copy() kwargs["only_built"] = False kwargs["forms_to_test"] = ["residential"] config = sqftproforma.SqFtProFormaConfig() # use the cap rate from settings.yaml config.cap_rate = settings["cap_rate"] # step 1 utils.run_feasibility(parcels, parcel_sales_price_sqft_func, parcel_is_allowed_func, config=config, **kwargs) feasibility = orca.get_table("feasibility").to_frame() # get rid of the multiindex that comes back from feasibility feasibility = feasibility.stack(level=0).reset_index(level=1, drop=True) # join to parcels_geography for filtering feasibility = feasibility.join(parcels_geography.to_frame()) # add the multiindex back feasibility.columns = pd.MultiIndex.from_tuples([ ("residential", col) for col in feasibility.columns ]) feasibility = policy_modifications_of_profit(feasibility, parcels) orca.add_table("feasibility", feasibility) df = orca.get_table("feasibility").to_frame() df = df.stack(level=0).reset_index(level=1, drop=True)
def alt_feasibility(parcels, settings, parcel_sales_price_sqft_func, parcel_is_allowed_func): kwargs = settings['feasibility'] config = sqftproforma.SqFtProFormaConfig() config.parking_rates["office"] = 1.5 config.parking_rates["retail"] = 1.5 config.building_efficiency = .85 config.parcel_coverage = .85 # use the cap rate from settings.yaml config.cap_rate = settings["cap_rate"] utils.run_feasibility(parcels, parcel_sales_price_sqft_func, parcel_is_allowed_func, config=config, **kwargs) f = subsidies.policy_modifications_of_profit( orca.get_table('feasibility').to_frame(), parcels) orca.add_table("feasibility", f)
def feasibility(parcels, settings, parcel_sales_price_sqft_func, parcel_is_allowed_func): kwargs = settings['feasibility'] utils.run_feasibility(parcels, parcel_sales_price_sqft_func, parcel_is_allowed_func, **kwargs)