Explorar o código

update configuration settings

Martin %!s(int64=7) %!d(string=hai) anos
pai
achega
b9b90f8c41
Modificáronse 3 ficheiros con 8 adicións e 5 borrados
  1. 1 1
      commute.py
  2. 1 1
      properties.py
  3. 6 3
      ranking.py

+ 1 - 1
commute.py

@@ -222,7 +222,7 @@ def analyze_locations(commutes, num_locations):
         to_load = []
 
         for lat, lon, price in rows:
-            if not (250000 < price < 450000):
+            if not (250000 < price < 500000):
                 continue
 
             closest = None

+ 1 - 1
properties.py

@@ -4,7 +4,7 @@ import config
 
 def load_properties(require_active=True):
     with db.connect() as conn:
-        rows = conn.select('select id, lat, lon, size, price, bedrooms, ber from properties where price<450000')
+        rows = conn.select('select id, lat, lon, size, price, bedrooms, ber from properties where price<550000 and property_type != "Site"')
 
         res = {}
         for property_id, lat, lon, size, price, bedrooms, ber in rows:

+ 6 - 3
ranking.py

@@ -20,6 +20,8 @@ _BER_RANKINGS = {
 
 _BER_CONF = [
     (25, 1),
+    (60, 0.9),
+    (140, 0.8),
     (300, 0.1),
 ]
 
@@ -30,7 +32,7 @@ _SIZE_CONF = [
 ]
 
 _BEDROOMS_CONF = [
-    (2, 0.3),
+    (3, 0.6),
     (4, 1),
     (10, 1),
 ]
@@ -41,8 +43,9 @@ _COMMUTE_CONF = [
 ]
 
 _PRICE_CONF = [
-    (250, 1),
-    (450, 0.5),
+    (300, 1),
+    (400, 0.8),
+    (550, 0.3),
 ]