Update StatisticalBaseModel.py
Browse files- StatisticalBaseModel.py +4 -1
StatisticalBaseModel.py
CHANGED
|
@@ -4,12 +4,13 @@ import datetime
|
|
| 4 |
|
| 5 |
class ProcessedSynapse(TypedDict):
|
| 6 |
id: Optional[str]
|
|
|
|
| 7 |
property_id: Optional[str]
|
| 8 |
listing_id: Optional[str]
|
| 9 |
address: Optional[str]
|
| 10 |
city: Optional[str]
|
| 11 |
state: Optional[str]
|
| 12 |
-
|
| 13 |
price: Optional[float]
|
| 14 |
beds: Optional[int]
|
| 15 |
baths: Optional[float]
|
|
@@ -47,6 +48,7 @@ class StatisticalBaseModel:
|
|
| 47 |
:return: the average days on market
|
| 48 |
"""
|
| 49 |
# You probably want to update this based on the current season. Houses sell faster in the summer.
|
|
|
|
| 50 |
if market == 'San Francisco':
|
| 51 |
return 23
|
| 52 |
elif market == 'Los Angeles':
|
|
@@ -96,6 +98,7 @@ class StatisticalBaseModel:
|
|
| 96 |
:return: the multiplier for the predicted price
|
| 97 |
"""
|
| 98 |
# You may want to add more logic to check zipcode for more precise price multipliers
|
|
|
|
| 99 |
if market == 'San Francisco':
|
| 100 |
return 1.18 # 18% above listing
|
| 101 |
elif market == 'Los Angeles':
|
|
|
|
| 4 |
|
| 5 |
class ProcessedSynapse(TypedDict):
|
| 6 |
id: Optional[str]
|
| 7 |
+
nextplace_id: Optional[str]
|
| 8 |
property_id: Optional[str]
|
| 9 |
listing_id: Optional[str]
|
| 10 |
address: Optional[str]
|
| 11 |
city: Optional[str]
|
| 12 |
state: Optional[str]
|
| 13 |
+
zip_code: Optional[str]
|
| 14 |
price: Optional[float]
|
| 15 |
beds: Optional[int]
|
| 16 |
baths: Optional[float]
|
|
|
|
| 48 |
:return: the average days on market
|
| 49 |
"""
|
| 50 |
# You probably want to update this based on the current season. Houses sell faster in the summer.
|
| 51 |
+
# Add more logic for other housing markets!
|
| 52 |
if market == 'San Francisco':
|
| 53 |
return 23
|
| 54 |
elif market == 'Los Angeles':
|
|
|
|
| 98 |
:return: the multiplier for the predicted price
|
| 99 |
"""
|
| 100 |
# You may want to add more logic to check zipcode for more precise price multipliers
|
| 101 |
+
# Add more logic for other housing markets!
|
| 102 |
if market == 'San Francisco':
|
| 103 |
return 1.18 # 18% above listing
|
| 104 |
elif market == 'Los Angeles':
|