Browse Source

CRAN release prep

tags/v0.7.0 v0.7.0
boB Rudis 3 years ago
parent
commit
3b57ff19cd
No known key found for this signature in database GPG Key ID: 2A514A4997464560
20 changed files with 60 additions and 41 deletions
  1. +0
    -4
      .Rbuildignore
  2. +7
    -7
      DESCRIPTION
  3. +8
    -2
      NEWS.md
  4. +8
    -5
      R/zzz.r
  5. +13
    -15
      README.Rmd
  6. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-10-1.png
  7. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-12-1.png
  8. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-1.png
  9. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-2.png
  10. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-3.png
  11. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-4.png
  12. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-5.png
  13. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-6.png
  14. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-7-1.png
  15. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-8-1.png
  16. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-8-2.png
  17. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-8-3.png
  18. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-8-4.png
  19. BIN
      README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-9-1.png
  20. +24
    -8
      cran-comments.md

+ 0
- 4
.Rbuildignore View File

@ -10,9 +10,6 @@
^doc$
^CONDUCT\.md$
^codecov\.yml$
^.*\.Rproj$
^\.Rproj\.user$
^\.travis\.yml$
^.*md$
^crunch
^crunch/
@ -21,7 +18,6 @@
^README_files/.*
^README-.*
^cran-comments\.md$
^codecov\.yml$
^Makefile$
^README.gfm-ascii_identifiers_files
^README.gfm-ascii_identifiers_files/


+ 7
- 7
DESCRIPTION View File

@ -1,22 +1,22 @@
Package: cdcfluview
Type: Package
Encoding: UTF-8
Title: Retrieve 'U.S'.' Flu Season Data from the 'CDC' 'FluView' Portal
Title: Retrieve 'U.S'. Flu Season Data from the 'CDC' 'FluView' Portal
Version: 0.7.0
Date: 2017-11-04
Authors@R: c(
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5670-2640")),
person("Craig", "McGowan", email = "mcgowan.cj@gmail.com", role = "ctb")
person("Craig", "McGowan", email = "mcgowan.cj@gmail.com", role = "ctb",
comment = c(ORCID = "0000-0002-6298-0185"))
)
Author: Bob Rudis (bob@rud.is)
Maintainer: Bob Rudis <bob@rud.is>
Description: The U.S. Centers for Disease Control (CDC) maintains a portal
Description: The 'U.S.' Centers for Disease Control ('CDC') maintains a portal
<http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html> for
accessing state, regional and national influenza statistics as well as
Mortality Surveillance Data. The Flash interface makes it difficult and
time-consuming to select and retrieve influenza data. This package
provides functions to access the data provided by the portal's underlying API.
Mortality Surveillance Data. The web interface makes it difficult and
time-consuming to select and retrieve influenza data. Tools are provided
to access the data provided by the portal's underlying 'API'.
URL: https://github.com/hrbrmstr/cdcfluview
BugReports: https://github.com/hrbrmstr/cdcfluview/issues
License: MIT + file LICENSE


+ 8
- 2
NEWS.md View File

@ -1,7 +1,13 @@
# cdcfluview 0.7.0
* The CDC changed most of their API endpoints to support a new HTML interface.
There are many breaking changes but also many new data endpoints.
* The CDC changed most of their API endpoints to support a new HTML interface and
re-jiggered the back-end API. Craig McGowan updated the old cdcfluview API function
to account for the changes. However, the new API endpoints provided additional
data features and it seemed to make sense to revamp the package to fit more in line
with the way the APIs were structured. Legacy cdcfluview functions have been deprecated
and will display deprecation messages when run. The new cdcfluview package API
changes a few things about how you work with the data but the README and examples
show how to work with it.
# cdcfluview 0.5.2


+ 8
- 5
R/zzz.r View File

@ -1,11 +1,14 @@
# this is only used during active development phases before/after CRAN releases
.onAttach <- function(...) { # nocov start
if (!interactive()) return()
packageStartupMessage(paste0("cdcfluview is under *active* development. ",
"There are numerous changes & dprecations.\n",
"See https://github.com/hrbrmstr/cdcfluview for info/news."))
if (sample(c(TRUE, FALSE), 1, prob = c(0.1, 0.9))) {
packageStartupMessage(paste0("There are numerous changes & deprecations. ",
"See https://github.com/hrbrmstr/cdcfluview for info/news."))
}
# packageStartupMessage(paste0("cdcfluview is under *active* development. ",
# "There are numerous changes & dprecations.\n",
# "See https://github.com/hrbrmstr/cdcfluview for info/news."))
} # nocov end

+ 13
- 15
README.Rmd View File

@ -3,7 +3,10 @@ title: ""
pagetitle: ""
output: rmarkdown::github_document
---
```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
knitr::opts_chunk$set(message=FALSE, warning=FALSE, fig.retina=2)
options(width=120)
```
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/cdcfluview)](https://cran.r-project.org/package=cdcfluview)
[![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/cdcfluview.svg?branch=master)](https://travis-ci.org/hrbrmstr/cdcfluview)
[![Coverage Status](https://img.shields.io/codecov/c/github/hrbrmstr/cdcfluview/master.svg)](https://codecov.io/github/hrbrmstr/cdcfluview?branch=master)
@ -67,13 +70,9 @@ The following data sets are included:
devtools::install_github("hrbrmstr/cdcfluview")
```
```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
options(width=120)
```
## Usage
```{r message=FALSE, warning=FALSE, error=FALSE}
```{r}
library(cdcfluview)
library(hrbrthemes)
library(tidyverse)
@ -84,13 +83,13 @@ packageVersion("cdcfluview")
### Age Group Distribution of Influenza Positive Tests Reported by Public Health Laboratories
```{r message=FALSE, warning=FALSE}
```{r}
glimpse(age_group_distribution(years=2015))
```
### Retrieve CDC U.S. Coverage Map
```{r message=FALSE, warning=FALSE}
```{r}
plot(cdc_basemap("national"))
plot(cdc_basemap("hhs"))
plot(cdc_basemap("census"))
@ -107,7 +106,7 @@ glimpse(geographic_spread())
### Laboratory-Confirmed Influenza Hospitalizations
```{r message=FALSE, warning=FALSE, fig.width=10, fig.height=7.5}
```{r fig.width=10, fig.height=7.5}
surveillance_areas()
glimpse(fs_nat <- hospitalizations("flusurv"))
@ -131,7 +130,7 @@ glimpse(hospitalizations("ihsp", "Oklahoma", years=2015))
### Retrieve ILINet Surveillance Data
```{r message=FALSE, warning=FALSE}
```{r}
walk(c("national", "hhs", "census", "state"), ~{
ili_df <- ilinet(region = .x)
@ -152,7 +151,7 @@ walk(c("national", "hhs", "census", "state"), ~{
### Retrieve weekly state-level ILI indicators per-state for a given season
```{r message=FALSE, warning=FALSE, fig.width=10, fig.height=5}
```{r fig.width=10, fig.height=5}
ili_weekly_activity_indicators(2017)
xdf <- map_df(2008:2017, ili_weekly_activity_indicators)
@ -171,7 +170,7 @@ count(xdf, weekend, activity_level_label) %>%
### Pneumonia and Influenza Mortality Surveillance
```{r message=FALSE, warning=FALSE}
```{r}
(nat_pi <- pi_mortality("national"))
select(nat_pi, wk_end, percent_pni, baseline, threshold) %>%
@ -192,13 +191,13 @@ select(nat_pi, wk_end, percent_pni, baseline, threshold) %>%
### Retrieve metadata about U.S. State CDC Provider Data
```{r message=FALSE, warning=FALSE}
```{r}
state_data_providers()
```
### Retrieve WHO/NREVSS Surveillance Data
```{r message=FALSE, warning=FALSE}
```{r}
glimpse(xdat <- who_nrevss("national"))
mutate(xdat$combined_prior_to_2015_16,
@ -216,7 +215,6 @@ who_nrevss("census", years=2016)
who_nrevss("state", years=2016)
```
## Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-10-1.png View File

Before After
Width: 672  |  Height: 480  |  Size: 74 KiB Width: 672  |  Height: 480  |  Size: 74 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-12-1.png View File

Before After
Width: 672  |  Height: 480  |  Size: 64 KiB Width: 672  |  Height: 480  |  Size: 64 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-1.png View File

Before After
Width: 672  |  Height: 480  |  Size: 59 KiB Width: 672  |  Height: 480  |  Size: 59 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-2.png View File

Before After
Width: 672  |  Height: 480  |  Size: 97 KiB Width: 672  |  Height: 480  |  Size: 97 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-3.png View File

Before After
Width: 672  |  Height: 480  |  Size: 80 KiB Width: 672  |  Height: 480  |  Size: 80 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-4.png View File

Before After
Width: 672  |  Height: 480  |  Size: 123 KiB Width: 672  |  Height: 480  |  Size: 123 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-5.png View File

Before After
Width: 672  |  Height: 480  |  Size: 109 KiB Width: 672  |  Height: 480  |  Size: 109 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-5-6.png View File

Before After
Width: 672  |  Height: 480  |  Size: 121 KiB Width: 672  |  Height: 480  |  Size: 121 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-7-1.png View File

Before After
Width: 960  |  Height: 720  |  Size: 100 KiB Width: 960  |  Height: 720  |  Size: 100 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-8-1.png View File

Before After
Width: 672  |  Height: 480  |  Size: 60 KiB Width: 672  |  Height: 480  |  Size: 60 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-8-2.png View File

Before After
Width: 672  |  Height: 480  |  Size: 114 KiB Width: 672  |  Height: 480  |  Size: 114 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-8-3.png View File

Before After
Width: 672  |  Height: 480  |  Size: 120 KiB Width: 672  |  Height: 480  |  Size: 120 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-8-4.png View File

Before After
Width: 672  |  Height: 480  |  Size: 163 KiB Width: 672  |  Height: 480  |  Size: 163 KiB

BIN
README.gfm-ascii_identifiers_files/figure-gfm/unnamed-chunk-9-1.png View File

Before After
Width: 960  |  Height: 480  |  Size: 54 KiB Width: 960  |  Height: 480  |  Size: 54 KiB

+ 24
- 8
cran-comments.md View File

@ -1,18 +1,34 @@
## Test environments
* local OS X install, R 3.3.2 & R-devel
* ubuntu 12.04 (on travis-ci), R 3.3.2, R-oldrel and R-devel
* local OS X install, R 3.4.2
* local Ubuntu 16.04 R 3.4.1
* ubuntu 14.04 (on travis-ci), R old/current/devel
* win-builder (devel and release)
* rhub Windows (devel and release)
## R CMD check results
0 errors | 0 warnings | 0 notes
0 errors | 0 warnings | 1 note
---
* This is a maintenance update.
This is a bug-fix release.
## Reverse dependencies
The CDC changed over to using https URLs which broke the core function.
None
---
Their state API also changed from returning a CSV file to a JSON direct response.
The CDC changed most of their API endpoints to support a new HTML interface and
re-jiggered the back-end API. Craig McGowan updated the old cdcfluview API function
to account for the changes. However, the new API endpoints provided additional
data features and it seemed to make sense to revamp the package to fit more in line
with the way the APIs were structured. Legacy cdcfluview functions have been deprecated
and will display deprecation messages when run. The new cdcfluview package API
changes a few things about how you work with the data but the README and examples
show how to work with it.
Tests have been added as well.
Only some examples run on CRAN due to their time consuming nature and the need
to make external calls. Weekly tests are performed on Travis-CI
<https://travis-ci.org/hrbrmstr/cdcfluview> and the package itself has 91%
code coverage during tests <https://codecov.io/github/hrbrmstr/cdcfluview?branch=master>.
All package functions are also evaluated on each new generation of the README.

Loading…
Cancel
Save