nguyenuy / healthsee

An area Healthscore Calculator
2 stars 0 forks source link

Define backend API that is called by frontend API. Mock data output #2

Open nguyenuy opened 5 years ago

nguyenuy commented 5 years ago

This is to ensure end-to-end functionality as we are defining the call that is made by the frontend to the backend. We should mock the function call here and output.

def get_highest_scores_zipcodes(number=10)
'''returns a list of zipcodes
'''

def get_lowest_scores_zipcodes(number=10)
'''returns a list of zipcodes
'''

def get_similar_zipcodes(zipcode)
'''returns a list of zipcodes
'''

def get_total_normalized_health_score(zipcode)
'''returns score for a zipcode e.g. 1.2334
'''

def get_normalized_metrics(zipcode):
'''returns a dict of metrics for a zipcode
e.g. {'closures': 0.07510431154381086, 
        'facilities_offering_cancer_detect': 0.3145833333333333, 
         'people_per_bed': 0.009659300587313813, 
         'people_per_physician': 0.00014008228023620884}
'''

def get_zipcode_info(zipcode):
''' returns zipcode info as a dict. See uszipcode library for more info
'''

def get_zipcode_coordinates(zipcode):
'''returns zipcode coordinates as a tuple. e.g. (21.0, 21.0)
'''