Skip to content

Permit inequalities for issue, time_value #1085

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

Open
krivard opened this issue Feb 15, 2023 · 0 comments · May be fixed by #1124
Open

Permit inequalities for issue, time_value #1085

krivard opened this issue Feb 15, 2023 · 0 comments · May be fixed by #1124
Labels
api change affect the API and its responses suspect efficacy and usefulness are questionable or unclear user experience things that affect users of our software or services

Comments

@krivard
Copy link
Contributor

krivard commented Feb 15, 2023

With #1070 we now support time_value=* and issue=* in covidcast requests, which prevents users from having to specify ridiculous ranges like 11111111-99999999 in their queries. But if a user wants an open-ended portion of the complete calendar or history, they still have to put in silly values.

Could we support inequalities like the below?

  • all issues on or before some date
  • all issues on or after some date
  • all time_values on or before some date
  • all time_values on or after some date

I'm not sure what a good syntax would be. Some ideas are:

  • <YYYYmmdd <=YYYYmmdd >YYYYmmdd >=YYYYmmdd
  • *-YYYYmmdd YYYYmmdd-*

We'd then have the following mapping to SQL queries:

meaning parameter syntax SQL
one date YYYYmmdd or YYYY-mm-dd issue = YYYYmmdd or time_value = YYYYmmdd
range YYYYmmdd-YYYYmmdd or YYYY-mm-dd--YYYY-mm-dd issue BETWEEN YYYYmmdd AND YYYYmmdd or time_value BETWEEN YYYYmmdd AND YYYYmmdd
any * issue or time_value not included in WHERE clause
open-ended TBD issue < YYYYmmdd or issue <= YYYYmmdd or issue > YYYYmmdd or issue >= YYYYmmdd or similar for time_value
@LeonLu2 LeonLu2 self-assigned this Feb 23, 2023
@LeonLu2 LeonLu2 linked a pull request Apr 6, 2023 that will close this issue
4 tasks
@melange396 melange396 added api change affect the API and its responses user experience things that affect users of our software or services suspect efficacy and usefulness are questionable or unclear labels Aug 22, 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 suspect efficacy and usefulness are questionable or unclear user experience things that affect users of our software or services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants