Browse Source

pre-CRAN flight check

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

+ 1
- 0
.Rbuildignore View File

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

+ 2
- 1
DESCRIPTION View File

@ -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
- 0
NAMESPACE View File

@ -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)

+ 3
- 3
R/cdcfluview-package.R View File

@ -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

+ 1
- 1
R/datasets.r View File

@ -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


+ 2
- 2
R/get_state_data.r View File

@ -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))


+ 3
- 3
R/zzz.r View File

@ -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
- 0
cran-comments.md View File

@ -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.

+ 1
- 1
man/hhs_regions.Rd View File

@ -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