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

Incorporate country into place ID #484

Open
Eric-Arellano opened this issue Aug 31, 2024 · 1 comment
Open

Incorporate country into place ID #484

Eric-Arellano opened this issue Aug 31, 2024 · 1 comment

Comments

@Eric-Arellano
Copy link
Contributor

Eric-Arellano commented Aug 31, 2024

Right now, Place IDs follow this scheme:

  • {place}, {state} if state is set, where state is the abbreviation like CA. E.g. San Ramon, CA.
  • {place} if it's a country, e.g. Israel.

Note that neither scheme includes the country code. There are two issues with this:

  • Risk of international collisions if the same place appears with the same state/province abbreviation in >1 country
  • Useful information to the user: they may want to know the country in e.g. search

The Place ID is relevant in these places:

  • URL for the city details page
  • Header in the city details page
  • Scorecard title
  • Search value

When fixing this, we should decide if the Place ID should use abbrevations for the state & and country.

--

We should also revisit how to store states. Right now, we store it as California, CA, which is a little redundant but it is also useful in table view to let you include CA in all the CA values. Should we store the place ID as California, including the URL? If we do that, we need a new attribute like isState. (We already implicitly have isCountry by not setting state at all.)

@Eric-Arellano
Copy link
Contributor Author

We should also revisit how to store states.

The new database will have places.type: {city,county,state,country}, so this type of place-specific ID will become viable.

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

No branches or pull requests

1 participant