Browse Source

added tests for conditions identified in #19

pull/20/head
boB Rudis 5 years ago
parent
commit
dc7f1df791
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 1
      NAMESPACE
  2. 2
      NEWS.md
  3. 2
      man/cdcfluview.Rd
  4. 7
      tests/testthat/test-cdcfluview.R

1
NAMESPACE

@ -29,7 +29,6 @@ importFrom(dplyr,filter)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(jsonlite,fromJSON)
importFrom(lubridate,epiweek)
importFrom(purrr,discard)
importFrom(purrr,keep)
importFrom(purrr,map)

2
NEWS.md

@ -1,6 +1,8 @@
# cdcfluview 0.9.0
- fix bug in epiweek computation in ilinet() thanks to a bug report by @jturtle (#19)
- included cloc metrics and refreshed README
-
# cdcfluview 0.7.0

2
man/cdcfluview.Rd

@ -4,7 +4,7 @@
\name{cdcfluview}
\alias{cdcfluview}
\alias{cdcfluview-package}
\title{Retrieve 'U.S'.' Flu Season Data from the 'CDC' 'FluView' Portal}
\title{Retrieve Flu Season Data from the United States Centers for Disease Control and Prevention ('CDC') 'FluView' Portal}
\description{
The U.S. Centers for Disease Control (CDC) maintains a portal
\url{http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html} for

7
tests/testthat/test-cdcfluview.R

@ -16,6 +16,13 @@ test_that("New API works", {
skip_on_cran()
nat_dat <- ilinet(region="national", years=1997:2018)
expect_equal(unique(diff(nat_dat$week_start)), 7)
expect_equal(
as.character(unique(lubridate::wday(unique(nat_dat$week_start), label=TRUE))),
"Sun"
)
expect_that(ilinet("national", years=2017), is_a("data.frame"))
expect_that(ilinet("hhs", years=2017), is_a("data.frame"))
expect_that(ilinet("census", years=2017), is_a("data.frame"))

Loading…
Cancel
Save