Include locations that have a population of zero on GeoNames (MNTOR-2913) #4168
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References:
Jira: MNTOR-2913
Description
This PR does two things:
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.
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 theLocationAutocompleteInput
is still very responsive and seems to work well.How to test
/user/welcome
to the “Enter info” step.