Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include locations that have a population of zero on GeoNames (MNTOR-2913) #4168

Merged
merged 6 commits into from
Feb 7, 2024

Conversation

flozia
Copy link
Collaborator

@flozia flozia commented Feb 7, 2024

References:

Jira: MNTOR-2913

Description

This PR does two things:

  1. Do not filter locations with a population of zero
    We’ve been filtering out locations with a population of zero so we do not bloat the dataset too much. This seems to have the potential for false positives and we’ve received a report that a user could not enter their populated location. I checked and GeoNames does not list a population. Even though I’ve contributed the population number from the latest 2020 US Census to that location and this would already fix the issue for the certain location chances are high that this will be the only instance — so let’s better include those locations.

  2. Reduce filesize of locationAutocompleteData.json
    The original filesize of the locations JSON we generate was 4.4 MB. When including all the locations with no entered population the size grew to ~22 MB. Just by excluding info we do not necessarily need for the location autosuggestion shrunk it to ~12 MB and with the additional shorting of the key names we are now at ~8 MB — at this size the LocationAutocompleteInput is still very responsive and seems to work well.

How to test

  1. Navigate to /user/welcome to the “Enter info” step.
  2. Search for the previously missing location mentioned in MNTOR-2913.

@flozia flozia requested review from mansaj and Vinnl February 7, 2024 11:20
@flozia flozia self-assigned this Feb 7, 2024
@flozia flozia requested a review from rhelmer February 7, 2024 22:06
@mansaj mansaj merged commit 1f6bc47 into main Feb 7, 2024
12 of 13 checks passed
@mansaj mansaj deleted the mntor-2913 branch February 7, 2024 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants