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

Cloud Migration: Famous Cities #279

Open
mhearne-usgs opened this issue Sep 22, 2021 · 0 comments
Open

Cloud Migration: Famous Cities #279

mhearne-usgs opened this issue Sep 22, 2021 · 0 comments
Labels
cloud_migration Anything that will be done during cloud migration

Comments

@mhearne-usgs
Copy link
Member

Periodically, we have an event occur near a well known city, where that city does not appear on the cities list. Here I describe one possible solution to this.

Assumptions:

  1. a future PAGER system implemented in AWS, with an API gateway to allow a CLI to connect to it
  2. The cities table is stored in a relational database instead of a file.
  3. The cities table is periodically updated from geonames
  4. Tables look like this:

city

id integer primary key
geonameid integer geonames id
asciiname
...

famous_city

id integer primary key
city_id integer foreign key (city.id)

  1. Start with a list of cities like this one:
    https://en.wikipedia.org/wiki/List_of_cities_by_international_visitors
  2. Match the cities on that list with cities in the database, and add the ids of those cities into the famous_city table.
  3. Provide a command line tool that allows users to add "famous" cities to the map:
    adminpager cities EVENTID --add acapulco
  4. This command sends a request through the API gateway to the back end, which returns a list of cities inside that map that match the input string. The user chooses the desired city(ies) from this list. This subset is then sent back through the gateway to a process that adds those cities to the "famous" list. This process avoids the "South San Francisco" problem.

Operationally, any city on the "famous" list which falls inside the ShakeMap boundaries will be guaranteed to appear on the selected cities list (unless there are more than 11 famous cities inside the map, in which case some sorting will occur)

@mhearne-usgs mhearne-usgs added the cloud_migration Anything that will be done during cloud migration label Oct 13, 2021
@mhearne-usgs mhearne-usgs changed the title Famous Cities Cloud Migration: Famous Cities Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloud_migration Anything that will be done during cloud migration
Projects
None yet
Development

No branches or pull requests

1 participant