-
Notifications
You must be signed in to change notification settings - Fork 0
/
walkability.py
45 lines (33 loc) · 1019 Bytes
/
walkability.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# kernelspec:
# display_name: Python 3 (ipykernel)
# language: python
# name: python3
# ---
# %%
from common import configvar
from services import walkscore
# %%
@configvar(type=float)
def value_of_walkability():
"""
Annual dollar value of location's walkability.
value_of_walkability should be the extra value from living in a location that is extremely
walkable vs living in a location that is not at all walkable.
Internally, we use the formula
value_of_walkability * walkscore / 100
to get the value of walkability for a location.
See https://www.walkscore.com/methodology.shtml for the meaning of Walk Score values from 0 - 100.
"""
# %%
FACTOR_NAME = 'Walkability'
def annual_value(loc):
return value_of_walkability() * walkscore.walk_score(loc) / 100
# %% tags=["active-ipynb"]
# annual_value(SEATTLE)