Skip to content

first pass endpoints vignette (for closing #96) #102

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
wants to merge 10 commits into from

Conversation

dsweber2
Copy link
Contributor

@dsweber2 dsweber2 commented May 11, 2023

Documenting the various endpoints in a single vignette. Some of the endpoints were producing various errors, and some I just couldn't find documentation on the potential values. All of them that are erroring have both eval=false and a TODO describing what went wrong below the code cell. I've discussed that somewhat with @dshemetov.

For closing #96

Things to do:

  • Internal Server error on meta_afhsb
    meta_afhsb doesn't exist in the API so we don't need to either document it or support it
  • Internal Server error on afhsb
    afhsb doesn't exist in the API so we don't need to either document it or support it
  • Error on pvt_norostat:
    Error in paste(value, collapse = ",") : cannot coerce type 'closure' to vector of type 'character'
    Switched to a -2 "no results" error, so I'm not sure why I was getting this error at all. Unclear which data table this is, as there are 8 norostat data tables.
  • confirm all endpoints

@dsweber2
Copy link
Contributor Author

oh, there was also a broken link in endpoints that I fixed

Copy link
Contributor

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far. Could you make a todo list in the OP of this PR for endpoints that still need work?

@dsweber2 dsweber2 marked this pull request as ready for review May 16, 2023 03:53
@dsweber2
Copy link
Contributor Author

Besides the afhsb endpoints, the only missing endpoint now is meta, which appears to not be supported by the API anymore either (getting a 500 error when I try to run it).

@dsweber2 dsweber2 enabled auto-merge May 18, 2023 05:22
Copy link
Contributor

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly just NoroSTAT left, added a comment there

pvt_norostat(auth = Sys.getenv("SECRET_API_AUTH_NOROSTAT"), locations = "ma", epiweeks = epirange(199001, 202105)) %>% fetch_classic()
```

TODO can't seem to get a relevant sample, the example in the reference section is borked.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you able to find a working example for NoroSTAT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your comment about the database now. I looked at the server code and the db is norostat_point_diffs. Could you look at that one?

Copy link
Contributor Author

@dsweber2 dsweber2 May 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought I'd checked that one, but going through it again, it still gives a -2; actually, the API directly via https://api.delphi.cmu.edu/epidata/norostat/?auth=yourAuth&epiweeks=201233&location=1 gives a -2, even though

mysql> SELECT * FROM norostat_point_diffs LIMIT 10;

returns real data.
So this may be a problem upstream
Edit: not posting private data....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, well for the time being let's put norostat request arguments that should work in this vignette and we can recompile it later when upstream problems are resolved.

@dsweber2
Copy link
Contributor Author

disabling automerge to have this merge after #99

dsweber2 and others added 10 commits May 19, 2023 15:02
namely, several endpoints are returning errors, and there are some with
uncertain sourcing. documented inline with TODOs
I hadn't compiled the html link that was broken into the actual man
pages.
I added links to `covidcast_epidata` to `covidcast_meta` and
`covidcast`, and an example of the use of * to covidcast.
When I compiled the roxygen2 docs, an extra \details{ appeared, which I
assume is because of a change someone else made that didn't get compiled in.
the delphi endpoint's fetch_classic output has been modified to just
names, since the full output is too long
Secrets moved to the .Reviron file.
Duplicate copy of Google Health Trends removed
various references fixed
@dshemetov dshemetov changed the base branch from dev to ds/fetch May 20, 2023 00:44
@brookslogan brookslogan deleted the branch cmu-delphi:ds/fetch May 23, 2023 17:33
@dsweber2
Copy link
Contributor Author

So I hadn't actually merged this into the fetch branch, not sure how to move forward; should I make a new pull request?

@brookslogan
Copy link
Contributor

Hmm, even after I restored the target branch, it's not letting me reopen or change the target branch. @dsweber2 Could you please open a new PR?

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

Successfully merging this pull request may close these issues.

3 participants