Skip to content

fluview_clinical queries return duplicate results #48

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

Closed
pedritom-amzn opened this issue Apr 16, 2020 · 1 comment
Closed

fluview_clinical queries return duplicate results #48

pedritom-amzn opened this issue Apr 16, 2020 · 1 comment
Assignees
Labels
bug data quality Engineering Used to filter issues when synching with Asana help wanted

Comments

@pedritom-amzn
Copy link
Contributor

problem: fluview_clinical queries seem to always return duplicate results, even accounting for the same release date.

from dfarrow0@ offline:

I checked, and can confirm they are duplicated in the database. I think is is not supposed to be this way. I suspect problem with unique key constraint.

impact: if customers don't expect duplicates, their usage of the data may be incorrect.

proposal: if the duplicates are unexpected, fix the bug causing them. if they are expected, update the documentation for this source to make it clear to customers.


example: https://delphi.midas.cs.cmu.edu/epidata/api.php?source=fluview_clinical&regions=nat&epiweeks=202001 currently returns:
{"result":1,"epidata":[{"release_date":"2020-04-13","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-16","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-11","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-14","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-12","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-15","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-10","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-14","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-11","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-15","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-13","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-16","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-10","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-14","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-11","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461},{"release_date":"2020-04-15","region":"nat","issue":202014,"epiweek":202001,"lag":13,"total_specimens":64980,"total_a":5651,"total_b":9647,"percent_positive":23.5426,"percent_a":8.69652,"percent_b":14.8461}],"message":"success"}
notice, for example, the row for release_date 2020-04-14 occurs 3 times.

@dmytrotsko
Copy link
Contributor

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug data quality Engineering Used to filter issues when synching with Asana help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants