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

Find all signals for a location #1471

Open
melange396 opened this issue Jun 6, 2024 · 0 comments
Open

Find all signals for a location #1471

melange396 opened this issue Jun 6, 2024 · 0 comments
Labels
api change affect the API and its responses data quality enhancement mysql mysql database related user experience things that affect users of our software or services

Comments

@melange396
Copy link
Collaborator

We may want to be able to answer the question: "What [other] signals are available for this geographic location?"

That is, when someone is looking at data for a particular location, they may be interested in finding other signals available for the same place, (for example) to do comparison/contrasting. Another use case is for a public health official, responsible for some region, who wants to see all the data available and relevant to them. The answer to the question should not just be "other signals that also use the same geographic type/level/resolution (like 'county')", but more specifically, "other signals that have actual data points for the exact same geographic entity (like 'Allegheny County')". Many signals have coverage across most or all locations of their representative geo_types, but some signals are specific to certain regional subsets, and some signals do not have data for some geo_values due to thresholding cutoffs or reporting practices.

The opposite question ("What [other] locations are available for this signal?") should already be easy[-ish] to answer by querying the database in a way that uses the (signal, geo, ...) prefix of an existing index:

UNIQUE INDEX `value_key_gt` (`signal_key_id`, `geo_key_id`, `time_type`, `time_value`)

Answering the question at hand may be as simple as adding a new (geo, signal) index, or we might consider maintaining another (new) table that stores these relations and which is kept up to date during acquisition. In either case, the information should be made available through a new API endpoint, or possibly by adding a special argument to an existing endpoint.

I believe this can be done across "all time" fairly easily, but another layer of usefulness (and complexity) would be to be able to answer for a time range or perhaps just a particular point in time.

@melange396 melange396 added enhancement api change affect the API and its responses data quality user experience things that affect users of our software or services mysql mysql database related labels Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api change affect the API and its responses data quality enhancement mysql mysql database related user experience things that affect users of our software or services
Projects
None yet
Development

No branches or pull requests

1 participant