Allow un-routable neighborhoods to be recommended#806
Conversation
aaronxsu
left a comment
There was a problem hiding this comment.
This looks good and is working as advertised.
Unrelated to this PR and might not be the case on staging or prod in the future: I noticed some neighborhood images' URLs might be outdated locally. We might be running the scripts again on staging and production so this will not be relevant? Or maybe we create a tech debt card to fix this so that if the URL is broken, we show a placeholder etc? Anyway, this does not block merging this PR- just putting this on your radar!
|
Thanks, @aaronxsu!
Good catch, I didn't see this! I won't open up an issue for it for now since it looks like this example is working on staging (screenshot below) and we will need to re-run data updates soon anyways. I wonder if these URLs are referencing the old thumbnail-sized images that are no longer on S3? We created new full-sized images as part of the frontend rewrite and any vestigial thumbnails should've been cleaned up in latest dev data so hopefully this just resolves once we update with new data.
|
If a neighborhood is unroutable we don't create an scaled accessibility weight but instead define a default weight value, 1. This is the "best" weight, but because there is no route information to evaluate these neighborhoods were previously being binned in the "too far" list and the accessibility sorting doesn't matter. Now that unroutable neighborhoods can be recommended, the weight actually holds value in the overall score. Instead we should set these neighborhoods to the worst weighted value, 0, so unroutable neighborhoods will be sorted to the bottom of the recommendation list, as needed.
16f8fb3 to
0cd5f83
Compare

Overview
We are no longer using a neighborhoods "routability" as a constraint to be recommended. A neighborhood that has a 2+ hour commute by car or transit can now be recommended as well as neighborhoods that may not have transit routing but are close enough to walk.
Checklist
fixup!commits have been squashedCHANGELOG.mdupdated with summary of features or fixes, followingKeep a Changelog guidelines
README.mdupdated if necessary to reflect the changes./scripts/formatto lint, format, and fix the application source code.Demo
Neighborhood close to destination but previously un-routable and un-recommended. With updates now recommended:

Testing Instructions
scripts/serverResolves #805