cmu-delphi / cmu-delphi/epiforecast-R

Update Epidata client

Open
#12 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
20
Forks
5
PR merge metrics
No merged PRs in 30d

Description

The version of the delphi-epidata client currently in the epiforecast package appears to be broken, with queries such as `Epidata$fluview("nat",201050)` returning
```
$result
[1] -1

$message
[1] "database error"
```

A quick fix for users is to run
```
environment(Epidata$fluview)$BASE_URL <- "https://delphi.cmu.edu/epidata/api.php"
```
or to reassign the `Epidata` object in the package environment to be one from a [current version of delphi-epidata](https://github.com/cmu-delphi/delphi-epidata/blob/main/src/client/delphi_epidata.R).

A proper fix is to update the version of the client used in this package. A cleaner alternative may be to first make the R client in cmu-delphi/delphi-epidata a proper R package, so that it can be expressed as a dependency using `Imports:` and `Remotes:`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting how the epiforecast package includes and initializes the Epidata client, then compare it with src/client/delphi_epidata.R in the current delphi-epidata repository. Run Epidata$fluview("nat",201050) before and after the dependency update. Done means the client uses the current API endpoint and this query no longer returns a database error.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.