Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -125,12 +125,51 @@ else:
|
|
125 |
for coordinates in shelters_coordinates:
|
126 |
distances.append(haversine(coordinates[0], coordinates[1], user_coordinates[0], user_coordinates[1]))
|
127 |
|
128 |
-
shelters['zipcode_score'] = [distances /
|
129 |
|
130 |
# urgency
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
# duration
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
# services
|
135 |
|
136 |
st.table(shelters)
|
|
|
125 |
for coordinates in shelters_coordinates:
|
126 |
distances.append(haversine(coordinates[0], coordinates[1], user_coordinates[0], user_coordinates[1]))
|
127 |
|
128 |
+
shelters['zipcode_score'] = [distances / max(distances)]
|
129 |
|
130 |
# urgency
|
131 |
|
132 |
+
# Immidiate
|
133 |
+
# --> immidiate: 0
|
134 |
+
# --> high: 0.5
|
135 |
+
# --> moderate: 1
|
136 |
+
|
137 |
+
# High
|
138 |
+
# --> immidiate: 0.25
|
139 |
+
# --> high: 0
|
140 |
+
# --> moderate = 0.75
|
141 |
+
|
142 |
+
# Moderate
|
143 |
+
# --> immidiate: 0.75
|
144 |
+
# --> high: 0.25
|
145 |
+
# --> moderate: 0
|
146 |
+
|
147 |
# duration
|
148 |
|
149 |
+
# Overnight
|
150 |
+
# --> overnight: 0
|
151 |
+
# --> temp: 0.5
|
152 |
+
# --> trans: 0.75
|
153 |
+
# --> long: 1
|
154 |
+
|
155 |
+
# Temp
|
156 |
+
# --> overnight: 0.25
|
157 |
+
# --> temp: 0
|
158 |
+
# --> trans: 0.25
|
159 |
+
# --> long: 0.75
|
160 |
+
|
161 |
+
# Trans
|
162 |
+
# --> overnight: 0.75
|
163 |
+
# --> temp: 0.25
|
164 |
+
# --> trans: 0
|
165 |
+
# --> long: 0.25
|
166 |
+
|
167 |
+
# Long
|
168 |
+
# --> overnight: 1
|
169 |
+
# --> temp: 0.75
|
170 |
+
# --> trans: 0.5
|
171 |
+
# --> long: 0
|
172 |
+
|
173 |
# services
|
174 |
|
175 |
st.table(shelters)
|