Skip to content
Mikey Saugstad edited this page Aug 9, 2022 · 1 revision

This likely won't be the final form or location for our API documentation, but I am at least going to include my answers to peoples' questions about our API here so I don't have to do the work of explaining multiple times. And then we can use this info to create formal documentation sometime soon.

How does clustering work for /attributes and /attributesWithLabels

TODO

What is the scoring algorithm for /v2/access/score/streets

For every street that has been audited in the given bounding box...

  1. Create an approximately 10 meter buffer around the street
  2. Count the number of clusters of each label type that are within that 10 meter buffer around the street. Note that at this time we are only including our four primary label types in this: curb ramps, missing curb ramps, obstacles, and surface problems.
  3. Multiply the count for each label type by a significance value (curb ramp +0.75, missing curb ramp -1, obstacle -1, and surface problem -1), and sum them. Curb ramps were given a lower weight due to their high frequency and the fact that barriers impact mobility more acutely.
    sum = 0.75*curb_ramp_count - 1*missing_ramp_count - 1*obstacle_count - 1*surface_problem_count
    
  4. Normalize this sum between 0 and 1 using a sigmoid function
    score = 1 / (1 + e^(-sum))
    

For example, if a street has 8 curb ramps, no missing curb ramps, 2 obstacles, and 2 surface problems, the score would be:

sum = 0.75*8 - 1*0 - 1*2 - 1*2 = 2
score = 1 / (1 + e^(-2)) = 0.88