Skip to content

Uses facts about zipcodes to optimize routing for search, etc.

Notifications You must be signed in to change notification settings

kevin-helliwell/zipcode_optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

What This Does

This program uses facts about zipcodes in the United States to deduce a user's possible state location based on the first digit of their zipcode if location access is not available/provided.

This is intended as logical scaffolding to optimize what listings to show in the absence of user location access for a project I work on.

Logic

If we know based on the first digit of a user's zipcode where the user cannot be, that means we can render fewer total listings. At the same time, the listings we do render are closer to where the user might be.

Compared to rendering all listings for the entire United States, this approach is way more efficient. The absolute worst case scenario would involve rendering listings for 30 states. That still means the listings for 20 states do not have to be rendered at all. 🙂

image

Image Source: https://en.wikipedia.org/wiki/ZIP_Code

Scratch Work

This is some of the scratch work I did via ExcaliDraw (awesome tool, highly recommend) when I was working through the idea of implementing this repo.

I wanted to account for edge cases, like if the user is on the near the border of two different zipcode groups. I thought a graph would be perfect for this since it will show all the possible scenarios of bordering zipcode groups based on how connected the nodes are.

image

About

Uses facts about zipcodes to optimize routing for search, etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages