You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note (2023-05-23): since version 0.6.0, the `fetch_{tbl,classic,df,json,csv}`
19
-
functions have been replaced by the `fetch()` function, which almost always
20
-
returns a tibble, except when used with a limited number of older endpoints
21
-
(such as `delphi()` and `meta()`), where it will output a nested list structure.
22
-
If you encounter an error like
23
-
24
-
```{r}
25
-
Error in fetch_tbl(.) : could not find function "fetch_tbl"
26
17
```
27
-
28
-
please update to use `fetch()` instead. If instead you encounter
29
-
30
-
```{r}
31
-
Error in fetch(.) : could not find function "fetch"
18
+
# A tibble: 6 × 15
19
+
geo_value signal source geo_type time_type time_value
20
+
<chr> <chr> <chr> <fct> <fct> <date>
21
+
1 us smoothed_cli fb-surv… nation day 2021-04-05
22
+
2 us smoothed_cli fb-surv… nation day 2021-04-06
23
+
3 us smoothed_cli fb-surv… nation day 2021-04-07
24
+
4 us smoothed_cli fb-surv… nation day 2021-04-08
25
+
5 us smoothed_cli fb-surv… nation day 2021-04-09
26
+
6 us smoothed_cli fb-surv… nation day 2021-04-10
27
+
# ℹ 9 more variables: direction <dbl>, issue <date>,
28
+
# lag <int>, missing_value <int>, missing_stderr <int>,
29
+
# missing_sample_size <int>, value <dbl>, stderr <dbl>,
30
+
# sample_size <dbl>
32
31
```
33
32
34
-
please update to the newest `epidatr`.
33
+
## Installation
35
34
36
-
Note (2022-08-02): the package that this installs is being renamed from
37
-
`delphi.epidata` to `epidatr`. To migrate, run the installation command above,
38
-
followed by `remove.packages("delphi.epidata")`, and adjust all references to
39
-
the package name accordingly. For a short-term patch, a snapshot of the package
40
-
can be still be installed with the old name by specifying
41
-
`ref="delphi.epidata-before-rename"`.
35
+
Install the latest version using [`pak`](https://cran.r-project.org/package=pak)
36
+
package
42
37
43
-
## Usage
38
+
```R
39
+
pak::pkg_install("cmu-delphi/epidatr")
40
+
```
44
41
45
-
TODO
42
+
CRAN version coming soon.
46
43
47
-
## API Keys
44
+
###API Keys
48
45
49
-
The Delphi API will soon require a (free) API key for full functionality.
50
-
The `epidatr` client will automatically look for this key in the R option `delphi.epidata.key`
51
-
and then from the environment variable `DELPHI_EPIDATA_KEY`.
52
-
We recommend storing your key in `.Renviron` file, which R will read by default.
53
-
You can do this with `usethis::edit_r_environ()` and there enter `DELPHI_EPIDATA_KEY=<your-key>`.
54
-
An alternative is [the dotenv package](https://github.com/gaborcsardi/dotenv/).
55
-
To generate your key, register for a pseudo-anonymous account
56
-
[here](https://api.delphi.cmu.edu/epidata/admin/registration_form), and see more discussion on
57
-
the [general API website](https://cmu-delphi.github.io/delphi-epidata/api/api_keys.html).
46
+
The Delphi API requires a (free) API key for full functionality. To generate
47
+
your key, register for a pseudo-anonymous account
48
+
[here](https://api.delphi.cmu.edu/epidata/admin/registration_form)and see more
49
+
discussion on the [general API
50
+
website](https://cmu-delphi.github.io/delphi-epidata/api/api_keys.html). The
51
+
`epidatr` client will automatically look for this key in the R option
52
+
`delphi.epidata.key` and then from the environment variable
53
+
`DELPHI_EPIDATA_KEY`. We recommend storing your key in `.Renviron` file, which R
54
+
will read by default.
58
55
59
-
Note that for the time being, the private endpoints (i.e. those prefixed with`pvt`) will require
60
-
a separate key that needs to be passed as an argument.
56
+
Note that for the time being, the private endpoints (i.e. those prefixed with
57
+
`pvt`) will require a separate key that needs to be passed as an argument.
61
58
62
59
## Development Environment
63
60
@@ -79,15 +76,13 @@ devtools::check() # check package for errors
79
76
The release consists of multiple steps which can be all done via the GitHub website:
80
77
81
78
1. Go to [create_release GitHub Action](https://github.com/cmu-delphi/epidatr/actions/workflows/create_release.yml) and click the `Run workflow` button. Enter the next version number or one of the magic keywords (patch, minor, major) and hit the green `Run workflow` button.
82
-
1. The action will prepare a new release and will end up with a new [Pull Request](https://github.com/cmu-delphi/epidatr/pulls)
83
-
1. Let the code owner review the PR and its changes and let the CI check whether everything builds successfully
84
-
1. Once approved and merged, another GitHub action job starts which automatically will
79
+
2. The action will prepare a new release and will end up with a new [Pull Request](https://github.com/cmu-delphi/epidatr/pulls)
80
+
3. Let the code owner review the PR and its changes and let the CI check whether everything builds successfully
81
+
4. Once approved and merged, another GitHub action job starts which automatically will
85
82
1. create a git tag
86
-
1. create another [Pull Request](https://github.com/cmu-delphi/epidatr/pulls) to merge the changes back to the `dev` branch
87
-
1. create a [GitHub release](https://github.com/cmu-delphi/epidatr/releases) with automatically derived release notes
88
-
1. Done
89
-
90
-
TODO release to CRAN
83
+
2. create another [Pull Request](https://github.com/cmu-delphi/epidatr/pulls) to merge the changes back to the `dev` branch
84
+
3. create a [GitHub release](https://github.com/cmu-delphi/epidatr/releases) with automatically derived release notes
0 commit comments