This PR provides parameterization for key features of the pro forma and developer models. Specifically, these changes allow users to provide callback functions that modify:
In pro forma model:
DataFrame passed to lookup method
Revenue, cost, and profit calculations
In developer model:
Selection of buildings for development
These changes pave the way for a parcel model that implements more robust feedback loops from conditions in the simulated real estate market to pro forma and developer calculations.
Details
Developer model
The pick() method has a new parameter, custom_selection_func, which allows users to specify how the buildings to build are selected. The intervention into the developer code is here.
Pro Forma model
The lookup() method has several new parameters that allow modifications to the lookup DataFrame, and the calculations that return revenue, cost, and profit. The callback functions passed to these arguments must have a certain set of parameters themselves, which are described in the docstrings.
The interventions are in the core code here and here and a few lines below the latter link.
Other changes
Refactored lookup back into the main SqFtProForma object, as I thought it was an unnecessary layer of abstraction.
Some formatting changes and minor refactoring for readability
Summary
This PR provides parameterization for key features of the pro forma and developer models. Specifically, these changes allow users to provide callback functions that modify:
In pro forma model:
In developer model:
These changes pave the way for a parcel model that implements more robust feedback loops from conditions in the simulated real estate market to pro forma and developer calculations.
Details
Developer model
The
pick()
method has a new parameter,custom_selection_func
, which allows users to specify how the buildings to build are selected. The intervention into the developer code is here.Pro Forma model
The
lookup()
method has several new parameters that allow modifications to the lookup DataFrame, and the calculations that return revenue, cost, and profit. The callback functions passed to these arguments must have a certain set of parameters themselves, which are described in the docstrings.The interventions are in the core code here and here and a few lines below the latter link.
Other changes
lookup
back into the mainSqFtProForma
object, as I thought it was an unnecessary layer of abstraction.