Browse Source

pre-CRAN flight check

tags/v0.5.2
boB Rudis 6 years ago
parent
commit
0f7a77204d
  1. 1
      .Rbuildignore
  2. 3
      DESCRIPTION
  3. 2
      NAMESPACE
  4. 6
      R/cdcfluview-package.R
  5. 2
      R/datasets.r
  6. 4
      R/get_state_data.r
  7. 6
      R/zzz.r
  8. 18
      cran-comments.md
  9. 2
      man/hhs_regions.Rd

1
.Rbuildignore

@ -7,3 +7,4 @@
^README_files/
^README_files/.*
^README-.*
^cran-comments\.md$

3
DESCRIPTION

@ -2,7 +2,7 @@ Package: cdcfluview
Type: Package
Title: Retrieve U.S. Flu Season Data from the CDC FluView Portal
Version: 0.5.1
Date: 2016-12-05
Date: 2016-12-06
Author: Bob Rudis (bob@rud.is)
Maintainer: Bob Rudis <bob@rud.is>
Encoding: UTF-8
@ -25,6 +25,7 @@ Imports:
utils,
purrr,
readr,
jsonlite,
V8
Depends:
R (>= 3.2.0)

2
NAMESPACE

@ -9,6 +9,7 @@ import(dplyr)
import(httr)
import(utils)
import(xml2)
importFrom(jsonlite,fromJSON)
importFrom(purrr,discard)
importFrom(purrr,keep)
importFrom(purrr,map)
@ -16,3 +17,4 @@ importFrom(purrr,map_chr)
importFrom(purrr,map_df)
importFrom(purrr,map_lgl)
importFrom(readr,read_csv)
importFrom(readr,type_convert)

6
R/cdcfluview-package.R

@ -10,8 +10,8 @@
#' @name cdcfluview
#' @docType package
#' @author Bob Rudis (bob@@rud.is)
#' @import httr xml2 dplyr utils
#' @import httr xml2 dplyr utils V8
#' @importFrom purrr map map_df map_chr map_lgl discard keep
#' @importFrom readr read_csv
#' @import V8
#' @importFrom readr read_csv type_convert
#' @importFrom jsonlite fromJSON
NULL

2
R/datasets.r

@ -15,7 +15,7 @@
#' @keywords datasets
#' @name hhs_regions
#'
#' @references \url{https://www.hhs.gov/iea/regional/}
#' @references \url{https://www.hhs.gov/about/agencies/iea/regional-offices/index.html}
#' @usage data(hhs_regions)
#' @note Last updated 2015-08-09.
#' @format A data frame with 59 rows and 4 variables

4
R/get_state_data.r

@ -38,8 +38,8 @@ get_state_data <- function(years=as.numeric(format(Sys.Date(), "%Y"))) {
res <- httr::content(tmp, as="parsed")
ctx <- v8()
ctx$eval(JS(sprintf("var dat=%s;", res)))
ctx <- V8::v8()
ctx$eval(V8::JS(sprintf("var dat=%s;", res)))
res <- ctx$get("dat", flatten=FALSE)
out <- suppressMessages(readr::type_convert(res$datadownload))

6
R/zzz.r

@ -2,9 +2,9 @@
if (!interactive()) return()
packageStartupMessage(paste0("cdcfluview is under *active* development. ",
"There are *breaking changes*. ",
"See https://github.com/hrbrmstr/cdcfluview for info/news."))
# packageStartupMessage(paste0("cdcfluview is under *active* development. ",
# "There are *breaking changes*. ",
# "See https://github.com/hrbrmstr/cdcfluview for info/news."))
}

18
cran-comments.md

@ -0,0 +1,18 @@
## 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
* win-builder (devel and release)
## R CMD check results
0 errors | 0 warnings | 0 notes
---
This is a bug-fix release.
The CDC changed over to using https URLs which broke the core function.
Their state API also changed from returning a CSV file to a JSON direct response.
Tests have been added as well.

2
man/hhs_regions.Rd

@ -25,7 +25,7 @@ This dataset contains the names, numbers, regional offices for-,
Last updated 2015-08-09.
}
\references{
\url{https://www.hhs.gov/iea/regional/}
\url{https://www.hhs.gov/about/agencies/iea/regional-offices/index.html}
}
\keyword{datasets}

Loading…
Cancel
Save