Skip to content

Instantly share code, notes, and snippets.

@router.get('/viz_noah/{knn_visualization}')
async def viz(project_code: str):
'''
Returns a plotly scatterplot visualization of sites that have a similar probability of either being “Suitable” or “Unsuitable” to build a bridge.
The goal of this visualization is to allow the stakeholders involved in bridge location planning and selecting process to find patterns in the features that each location has that will ultimately allow their processing time to decrease over time.
The yellow dot is the site project number being input, while the green dots are the nearest neighbors to this location according to their probabilities.
The probability for each site is measured according to features input into the semi-supervised model such as:
-Bridge Classification
-Crossing (current method of crossing the water)
-Days per year river is flooded