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

Improve consistency on city names and adding a validator #1118

Merged
merged 4 commits into from
Aug 28, 2024

Conversation

jespino
Copy link
Contributor

@jespino jespino commented Aug 26, 2024

I added a check for the geolocations to detect duplications, normally means that you have written the city with two different spellings, that can lead to hidding pins in the map, so for consistency I'm checking that. This PR also applies the changes in the names of the cities to keep them consistent.

page/src/misc/geolocations.json Show resolved Hide resolved
@scraly
Copy link
Owner

scraly commented Aug 27, 2024

Thanks, it's a good idea :)

The script found 2 duplicated coordinates:

Duplicate coordinates: Bangalore (India) and Bengaluru (India)
Duplicate coordinates: Bengaluru (India) and Bangalore (India)
Duplicate coordinates: Detroit (USA) and Detroit, MI (USA)
Duplicate coordinates: Detroit, MI (USA) and Detroit (USA)

Can you fix them in your branch please?

@jespino
Copy link
Contributor Author

jespino commented Aug 28, 2024

@scraly fixed, also I added a more diffuse way of checking the coincidence, from exact match to really close match. That way I was able to capture more duplicates.

@scraly
Copy link
Owner

scraly commented Aug 28, 2024

It's better thanks :)

@scraly scraly merged commit fb023c2 into scraly:main Aug 28, 2024
5 checks passed
@scraly
Copy link
Owner

scraly commented Aug 28, 2024

FYI some other duplicate cities exist:

  "Belo Horizonte (Brazil)": {
    "latitude": -19.919052,
    "longitude": -43.9386685
  },
  "Belo Horizonte, MG (Brazil)": {
    "latitude": -19.9227318,
    "longitude": -43.9450948
  },

If you want to improve your script :)

@scraly
Copy link
Owner

scraly commented Aug 28, 2024

And:

  "Buenos Aires (Argentina)": {
    "latitude": -34.6075682,
    "longitude": -58.4370894
  },
  "Buenos Ares (Argentina)": {
    "latitude": -34.63974725,
    "longitude": -58.4446923529756
  }

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