diff --git a/DESCRIPTION b/DESCRIPTION index 7cc0b57..6cf80a2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,8 +3,8 @@ Type: Package Encoding: UTF-8 Title: Retrieve Flu Season Data from the United States Centers for Disease Control and Prevention ('CDC') 'FluView' Portal -Version: 0.9.0 -Date: 2019-01-23 +Version: 0.9.1 +Date: 2020-04-01 Authors@R: c( person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5670-2640")), @@ -20,12 +20,12 @@ Authors@R: c( ) Maintainer: Bob Rudis Description: The 'U.S.' Centers for Disease Control and Prevention (CDC) maintain - a portal for + a portal for accessing state, regional and national influenza statistics as well as 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://gitlab.com/hrbrmstr/cdcfluview +URL: https://git.rud.is/hrbrmstr/cdcfluview BugReports: https://gitlab.com/hrbrmstr/cdcfluview/issues License: MIT + file LICENSE LazyData: true @@ -39,6 +39,7 @@ Imports: tools, dplyr, jsonlite, + tibble, stats, utils, sf, @@ -47,4 +48,4 @@ Imports: readr, MMWRweek, units (>= 0.4-6) -RoxygenNote: 6.1.1 +RoxygenNote: 7.1.0 diff --git a/NAMESPACE b/NAMESPACE index ebf1673..e2143b4 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -40,6 +40,7 @@ importFrom(readr,read_csv) importFrom(readr,type_convert) importFrom(sf,st_read) importFrom(stats,setNames) +importFrom(tibble,tibble) importFrom(tools,file_path_sans_ext) importFrom(utils,URLencode) importFrom(utils,globalVariables) diff --git a/NEWS.md b/NEWS.md index 173bd5b..cfad521 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ - renamed `pi_mortality` columns regarding the week to `week_*` instead of `wk_*` for consistency with `ilinet` (#21). +- fixed CRAN check errors # cdcfluview 0.9.0 diff --git a/R/cdcfluview-package.R b/R/cdcfluview-package.R index 29b4171..4cb4414 100644 --- a/R/cdcfluview-package.R +++ b/R/cdcfluview-package.R @@ -15,6 +15,7 @@ #' @importFrom purrr map map_df map_chr map_lgl discard keep #' @importFrom readr read_csv type_convert #' @importFrom tools file_path_sans_ext +#' @importFrom tibble tibble #' @importFrom dplyr left_join bind_rows mutate filter data_frame %>% arrange #' @importFrom jsonlite fromJSON #' @importFrom stats setNames diff --git a/R/get-weekly-flu-report.r b/R/get-weekly-flu-report.r index db79642..defb1f4 100644 --- a/R/get-weekly-flu-report.r +++ b/R/get-weekly-flu-report.r @@ -44,7 +44,7 @@ get_weekly_flu_report <- function() { color <- xml2::xml_text(xml2::xml_find_all(kids, "color"), TRUE) label <- xml2::xml_text(xml2::xml_find_all(kids, "label"), TRUE) - dplyr::data_frame( + tibble::tibble( year = period["year"], week_number = period["number"], state = abbrev, diff --git a/R/mmwr-map.r b/R/mmwr-map.r index 2512b90..8583765 100644 --- a/R/mmwr-map.r +++ b/R/mmwr-map.r @@ -15,7 +15,7 @@ .tmp <- lapply(1962:2050, .start_date) mapply(function(.x, .y) { - data_frame( + tibble::tibble( wk_start = seq(.tmp[[.x]], .tmp[[.y]], "1 week"), wk_end = wk_start + 6, year_wk_num = 1:length(wk_start) diff --git a/README.Rmd b/README.Rmd index 6f38907..0f52d84 100644 --- a/README.Rmd +++ b/README.Rmd @@ -3,13 +3,13 @@ output: rmarkdown::github_document editor_options: chunk_output_type: console --- -```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE} -knitr::opts_chunk$set(message=FALSE, warning=FALSE, fig.retina=2) -options(width=120) +```{r pkg-knitr-opts, include=FALSE} +hrbrpkghelpr::global_opts() +``` + +```{r badges, results='asis', echo=FALSE, cache=FALSE} +hrbrpkghelpr::stinking_badges() ``` -[![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) # I M P O R T A N T @@ -181,9 +181,9 @@ count(xdf, weekend, activity_level_label) %>% ```{r nat-pi-mortality} (nat_pi <- pi_mortality("national")) -select(nat_pi, wk_end, percent_pni, baseline, threshold) %>% - gather(measure, value, -wk_end) %>% - ggplot(aes(wk_end, value)) + +select(nat_pi, week_end, percent_pni, baseline, threshold) %>% + gather(measure, value, -week_end) %>% + ggplot(aes(week_end, value)) + geom_line(aes(group=measure, color=measure)) + scale_y_percent() + scale_color_ipsum(name = NULL, labels=c("Baseline", "Percent P&I", "Threshold")) + @@ -231,4 +231,4 @@ cloc::cloc_pkg_md() ## 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. \ No newline at end of file +Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. \ No newline at end of file diff --git a/README.md b/README.md index cdf0d25..ec12c3e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,22 @@ -[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/cdcfluview)](https://cran.r-project.org/package=cdcfluview) -[![Travis-CI Build +[![Project Status: Active – The project has reached a stable, usable +state and is being actively +developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) +[![Signed +by](https://img.shields.io/badge/Keybase-Verified-brightgreen.svg)](https://keybase.io/hrbrmstr) +![Signed commit +%](https://img.shields.io/badge/Signed_Commits-14%25-lightgrey.svg) +[![Linux 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) +Status](https://codecov.io/gh/hrbrmstr/cdcfluview/branch/master/graph/badge.svg)](https://codecov.io/gh/hrbrmstr/cdcfluview) +[![cran +checks](https://cranchecks.info/badges/worst/cdcfluview)](https://cranchecks.info/pkgs/cdcfluview) +[![CRAN +status](https://www.r-pkg.org/badges/version/cdcfluview)](https://www.r-pkg.org/pkg/cdcfluview) +![Minimal R +Version](https://img.shields.io/badge/R%3E%3D-3.2.0-blue.svg) +![License](https://img.shields.io/badge/License-MIT-blue.svg) # I M P O R T A N T @@ -109,141 +122,132 @@ library(tidyverse) # current verison packageVersion("cdcfluview") +## [1] '0.9.1' ``` - ## [1] '0.8.0' - ### Age Group Distribution of Influenza Positive Tests Reported by Public Health Laboratories ``` r glimpse(age_group_distribution(years=2015)) +## Rows: 1,872 +## Columns: 16 +## $ sea_label "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "20… +## $ age_label 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4… +## $ vir_label A (Subtyping not Performed), A (Subtyping not Performed), A (Subtyping not Performed), A (S… +## $ count 0, 1, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 3, 2, 2, 3, 3, 3, 0, 0, 2, 0, 1, 1, 0, 0… +## $ mmwrid 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2… +## $ seasonid 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,… +## $ publishyearweekid 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3038, 3… +## $ sea_description "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "… +## $ sea_startweek 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2… +## $ sea_endweek 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2… +## $ vir_description "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "… +## $ vir_startmmwrid 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1… +## $ vir_endmmwrid 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3… +## $ wk_start 2015-10-04, 2015-10-11, 2015-10-18, 2015-10-25, 2015-11-01, 2015-11-08, 2015-11-15, 2015-1… +## $ wk_end 2015-10-10, 2015-10-17, 2015-10-24, 2015-10-31, 2015-11-07, 2015-11-14, 2015-11-21, 2015-1… +## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … ``` - ## Observations: 1,872 - ## Variables: 16 - ## $ sea_label "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "20… - ## $ age_label 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4… - ## $ vir_label A (Subtyping not Performed), A (Subtyping not Performed), A (Subtyping not Performed), A (S… - ## $ count 0, 1, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 3, 2, 2, 3, 3, 3, 0, 0, 2, 0, 1, 1, 0, 0… - ## $ mmwrid 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2… - ## $ seasonid 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,… - ## $ publishyearweekid 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2976, 2… - ## $ sea_description "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "… - ## $ sea_startweek 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2… - ## $ sea_endweek 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2857, 2… - ## $ vir_description "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "A-Unk", "… - ## $ vir_startmmwrid 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1397, 1… - ## $ vir_endmmwrid 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3131, 3… - ## $ wk_start 2015-10-04, 2015-10-11, 2015-10-18, 2015-10-25, 2015-11-01, 2015-11-08, 2015-11-15, 2015-1… - ## $ wk_end 2015-10-10, 2015-10-17, 2015-10-24, 2015-10-31, 2015-11-07, 2015-11-14, 2015-11-21, 2015-1… - ## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … - ### Retrieve CDC U.S. Coverage Map ``` r plot(cdc_basemap("national")) ``` - + ``` r plot(cdc_basemap("hhs")) ``` - + ``` r plot(cdc_basemap("census")) ``` - + ``` r plot(cdc_basemap("states")) ``` - + ``` r plot(cdc_basemap("spread")) ``` - + ``` r plot(cdc_basemap("surv")) ``` - + ### State and Territorial Epidemiologists Reports of Geographic Spread of Influenza ``` r glimpse(geographic_spread()) +## Rows: 30,427 +## Columns: 7 +## $ statename "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Al… +## $ url "http://adph.org/influenza/", "http://adph.org/influenza/", "http://adph.org/influenza/", "… +## $ website "Influenza Surveillance", "Influenza Surveillance", "Influenza Surveillance", "Influenza Su… +## $ activity_estimate "No Activity", "No Activity", "No Activity", "Local Activity", "Sporadic", "Sporadic", "Spo… +## $ weekend 2003-10-04, 2003-10-11, 2003-10-18, 2003-10-25, 2003-11-01, 2003-11-08, 2003-11-15, 2003-1… +## $ season "2003-04", "2003-04", "2003-04", "2003-04", "2003-04", "2003-04", "2003-04", "2003-04", "20… +## $ weeknumber "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "1", "2… ``` - ## Observations: 28,151 - ## Variables: 7 - ## $ statename "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Alabama", "Al… - ## $ url "http://adph.org/influenza/", "http://adph.org/influenza/", "http://adph.org/influenza/", "… - ## $ website "Influenza Surveillance", "Influenza Surveillance", "Influenza Surveillance", "Influenza Su… - ## $ activity_estimate "No Activity", "No Activity", "No Activity", "Local Activity", "Sporadic", "Sporadic", "Spo… - ## $ weekend 2003-10-04, 2003-10-11, 2003-10-18, 2003-10-25, 2003-11-01, 2003-11-08, 2003-11-15, 2003-1… - ## $ season "2003-04", "2003-04", "2003-04", "2003-04", "2003-04", "2003-04", "2003-04", "2003-04", "20… - ## $ weeknumber "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "1", "2… - ### Laboratory-Confirmed Influenza Hospitalizations ``` r surveillance_areas() -``` +## surveillance_area region +## 1 flusurv Entire Network +## 2 eip California +## 3 eip Colorado +## 4 eip Connecticut +## 5 eip Entire Network +## 6 eip Georgia +## 7 eip Maryland +## 8 eip Minnesota +## 9 eip New Mexico +## 10 eip New York - Albany +## 11 eip New York - Rochester +## 12 eip Oregon +## 13 eip Tennessee +## 14 ihsp Entire Network +## 15 ihsp Idaho +## 16 ihsp Iowa +## 17 ihsp Michigan +## 18 ihsp Ohio +## 19 ihsp Oklahoma +## 20 ihsp Rhode Island +## 21 ihsp South Dakota +## 22 ihsp Utah - ## surveillance_area region - ## 1 flusurv Entire Network - ## 2 eip California - ## 3 eip Colorado - ## 4 eip Connecticut - ## 5 eip Entire Network - ## 6 eip Georgia - ## 7 eip Maryland - ## 8 eip Minnesota - ## 9 eip New Mexico - ## 10 eip New York - Albany - ## 11 eip New York - Rochester - ## 12 eip Oregon - ## 13 eip Tennessee - ## 14 ihsp Entire Network - ## 15 ihsp Idaho - ## 16 ihsp Iowa - ## 17 ihsp Michigan - ## 18 ihsp Ohio - ## 19 ihsp Oklahoma - ## 20 ihsp Rhode Island - ## 21 ihsp South Dakota - ## 22 ihsp Utah - -``` r glimpse(fs_nat <- hospitalizations("flusurv")) -``` +## Rows: 2,979 +## Columns: 14 +## $ surveillance_area "FluSurv-NET", "FluSurv-NET", "FluSurv-NET", "FluSurv-NET", "FluSurv-NET", "FluSurv-NET", "… +## $ region "Entire Network", "Entire Network", "Entire Network", "Entire Network", "Entire Network", "… +## $ year 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2018, 2018, 2… +## $ season 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57,… +## $ wk_start 2017-10-01, 2017-10-08, 2017-10-15, 2017-10-22, 2017-10-29, 2017-11-05, 2017-11-12, 2017-1… +## $ wk_end 2017-10-07, 2017-10-14, 2017-10-21, 2017-10-28, 2017-11-04, 2017-11-11, 2017-11-18, 2017-1… +## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … +## $ rate 0.0, 0.1, 0.1, 0.1, 0.3, 0.4, 0.6, 0.8, 1.0, 1.3, 1.8, 2.5, 3.4, 4.2, 5.6, 6.8, 8.2, 10.3, … +## $ weeklyrate 0.0, 0.0, 0.0, 0.0, 0.1, 0.1, 0.2, 0.2, 0.2, 0.3, 0.6, 0.6, 0.9, 0.8, 1.3, 1.3, 1.4, 2.1, 1… +## $ age 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3… +## $ age_label 5-17 yr, 5-17 yr, 5-17 yr, 5-17 yr, 5-17 yr, 5-17 yr, 5-17 yr, 5-17 yr, 5-17 yr, 5-17 yr, 5… +## $ sea_label "2017-18", "2017-18", "2017-18", "2017-18", "2017-18", "2017-18", "2017-18", "2017-18", "20… +## $ sea_description "Season 2017-18", "Season 2017-18", "Season 2017-18", "Season 2017-18", "Season 2017-18", "… +## $ mmwrid 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 2920, 2921, 2922, 2923, 2924, 2… - ## Observations: 1,746 - ## Variables: 14 - ## $ surveillance_area "FluSurv-NET", "FluSurv-NET", "FluSurv-NET", "FluSurv-NET", "FluSurv-NET", "FluSurv-NET", "… - ## $ region "Entire Network", "Entire Network", "Entire Network", "Entire Network", "Entire Network", "… - ## $ year 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2… - ## $ season 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,… - ## $ wk_start 2009-08-30, 2009-09-06, 2009-09-13, 2009-09-20, 2009-09-27, 2009-10-04, 2009-10-11, 2009-1… - ## $ wk_end 2009-09-05, 2009-09-12, 2009-09-19, 2009-09-26, 2009-10-03, 2009-10-10, 2009-10-17, 2009-1… - ## $ year_wk_num 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7… - ## $ rate 0.5, 2.5, 4.6, 6.7, 10.9, 18.1, 28.3, 39.1, 47.3, 53.3, 57.5, 60.1, 61.6, 62.9, 64.1, 65.1,… - ## $ weeklyrate 0.5, 2.0, 2.0, 2.1, 4.3, 7.2, 10.2, 10.8, 8.2, 6.0, 4.2, 2.6, 1.5, 1.3, 1.3, 1.0, 1.2, 1.1,… - ## $ age 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1… - ## $ age_label 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4… - ## $ sea_label "2009-10", "2009-10", "2009-10", "2009-10", "2009-10", "2009-10", "2009-10", "2009-10", "20… - ## $ sea_description "Season 2009-10", "Season 2009-10", "Season 2009-10", "Season 2009-10", "Season 2009-10", "… - ## $ mmwrid 2488, 2489, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 2500, 2501, 2502, 2… - -``` r ggplot(fs_nat, aes(wk_end, rate)) + geom_line(aes(color=age_label, group=age_label)) + facet_wrap(~sea_description, scales="free_x") + @@ -253,92 +257,83 @@ ggplot(fs_nat, aes(wk_end, rate)) + theme_ipsum_rc() ``` - + ``` r -glimpse(hospitalizations("eip", years=2015)) -``` - ## Observations: 180 - ## Variables: 14 - ## $ surveillance_area "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", … - ## $ region "Entire Network", "Entire Network", "Entire Network", "Entire Network", "Entire Network", "… - ## $ year 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2016, 2016, 2… - ## $ season 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,… - ## $ wk_start 2015-10-04, 2015-10-11, 2015-10-18, 2015-10-25, 2015-11-01, 2015-11-08, 2015-11-15, 2015-1… - ## $ wk_end 2015-10-10, 2015-10-17, 2015-10-24, 2015-10-31, 2015-11-07, 2015-11-14, 2015-11-21, 2015-1… - ## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … - ## $ rate 0.1, 0.3, 0.4, 0.5, 0.8, 0.8, 1.1, 1.4, 1.6, 1.7, 1.8, 2.1, 2.4, 2.9, 3.2, 3.5, 4.1, 5.3, 6… - ## $ weeklyrate 0.1, 0.3, 0.1, 0.1, 0.3, 0.0, 0.3, 0.3, 0.2, 0.1, 0.1, 0.3, 0.3, 0.5, 0.3, 0.3, 0.6, 1.2, 1… - ## $ age 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2… - ## $ age_label 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4… - ## $ sea_label "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "20… - ## $ sea_description "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "… - ## $ mmwrid 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2… +glimpse(hospitalizations("eip", years=2015)) +## Rows: 270 +## Columns: 14 +## $ surveillance_area "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", … +## $ region "Entire Network", "Entire Network", "Entire Network", "Entire Network", "Entire Network", "… +## $ year 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2016, 2016, 2… +## $ season 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,… +## $ wk_start 2015-10-04, 2015-10-11, 2015-10-18, 2015-10-25, 2015-11-01, 2015-11-08, 2015-11-15, 2015-1… +## $ wk_end 2015-10-10, 2015-10-17, 2015-10-24, 2015-10-31, 2015-11-07, 2015-11-14, 2015-11-21, 2015-1… +## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … +## $ rate 0.4, 0.7, 1.0, 1.1, 1.4, 1.6, 1.9, 2.2, 2.4, 2.8, 3.4, 4.4, 5.0, 6.5, 7.6, 8.7, 10.4, 12.5,… +## $ weeklyrate 0.4, 0.3, 0.3, 0.2, 0.3, 0.3, 0.3, 0.3, 0.2, 0.4, 0.6, 0.9, 0.6, 1.5, 1.1, 1.1, 1.6, 2.1, 3… +## $ age 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2… +## $ age_label 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+… +## $ sea_label "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "20… +## $ sea_description "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "… +## $ mmwrid 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2… -``` r glimpse(hospitalizations("eip", "Colorado", years=2015)) -``` - - ## Observations: 180 - ## Variables: 14 - ## $ surveillance_area "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", … - ## $ region "Colorado", "Colorado", "Colorado", "Colorado", "Colorado", "Colorado", "Colorado", "Colora… - ## $ year 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2016, 2016, 2… - ## $ season 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,… - ## $ wk_start 2015-10-04, 2015-10-11, 2015-10-18, 2015-10-25, 2015-11-01, 2015-11-08, 2015-11-15, 2015-1… - ## $ wk_end 2015-10-10, 2015-10-17, 2015-10-24, 2015-10-31, 2015-11-07, 2015-11-14, 2015-11-21, 2015-1… - ## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … - ## $ rate 0.0, 0.0, 0.6, 0.6, 0.6, 0.6, 1.2, 1.7, 1.7, 1.7, 1.7, 1.7, 2.9, 3.5, 3.5, 3.5, 4.1, 6.4, 8… - ## $ weeklyrate 0.0, 0.0, 0.6, 0.0, 0.0, 0.0, 0.6, 0.6, 0.0, 0.0, 0.0, 0.0, 1.2, 0.6, 0.0, 0.0, 0.6, 2.3, 2… - ## $ age 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2… - ## $ age_label 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4… - ## $ sea_label "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "20… - ## $ sea_description "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "… - ## $ mmwrid 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2… +## Rows: 270 +## Columns: 14 +## $ surveillance_area "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", "EIP", … +## $ region "Colorado", "Colorado", "Colorado", "Colorado", "Colorado", "Colorado", "Colorado", "Colora… +## $ year 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2016, 2016, 2… +## $ season 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,… +## $ wk_start 2015-10-04, 2015-10-11, 2015-10-18, 2015-10-25, 2015-11-01, 2015-11-08, 2015-11-15, 2015-1… +## $ wk_end 2015-10-10, 2015-10-17, 2015-10-24, 2015-10-31, 2015-11-07, 2015-11-14, 2015-11-21, 2015-1… +## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … +## $ rate 0.0, 0.3, 0.6, 0.9, 0.9, 1.3, 1.3, 1.6, 1.6, 2.5, 2.8, 4.4, 6.3, 7.8, 9.7, 10.7, 12.5, 14.7… +## $ weeklyrate 0.0, 0.3, 0.3, 0.3, 0.0, 0.3, 0.0, 0.3, 0.0, 0.9, 0.3, 1.6, 1.9, 1.6, 1.9, 0.9, 1.9, 2.2, 2… +## $ age 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2… +## $ age_label 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+… +## $ sea_label "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "20… +## $ sea_description "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "… +## $ mmwrid 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2… -``` r glimpse(hospitalizations("ihsp", years=2015)) -``` - - ## Observations: 180 - ## Variables: 14 - ## $ surveillance_area "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IH… - ## $ region "Entire Network", "Entire Network", "Entire Network", "Entire Network", "Entire Network", "… - ## $ year 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2016, 2016, 2… - ## $ season 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,… - ## $ wk_start 2015-10-04, 2015-10-11, 2015-10-18, 2015-10-25, 2015-11-01, 2015-11-08, 2015-11-15, 2015-1… - ## $ wk_end 2015-10-10, 2015-10-17, 2015-10-24, 2015-10-31, 2015-11-07, 2015-11-14, 2015-11-21, 2015-1… - ## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … - ## $ rate 0.0, 0.0, 0.4, 0.4, 0.4, 1.1, 1.1, 1.1, 1.1, 1.5, 1.8, 2.2, 2.2, 2.6, 2.6, 2.6, 2.9, 4.0, 5… - ## $ weeklyrate 0.0, 0.0, 0.4, 0.0, 0.0, 0.7, 0.0, 0.0, 0.0, 0.4, 0.4, 0.4, 0.0, 0.4, 0.0, 0.0, 0.4, 1.1, 1… - ## $ age 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2… - ## $ age_label 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4… - ## $ sea_label "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "20… - ## $ sea_description "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "… - ## $ mmwrid 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2… +## Rows: 270 +## Columns: 14 +## $ surveillance_area "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IH… +## $ region "Entire Network", "Entire Network", "Entire Network", "Entire Network", "Entire Network", "… +## $ year 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2016, 2016, 2… +## $ season 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,… +## $ wk_start 2015-10-04, 2015-10-11, 2015-10-18, 2015-10-25, 2015-11-01, 2015-11-08, 2015-11-15, 2015-1… +## $ wk_end 2015-10-10, 2015-10-17, 2015-10-24, 2015-10-31, 2015-11-07, 2015-11-14, 2015-11-21, 2015-1… +## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … +## $ rate 0.4, 0.8, 1.0, 1.2, 1.4, 1.4, 1.4, 1.6, 1.8, 2.0, 2.5, 3.1, 3.5, 4.1, 5.1, 6.5, 8.0, 10.0, … +## $ weeklyrate 0.4, 0.4, 0.2, 0.2, 0.2, 0.0, 0.0, 0.2, 0.2, 0.2, 0.4, 0.6, 0.4, 0.6, 1.0, 1.4, 1.4, 2.0, 4… +## $ age 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 2… +## $ age_label 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+ yr, 65+… +## $ sea_label "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "2015-16", "20… +## $ sea_description "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "Season 2015-16", "… +## $ mmwrid 2806, 2807, 2808, 2809, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 2820, 2… -``` r glimpse(hospitalizations("ihsp", "Oklahoma", years=2015)) +## Rows: 270 +## Columns: 14 +## $ surveillance_area "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IH… +## $ region "Oklahoma", "Oklahoma", "Oklahoma", "Oklahoma", "Oklahoma", "Oklahoma", "Oklahoma", "Oklaho… +## $ year 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2011, 2011, 2… +## $ season 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,… +## $ wk_start 2010-10-03, 2010-10-10, 2010-10-17, 2010-10-24, 2010-10-31, 2010-11-07, 2010-11-14, 2010-1… +## $ wk_end 2010-10-09, 2010-10-16, 2010-10-23, 2010-10-30, 2010-11-06, 2010-11-13, 2010-11-20, 2010-1… +## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … +## $ rate 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.2, 0.5, 0.7, 0.7, 1.4, 2.3, 2.5, 3.5, 4.6, 6.0, 7.8, 8… +## $ weeklyrate 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2, 0.0, 0.2, 0.2, 0.0, 0.7, 0.9, 0.2, 0.9, 1.2, 1.4, 1.8, 0… +## $ age 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 8… +## $ age_label 18-49 yr, 18-49 yr, 18-49 yr, 18-49 yr, 18-49 yr, 18-49 yr, 18-49 yr, 18-49 yr, 18-49 yr, 1… +## $ sea_label "2010-11", "2010-11", "2010-11", "2010-11", "2010-11", "2010-11", "2010-11", "2010-11", "20… +## $ sea_description "Season 2010-11", "Season 2010-11", "Season 2010-11", "Season 2010-11", "Season 2010-11", "… +## $ mmwrid 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2… ``` - ## Observations: 180 - ## Variables: 14 - ## $ surveillance_area "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IHSP", "IH… - ## $ region "Oklahoma", "Oklahoma", "Oklahoma", "Oklahoma", "Oklahoma", "Oklahoma", "Oklahoma", "Oklaho… - ## $ year 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2011, 2011, 2… - ## $ season 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50,… - ## $ wk_start 2010-10-03, 2010-10-10, 2010-10-17, 2010-10-24, 2010-10-31, 2010-11-07, 2010-11-14, 2010-1… - ## $ wk_end 2010-10-09, 2010-10-16, 2010-10-23, 2010-10-30, 2010-11-06, 2010-11-13, 2010-11-20, 2010-1… - ## $ year_wk_num 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, … - ## $ rate 0.0, 0.0, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, 2.4, 2.4, 6.1, 14.6, 17.0, 32.8, 49.9, 76.6, 9… - ## $ weeklyrate 0.0, 0.0, 1.2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.2, 0.0, 3.6, 8.5, 2.4, 15.8, 17.0, 26.8, 21.… - ## $ age 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2… - ## $ age_label 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4 yr, 0-4… - ## $ sea_label "2010-11", "2010-11", "2010-11", "2010-11", "2010-11", "2010-11", "2010-11", "2010-11", "20… - ## $ sea_description "Season 2010-11", "Season 2010-11", "Season 2010-11", "Season 2010-11", "Season 2010-11", "… - ## $ mmwrid 2545, 2546, 2547, 2548, 2549, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 2… - ### Retrieve ILINet Surveillance Data ``` r @@ -358,46 +353,45 @@ walk(c("national", "hhs", "census", "state"), ~{ print(gg) }) +## Rows: 1,173 +## Columns: 16 +## $ region_type "National", "National", "National", "National", "National", "National", "National", "Nationa… +## $ region "National", "National", "National", "National", "National", "National", "National", "Nationa… +## $ year 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1998, 19… +## $ week 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1… +## $ weighted_ili 1.101480, 1.200070, 1.378760, 1.199200, 1.656180, 1.413260, 1.986800, 2.447490, 1.739010, 1.… +## $ unweighted_ili 1.216860, 1.280640, 1.239060, 1.144730, 1.261120, 1.282750, 1.445790, 1.647960, 1.675170, 1.… +## $ age_0_4 179, 199, 228, 188, 217, 178, 294, 288, 268, 299, 346, 348, 510, 579, 639, 690, 856, 824, 88… +## $ age_25_49 NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, … +## $ age_25_64 157, 151, 153, 193, 162, 148, 240, 293, 206, 282, 268, 235, 404, 584, 759, 654, 679, 817, 76… +## $ age_5_24 205, 242, 266, 236, 280, 281, 328, 456, 343, 415, 388, 362, 492, 576, 810, 1121, 1440, 1600,… +## $ age_50_64 NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, … +## $ age_65 29, 23, 34, 36, 41, 48, 70, 63, 69, 102, 81, 59, 113, 207, 207, 148, 151, 196, 233, 146, 119… +## $ ilitotal 570, 615, 681, 653, 700, 655, 932, 1100, 886, 1098, 1083, 1004, 1519, 1946, 2415, 2613, 3126… +## $ num_of_providers 192, 191, 219, 213, 213, 195, 248, 256, 252, 253, 242, 190, 251, 250, 254, 255, 245, 245, 23… +## $ total_patients 46842, 48023, 54961, 57044, 55506, 51062, 64463, 66749, 52890, 67887, 61314, 47719, 48429, 5… +## $ week_start 1997-09-28, 1997-10-05, 1997-10-12, 1997-10-19, 1997-10-26, 1997-11-02, 1997-11-09, 1997-11… +## # A tibble: 1,173 x 16 +## region_type region year week weighted_ili unweighted_ili age_0_4 age_25_49 age_25_64 age_5_24 age_50_64 age_65 +## +## 1 National Natio… 1997 40 1.10 1.22 179 NA 157 205 NA 29 +## 2 National Natio… 1997 41 1.20 1.28 199 NA 151 242 NA 23 +## 3 National Natio… 1997 42 1.38 1.24 228 NA 153 266 NA 34 +## 4 National Natio… 1997 43 1.20 1.14 188 NA 193 236 NA 36 +## 5 National Natio… 1997 44 1.66 1.26 217 NA 162 280 NA 41 +## 6 National Natio… 1997 45 1.41 1.28 178 NA 148 281 NA 48 +## 7 National Natio… 1997 46 1.99 1.45 294 NA 240 328 NA 70 +## 8 National Natio… 1997 47 2.45 1.65 288 NA 293 456 NA 63 +## 9 National Natio… 1997 48 1.74 1.68 268 NA 206 343 NA 69 +## 10 National Natio… 1997 49 1.94 1.62 299 NA 282 415 NA 102 +## # … with 1,163 more rows, and 4 more variables: ilitotal , num_of_providers , total_patients , +## # week_start ``` - ## Observations: 1,111 - ## Variables: 16 - ## $ region_type "National", "National", "National", "National", "National", "National", "National", "Nationa… - ## $ region "National", "National", "National", "National", "National", "National", "National", "Nationa… - ## $ year 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1998, 19… - ## $ week 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1… - ## $ weighted_ili 1.101480, 1.200070, 1.378760, 1.199200, 1.656180, 1.413260, 1.986800, 2.447490, 1.739010, 1.… - ## $ unweighted_ili 1.216860, 1.280640, 1.239060, 1.144730, 1.261120, 1.282750, 1.445790, 1.647960, 1.675170, 1.… - ## $ age_0_4 179, 199, 228, 188, 217, 178, 294, 288, 268, 299, 346, 348, 510, 579, 639, 690, 856, 824, 88… - ## $ age_25_49 NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, … - ## $ age_25_64 157, 151, 153, 193, 162, 148, 240, 293, 206, 282, 268, 235, 404, 584, 759, 654, 679, 817, 76… - ## $ age_5_24 205, 242, 266, 236, 280, 281, 328, 456, 343, 415, 388, 362, 492, 576, 810, 1121, 1440, 1600,… - ## $ age_50_64 NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, … - ## $ age_65 29, 23, 34, 36, 41, 48, 70, 63, 69, 102, 81, 59, 113, 207, 207, 148, 151, 196, 233, 146, 119… - ## $ ilitotal 570, 615, 681, 653, 700, 655, 932, 1100, 886, 1098, 1083, 1004, 1519, 1946, 2415, 2613, 3126… - ## $ num_of_providers 192, 191, 219, 213, 213, 195, 248, 256, 252, 253, 242, 190, 251, 250, 254, 255, 245, 245, 23… - ## $ total_patients 46842, 48023, 54961, 57044, 55506, 51062, 64463, 66749, 52890, 67887, 61314, 47719, 48429, 5… - ## $ week_start 1997-09-28, 1997-10-05, 1997-10-12, 1997-10-19, 1997-10-26, 1997-11-02, 1997-11-09, 1997-11… - ## # A tibble: 1,111 x 16 - ## region_type region year week weighted_ili unweighted_ili age_0_4 age_25_49 age_25_64 age_5_24 age_50_64 age_65 - ## - ## 1 National Natio… 1997 40 1.10 1.22 179 NA 157 205 NA 29 - ## 2 National Natio… 1997 41 1.20 1.28 199 NA 151 242 NA 23 - ## 3 National Natio… 1997 42 1.38 1.24 228 NA 153 266 NA 34 - ## 4 National Natio… 1997 43 1.20 1.14 188 NA 193 236 NA 36 - ## 5 National Natio… 1997 44 1.66 1.26 217 NA 162 280 NA 41 - ## 6 National Natio… 1997 45 1.41 1.28 178 NA 148 281 NA 48 - ## 7 National Natio… 1997 46 1.99 1.45 294 NA 240 328 NA 70 - ## 8 National Natio… 1997 47 2.45 1.65 288 NA 293 456 NA 63 - ## 9 National Natio… 1997 48 1.74 1.68 268 NA 206 343 NA 69 - ## 10 National Natio… 1997 49 1.94 1.62 299 NA 282 415 NA 102 - ## # … with 1,101 more rows, and 4 more variables: ilitotal , num_of_providers , total_patients , - ## # week_start - - + - ## Observations: 11,110 - ## Variables: 16 + ## Rows: 11,730 + ## Columns: 16 ## $ region_type "HHS Regions", "HHS Regions", "HHS Regions", "HHS Regions", "HHS Regions", "HHS Regions", "H… ## $ region Region 1, Region 2, Region 3, Region 4, Region 5, Region 6, Region 7, Region 8, Region 9, Re… ## $ year 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 19… @@ -414,7 +408,7 @@ walk(c("national", "hhs", "census", "state"), ~{ ## $ num_of_providers 32, 7, 16, 29, 49, 4, 14, 5, 23, 13, 29, 7, 17, 31, 48, 4, 14, 6, 23, 12, 40, 7, 15, 33, 64,… ## $ total_patients 7053, 780, 2385, 10222, 9875, 669, 2342, 1183, 10758, 1575, 6987, 872, 2740, 11310, 9618, 68… ## $ week_start 1997-09-28, 1997-09-28, 1997-09-28, 1997-09-28, 1997-09-28, 1997-09-28, 1997-09-28, 1997-09… - ## # A tibble: 11,110 x 16 + ## # A tibble: 11,730 x 16 ## region_type region year week weighted_ili unweighted_ili age_0_4 age_25_49 age_25_64 age_5_24 age_50_64 age_65 ## ## 1 HHS Regions Regio… 1997 40 0.499 0.624 15 NA 7 22 NA 0 @@ -427,13 +421,13 @@ walk(c("national", "hhs", "census", "state"), ~{ ## 8 HHS Regions Regio… 1997 40 0.516 0.423 2 NA 0 3 NA 0 ## 9 HHS Regions Regio… 1997 40 1.81 2.26 80 NA 76 74 NA 13 ## 10 HHS Regions Regio… 1997 40 4.74 4.83 31 NA 12 30 NA 3 - ## # … with 11,100 more rows, and 4 more variables: ilitotal , num_of_providers , total_patients , + ## # … with 11,720 more rows, and 4 more variables: ilitotal , num_of_providers , total_patients , ## # week_start - + - ## Observations: 9,999 - ## Variables: 16 + ## Rows: 10,557 + ## Columns: 16 ## $ region_type "Census Regions", "Census Regions", "Census Regions", "Census Regions", "Census Regions", "C… ## $ region "New England", "Mid-Atlantic", "East North Central", "West North Central", "South Atlantic",… ## $ year 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 1997, 19… @@ -450,7 +444,7 @@ walk(c("national", "hhs", "census", "state"), ~{ ## $ num_of_providers 32, 13, 47, 17, 30, 9, 4, 16, 24, 29, 13, 46, 17, 32, 10, 4, 17, 23, 40, 12, 62, 16, 33, 10,… ## $ total_patients 7053, 2119, 9649, 2892, 6912, 4356, 669, 10719, 2473, 6987, 2384, 9427, 2823, 7591, 4947, 68… ## $ week_start 1997-09-28, 1997-09-28, 1997-09-28, 1997-09-28, 1997-09-28, 1997-09-28, 1997-09-28, 1997-09… - ## # A tibble: 9,999 x 16 + ## # A tibble: 10,557 x 16 ## region_type region year week weighted_ili unweighted_ili age_0_4 age_25_49 age_25_64 age_5_24 age_50_64 age_65 ## ## 1 Census Reg… New E… 1997 40 0.499 0.624 15 NA 7 22 NA 0 @@ -463,13 +457,13 @@ walk(c("national", "hhs", "census", "state"), ~{ ## 8 Census Reg… Mount… 1997 40 2.26 2.28 87 NA 71 71 NA 15 ## 9 Census Reg… Pacif… 1997 40 2.05 3.23 26 NA 17 36 NA 1 ## 10 Census Reg… New E… 1997 41 0.643 0.816 14 NA 14 29 NA 0 - ## # … with 9,989 more rows, and 4 more variables: ilitotal , num_of_providers , total_patients , + ## # … with 10,547 more rows, and 4 more variables: ilitotal , num_of_providers , total_patients , ## # week_start - + - ## Observations: 23,120 - ## Variables: 16 + ## Rows: 26,493 + ## Columns: 16 ## $ region_type "States", "States", "States", "States", "States", "States", "States", "States", "States", "S… ## $ region "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delawa… ## $ year 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 2010, 20… @@ -486,7 +480,7 @@ walk(c("national", "hhs", "census", "state"), ~{ ## $ num_of_providers 35, 7, 49, 15, 112, 14, 12, 13, 4, NA, 62, 18, 12, 74, 44, 6, 40, 14, 41, 30, 17, 56, 47, 17… ## $ total_patients 11664, 1714, 25492, 2586, 32342, 20282, 3831, 3995, 2599, NA, 40314, 1943, 4579, 39390, 1252… ## $ week_start 2010-10-03, 2010-10-03, 2010-10-03, 2010-10-03, 2010-10-03, 2010-10-03, 2010-10-03, 2010-10… - ## # A tibble: 23,120 x 16 + ## # A tibble: 26,493 x 16 ## region_type region year week weighted_ili unweighted_ili age_0_4 age_25_49 age_25_64 age_5_24 age_50_64 age_65 ## ## 1 States Alaba… 2010 40 NA 2.13 NA NA NA NA NA NA @@ -499,33 +493,30 @@ walk(c("national", "hhs", "census", "state"), ~{ ## 8 States Delaw… 2010 40 NA 0.100 NA NA NA NA NA NA ## 9 States Distr… 2010 40 NA 2.81 NA NA NA NA NA NA ## 10 States Flori… 2010 40 NA NA NA NA NA NA NA NA - ## # … with 23,110 more rows, and 4 more variables: ilitotal , num_of_providers , total_patients , + ## # … with 26,483 more rows, and 4 more variables: ilitotal , num_of_providers , total_patients , ## # week_start - + ### Retrieve weekly state-level ILI indicators per-state for a given season ``` r ili_weekly_activity_indicators(2017) -``` +## # A tibble: 2,805 x 8 +## statename url website activity_level activity_level_label weekend season weeknumber +## * +## 1 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-10-07 2017-18 40 +## 2 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-10-14 2017-18 41 +## 3 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-10-21 2017-18 42 +## 4 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-10-28 2017-18 43 +## 5 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-11-04 2017-18 44 +## 6 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-11-11 2017-18 45 +## 7 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-12-02 2017-18 48 +## 8 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-12-09 2017-18 49 +## 9 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-12-23 2017-18 51 +## 10 Virgin Islands http://doh.vi.gov/ Influenza 0 Insufficient Data 2017-12-30 2017-18 52 +## # … with 2,795 more rows - ## # A tibble: 2,805 x 8 - ## statename url website activity_level activity_level_l… weekend season weeknumber - ## * - ## 1 Alabama http://adph.org/influenza/ Influenza Sur… 2 Minimal 2017-10-07 2017-… 40 - ## 2 Alaska "http://dhss.alaska.gov/dp… Influenza Sur… 1 Minimal 2017-10-07 2017-… 40 - ## 3 Arizona http://www.azdhs.gov/phs/o… Influenza & R… 2 Minimal 2017-10-07 2017-… 40 - ## 4 Arkansas http://www.healthy.arkansa… Communicable … 1 Minimal 2017-10-07 2017-… 40 - ## 5 California https://www.cdph.ca.gov/Pr… Influenza (Fl… 2 Minimal 2017-10-07 2017-… 40 - ## 6 Colorado https://www.colorado.gov/p… Influenza Sur… 1 Minimal 2017-10-07 2017-… 40 - ## 7 Connecticut http://www.portal.ct.gov/D… Flu Statistics 1 Minimal 2017-10-07 2017-… 40 - ## 8 Delaware http://dhss.delaware.gov/d… Weekly Influe… 1 Minimal 2017-10-07 2017-… 40 - ## 9 District of… http://doh.dc.gov/page/inf… Influenza Inf… 2 Minimal 2017-10-07 2017-… 40 - ## 10 Florida "http://www.floridahealth.… Weekly Influe… 1 Minimal 2017-10-07 2017-… 40 - ## # … with 2,795 more rows - -``` r xdf <- map_df(2008:2017, ili_weekly_activity_indicators) count(xdf, weekend, activity_level_label) %>% @@ -540,35 +531,32 @@ count(xdf, weekend, activity_level_label) %>% theme(legend.position="bottom") ``` - + ### Pneumonia and Influenza Mortality Surveillance ``` r (nat_pi <- pi_mortality("national")) -``` - - ## # A tibble: 483 x 19 - ## seasonid baseline threshold percent_pni percent_complete number_influenza number_pneumonia all_deaths total_pni - ## - ## 1 58 0.055 0.0580 0.0560 1 10 2880 51416 2890 - ## 2 58 0.0560 0.059 0.055 1 12 2765 50411 2777 - ## 3 58 0.0560 0.06 0.0560 1 18 2802 50742 2820 - ## 4 58 0.057 0.061 0.057 1 22 2895 51425 2917 - ## 5 58 0.0580 0.062 0.0560 1 23 2819 51136 2842 - ## 6 58 0.059 0.063 0.0560 1 28 2819 50945 2847 - ## 7 58 0.06 0.064 0.0580 1 25 2953 51618 2978 - ## 8 58 0.061 0.065 0.057 1 31 2905 51109 2936 - ## 9 58 0.062 0.066 0.059 1 34 2923 49720 2957 - ## 10 58 0.064 0.067 0.06 1 48 2857 48381 2905 - ## # … with 473 more rows, and 10 more variables: weeknumber , geo_description , age_label , - ## # wk_start , wk_end , year_wk_num , mmwrid , coverage_area , region_name , - ## # callout - -``` r -select(nat_pi, wk_end, percent_pni, baseline, threshold) %>% - gather(measure, value, -wk_end) %>% - ggplot(aes(wk_end, value)) + +## # A tibble: 337 x 19 +## seasonid baseline threshold percent_pni percent_complete number_influenza number_pneumonia all_deaths total_pni +## +## 1 59 0.053 0.057 0.052 1 16 2702 52444 2718 +## 2 59 0.054 0.057 0.053 1 16 2769 52858 2785 +## 3 59 0.055 0.0580 0.055 1 18 2976 54120 2994 +## 4 59 0.0560 0.059 0.0560 1 30 2984 53906 3014 +## 5 59 0.057 0.06 0.054 1 31 2906 53971 2937 +## 6 59 0.0580 0.062 0.0560 1 31 3061 55460 3092 +## 7 59 0.059 0.063 0.0560 1 39 3092 55679 3131 +## 8 59 0.06 0.064 0.054 1 50 2992 55976 3042 +## 9 59 0.062 0.065 0.055 1 65 2971 55225 3036 +## 10 59 0.063 0.066 0.06 1 99 3305 56974 3404 +## # … with 327 more rows, and 10 more variables: weeknumber , geo_description , age_label , +## # week_start , week_end , year_week_num , mmwrid , coverage_area , region_name , +## # callout + +select(nat_pi, week_end, percent_pni, baseline, threshold) %>% + gather(measure, value, -week_end) %>% + ggplot(aes(week_end, value)) + geom_line(aes(group=measure, color=measure)) + scale_y_percent() + scale_color_ipsum(name = NULL, labels=c("Baseline", "Percent P&I", "Threshold")) + @@ -578,121 +566,114 @@ select(nat_pi, wk_end, percent_pni, baseline, threshold) %>% theme(legend.position="bottom") ``` - + ``` r -(st_pi <- pi_mortality("state", years=2015)) -``` - ## # A tibble: 2,704 x 19 - ## seasonid baseline threshold percent_pni percent_complete number_influenza number_pneumonia all_deaths total_pni - ## - ## 1 55 NA NA 0.047 1 0 46 979 46 - ## 2 55 NA NA 0.038 0.963 0 34 889 34 - ## 3 55 NA NA 0.053 1 0 52 978 52 - ## 4 55 NA NA 0.07 1 0 68 968 68 - ## 5 55 NA NA 0.053 0.981 0 48 906 48 - ## 6 55 NA NA 0.0580 1 0 56 968 56 - ## 7 55 NA NA 0.051 1 0 53 1041 53 - ## 8 55 NA NA 0.062 1 1 63 1031 64 - ## 9 55 NA NA 0.0560 1 0 55 976 55 - ## 10 55 NA NA 0.054 1 0 56 1045 56 - ## # … with 2,694 more rows, and 10 more variables: weeknumber , geo_description , age_label , - ## # wk_start , wk_end , year_wk_num , mmwrid , coverage_area , region_name , - ## # callout +(st_pi <- pi_mortality("state", years=2015)) +## # A tibble: 2,704 x 19 +## seasonid baseline threshold percent_pni percent_complete number_influenza number_pneumonia all_deaths total_pni +## +## 1 55 NA NA 0.046 0.962 0 43 935 43 +## 2 55 NA NA 0.036 0.835 0 29 811 29 +## 3 55 NA NA 0.054 0.833 0 44 809 44 +## 4 55 NA NA 0.07 0.947 0 64 920 64 +## 5 55 NA NA 0.053 0.926 0 48 900 48 +## 6 55 NA NA 0.057 0.987 0 55 959 55 +## 7 55 NA NA 0.052 1 0 53 1023 53 +## 8 55 NA NA 0.063 1 1 62 1002 63 +## 9 55 NA NA 0.0560 0.95 0 52 923 52 +## 10 55 NA NA 0.054 0.954 0 50 927 50 +## # … with 2,694 more rows, and 10 more variables: weeknumber , geo_description , age_label , +## # week_start , week_end , year_week_num , mmwrid , coverage_area , region_name , +## # callout -``` r (reg_pi <- pi_mortality("region", years=2015)) +## # A tibble: 520 x 19 +## seasonid baseline threshold percent_pni percent_complete number_influenza number_pneumonia all_deaths total_pni +## +## 1 55 0.064 0.072 0.07 1 0 178 2525 178 +## 2 55 0.065 0.073 0.064 1 0 160 2512 160 +## 3 55 0.066 0.074 0.0580 1 1 141 2457 142 +## 4 55 0.067 0.075 0.07 0.989 0 171 2426 171 +## 5 55 0.068 0.077 0.065 1 2 166 2565 168 +## 6 55 0.07 0.078 0.067 0.984 1 162 2415 163 +## 7 55 0.071 0.079 0.079 1 0 198 2491 198 +## 8 55 0.073 0.081 0.072 1 1 176 2468 177 +## 9 55 0.074 0.0820 0.067 0.959 3 154 2353 157 +## 10 55 0.076 0.084 0.062 0.995 0 151 2441 151 +## # … with 510 more rows, and 10 more variables: weeknumber , geo_description , age_label , +## # week_start , week_end , year_week_num , mmwrid , coverage_area , region_name , +## # callout ``` - ## # A tibble: 520 x 19 - ## seasonid baseline threshold percent_pni percent_complete number_influenza number_pneumonia all_deaths total_pni - ## - ## 1 55 0.065 0.072 0.07 1 0 178 2525 178 - ## 2 55 0.065 0.073 0.064 1 0 160 2512 160 - ## 3 55 0.066 0.074 0.0580 1 1 141 2457 142 - ## 4 55 0.067 0.075 0.07 1 0 171 2426 171 - ## 5 55 0.068 0.076 0.065 1 2 166 2565 168 - ## 6 55 0.069 0.077 0.067 1 1 162 2415 163 - ## 7 55 0.071 0.078 0.079 1 0 198 2491 198 - ## 8 55 0.072 0.08 0.072 1 1 176 2469 177 - ## 9 55 0.073 0.081 0.067 1 3 154 2353 157 - ## 10 55 0.075 0.0820 0.062 1 0 151 2441 151 - ## # … with 510 more rows, and 10 more variables: weeknumber , geo_description , age_label , - ## # wk_start , wk_end , year_wk_num , mmwrid , coverage_area , region_name , - ## # callout - ### Retrieve metadata about U.S. State CDC Provider Data ``` r state_data_providers() +## # A tibble: 59 x 5 +## statename statehealthdeptname url statewebsitename statefluphonenum +## * +## 1 Alabama Alabama Department of Publi… "http://adph.org/influenza/" Influenza Surveillance 334-206-5300 +## 2 Alaska State of Alaska Health and … "http://dhss.alaska.gov/dph/Epi/i… Influenza Surveillanc… 907-269-8000 +## 3 Arizona Arizona Department of Healt… "http://www.azdhs.gov/phs/oids/ep… Influenza & RSV Surve… 602-542-1025 +## 4 Arkansas Arkansas Department of Heal… "http://www.healthy.arkansas.gov/… Communicable Disease … 501-661-2000 +## 5 California California Department of Pu… "https://www.cdph.ca.gov/Programs… Influenza (Flu) 916-558-1784 +## 6 Colorado Colorado Department of Publ… "https://www.colorado.gov/pacific… Influenza Surveillance 303-692-2000 +## 7 Connecticut Connecticut Department of P… "https://portal.ct.gov/DPH/Epidem… Flu Statistics 860-509-8000 +## 8 Delaware Delaware Health and Social … "http://dhss.delaware.gov/dhss/dp… Weekly Influenza Surv… 302-744-4700 +## 9 District of … District of Columbia Depart… "https://dchealth.dc.gov/flu " Influenza Information 202-442-5955 +## 10 Florida Florida Department of Health "http://www.floridahealth.gov/dis… Weekly Influenza Surv… 850-245-4300 +## # … with 49 more rows ``` - ## # A tibble: 59 x 5 - ## statename statehealthdeptname url statewebsitename statefluphonenum - ## * - ## 1 Alabama Alabama Department of Publi… http://adph.org/influenza/ Influenza Surveillance 334-206-5300 - ## 2 Alaska State of Alaska Health and … "http://dhss.alaska.gov/dph/Epi/… Influenza Surveillance… 907-269-8000 - ## 3 Arizona Arizona Department of Healt… http://www.azdhs.gov/phs/oids/ep… Influenza & RSV Survei… 602-542-1025 - ## 4 Arkansas Arkansas Department of Heal… http://www.healthy.arkansas.gov/… Communicable Disease a… 501-661-2000 - ## 5 California California Department of Pu… https://www.cdph.ca.gov/Programs… Influenza (Flu) 916-558-1784 - ## 6 Colorado Colorado Department of Publ… https://www.colorado.gov/pacific… Influenza Surveillance 303-692-2000 - ## 7 Connecticut Connecticut Department of P… http://www.portal.ct.gov/DPH/Inf… Flu Statistics 860-509-8000 - ## 8 Delaware Delaware Health and Social … http://dhss.delaware.gov/dhss/dp… Weekly Influenza Surve… 302-744-4700 - ## 9 District of … District of Columbia Depart… http://doh.dc.gov/page/influenza… Influenza Information 202-442-5955 - ## 10 Florida Florida Department of Health "http://www.floridahealth.gov/di… Weekly Influenza Surve… 850-245-4300 - ## # … with 49 more rows - ### Retrieve WHO/NREVSS Surveillance Data ``` r glimpse(xdat <- who_nrevss("national")) -``` - - ## List of 3 - ## $ combined_prior_to_2015_16:Classes 'tbl_df', 'tbl' and 'data.frame': 940 obs. of 14 variables: - ## ..$ region_type : chr [1:940] "National" "National" "National" "National" ... - ## ..$ region : chr [1:940] "National" "National" "National" "National" ... - ## ..$ year : int [1:940] 1997 1997 1997 1997 1997 1997 1997 1997 1997 1997 ... - ## ..$ week : int [1:940] 40 41 42 43 44 45 46 47 48 49 ... - ## ..$ total_specimens : int [1:940] 1291 1513 1552 1669 1897 2106 2204 2533 2242 2607 ... - ## ..$ percent_positive : num [1:940] 0 0.727 1.095 0.419 0.527 ... - ## ..$ a_2009_h1n1 : int [1:940] 0 0 0 0 0 0 0 0 0 0 ... - ## ..$ a_h1 : int [1:940] 0 0 0 0 0 0 0 0 0 0 ... - ## ..$ a_h3 : int [1:940] 0 0 3 0 9 0 3 5 14 11 ... - ## ..$ a_subtyping_not_performed: int [1:940] 0 11 13 7 1 6 4 17 22 28 ... - ## ..$ a_unable_to_subtype : int [1:940] 0 0 0 0 0 0 0 0 0 0 ... - ## ..$ b : int [1:940] 0 0 1 0 0 0 1 1 1 1 ... - ## ..$ h3n2v : int [1:940] 0 0 0 0 0 0 0 0 0 0 ... - ## ..$ wk_date : Date[1:940], format: "1997-09-28" "1997-10-05" "1997-10-12" "1997-10-19" ... - ## $ public_health_labs :Classes 'tbl_df', 'tbl' and 'data.frame': 171 obs. of 13 variables: - ## ..$ region_type : chr [1:171] "National" "National" "National" "National" ... - ## ..$ region : chr [1:171] "National" "National" "National" "National" ... - ## ..$ year : int [1:171] 2015 2015 2015 2015 2015 2015 2015 2015 2015 2015 ... - ## ..$ week : int [1:171] 40 41 42 43 44 45 46 47 48 49 ... - ## ..$ total_specimens : int [1:171] 1139 1152 1198 1244 1465 1393 1458 1157 1550 1518 ... - ## ..$ a_2009_h1n1 : int [1:171] 4 5 10 9 4 11 17 17 27 38 ... - ## ..$ a_h3 : int [1:171] 65 41 50 31 23 34 42 24 36 37 ... - ## ..$ a_subtyping_not_performed: int [1:171] 2 2 1 4 4 1 1 0 3 3 ... - ## ..$ b : int [1:171] 10 7 8 9 9 10 4 4 9 11 ... - ## ..$ bvic : int [1:171] 0 3 3 1 1 4 0 3 3 2 ... - ## ..$ byam : int [1:171] 1 0 2 4 4 2 4 9 12 11 ... - ## ..$ h3n2v : int [1:171] 0 0 0 0 0 0 0 0 0 0 ... - ## ..$ wk_date : Date[1:171], format: "2015-10-04" "2015-10-11" "2015-10-18" "2015-10-25" ... - ## $ clinical_labs :Classes 'tbl_df', 'tbl' and 'data.frame': 171 obs. of 11 variables: - ## ..$ region_type : chr [1:171] "National" "National" "National" "National" ... - ## ..$ region : chr [1:171] "National" "National" "National" "National" ... - ## ..$ year : int [1:171] 2015 2015 2015 2015 2015 2015 2015 2015 2015 2015 ... - ## ..$ week : int [1:171] 40 41 42 43 44 45 46 47 48 49 ... - ## ..$ total_specimens : int [1:171] 12029 13111 13441 13537 14687 15048 15250 15234 16201 16673 ... - ## ..$ total_a : int [1:171] 84 116 97 98 97 122 84 119 145 140 ... - ## ..$ total_b : int [1:171] 43 54 52 52 68 86 98 92 81 106 ... - ## ..$ percent_positive: num [1:171] 1.06 1.3 1.11 1.11 1.12 ... - ## ..$ percent_a : num [1:171] 0.698 0.885 0.722 0.724 0.66 ... - ## ..$ percent_b : num [1:171] 0.357 0.412 0.387 0.384 0.463 ... - ## ..$ wk_date : Date[1:171], format: "2015-10-04" "2015-10-11" "2015-10-18" "2015-10-25" ... +## List of 3 +## $ combined_prior_to_2015_16: tibble [940 × 14] (S3: tbl_df/tbl/data.frame) +## ..$ region_type : chr [1:940] "National" "National" "National" "National" ... +## ..$ region : chr [1:940] "National" "National" "National" "National" ... +## ..$ year : int [1:940] 1997 1997 1997 1997 1997 1997 1997 1997 1997 1997 ... +## ..$ week : int [1:940] 40 41 42 43 44 45 46 47 48 49 ... +## ..$ total_specimens : int [1:940] 1291 1513 1552 1669 1897 2106 2204 2533 2242 2607 ... +## ..$ percent_positive : num [1:940] 0 0.727 1.095 0.419 0.527 ... +## ..$ a_2009_h1n1 : int [1:940] 0 0 0 0 0 0 0 0 0 0 ... +## ..$ a_h1 : int [1:940] 0 0 0 0 0 0 0 0 0 0 ... +## ..$ a_h3 : int [1:940] 0 0 3 0 9 0 3 5 14 11 ... +## ..$ a_subtyping_not_performed: int [1:940] 0 11 13 7 1 6 4 17 22 28 ... +## ..$ a_unable_to_subtype : int [1:940] 0 0 0 0 0 0 0 0 0 0 ... +## ..$ b : int [1:940] 0 0 1 0 0 0 1 1 1 1 ... +## ..$ h3n2v : int [1:940] 0 0 0 0 0 0 0 0 0 0 ... +## ..$ wk_date : Date[1:940], format: "1997-09-28" "1997-10-05" "1997-10-12" "1997-10-19" ... +## $ public_health_labs : tibble [233 × 13] (S3: tbl_df/tbl/data.frame) +## ..$ region_type : chr [1:233] "National" "National" "National" "National" ... +## ..$ region : chr [1:233] "National" "National" "National" "National" ... +## ..$ year : int [1:233] 2015 2015 2015 2015 2015 2015 2015 2015 2015 2015 ... +## ..$ week : int [1:233] 40 41 42 43 44 45 46 47 48 49 ... +## ..$ total_specimens : int [1:233] 1139 1152 1198 1244 1465 1393 1458 1157 1550 1518 ... +## ..$ a_2009_h1n1 : int [1:233] 4 5 10 9 4 11 17 17 27 38 ... +## ..$ a_h3 : int [1:233] 65 41 50 31 23 34 42 24 36 37 ... +## ..$ a_subtyping_not_performed: int [1:233] 2 2 1 4 4 1 1 0 3 3 ... +## ..$ b : int [1:233] 10 7 8 9 9 10 4 4 9 11 ... +## ..$ bvic : int [1:233] 0 3 3 1 1 4 0 3 3 2 ... +## ..$ byam : int [1:233] 1 0 2 4 4 2 4 9 12 11 ... +## ..$ h3n2v : int [1:233] 0 0 0 0 0 0 0 0 0 0 ... +## ..$ wk_date : Date[1:233], format: "2015-10-04" "2015-10-11" "2015-10-18" "2015-10-25" ... +## $ clinical_labs : tibble [233 × 11] (S3: tbl_df/tbl/data.frame) +## ..$ region_type : chr [1:233] "National" "National" "National" "National" ... +## ..$ region : chr [1:233] "National" "National" "National" "National" ... +## ..$ year : int [1:233] 2015 2015 2015 2015 2015 2015 2015 2015 2015 2015 ... +## ..$ week : int [1:233] 40 41 42 43 44 45 46 47 48 49 ... +## ..$ total_specimens : int [1:233] 12029 13111 13441 13537 14687 15048 15250 15234 16201 16673 ... +## ..$ total_a : int [1:233] 84 116 97 98 97 122 84 119 145 140 ... +## ..$ total_b : int [1:233] 43 54 52 52 68 86 98 92 81 106 ... +## ..$ percent_positive: num [1:233] 1.06 1.3 1.11 1.11 1.12 ... +## ..$ percent_a : num [1:233] 0.698 0.885 0.722 0.724 0.66 ... +## ..$ percent_b : num [1:233] 0.357 0.412 0.387 0.384 0.463 ... +## ..$ wk_date : Date[1:233], format: "2015-10-04" "2015-10-11" "2015-10-18" "2015-10-25" ... -``` r mutate(xdat$combined_prior_to_2015_16, percent_positive = percent_positive / 100) %>% ggplot(aes(wk_date, percent_positive)) + @@ -702,126 +683,120 @@ mutate(xdat$combined_prior_to_2015_16, theme_ipsum_rc(grid="XY") ``` - + ``` r -who_nrevss("hhs", years=2016) -``` - ## $public_health_labs - ## # A tibble: 520 x 13 - ## region_type region year week total_specimens a_2009_h1n1 a_h3 a_subtyping_not… b bvic byam h3n2v wk_date - ## - ## 1 HHS Regions Region… 2016 40 31 0 6 0 0 0 0 0 2016-10-02 - ## 2 HHS Regions Region… 2016 40 31 0 6 0 0 2 0 0 2016-10-02 - ## 3 HHS Regions Region… 2016 40 112 2 2 0 0 0 0 0 2016-10-02 - ## 4 HHS Regions Region… 2016 40 112 1 11 0 1 2 0 0 2016-10-02 - ## 5 HHS Regions Region… 2016 40 204 0 7 0 0 0 1 0 2016-10-02 - ## 6 HHS Regions Region… 2016 40 39 1 1 0 0 0 0 0 2016-10-02 - ## 7 HHS Regions Region… 2016 40 24 0 2 0 0 1 0 0 2016-10-02 - ## 8 HHS Regions Region… 2016 40 46 2 8 0 0 0 0 0 2016-10-02 - ## 9 HHS Regions Region… 2016 40 186 3 27 0 0 0 3 0 2016-10-02 - ## 10 HHS Regions Region… 2016 40 113 0 17 0 0 0 0 0 2016-10-02 - ## # … with 510 more rows - ## - ## $clinical_labs - ## # A tibble: 520 x 11 - ## region_type region year week total_specimens total_a total_b percent_positive percent_a percent_b wk_date - ## - ## 1 HHS Regions Region 1 2016 40 654 5 1 0.917 0.765 0.153 2016-10-02 - ## 2 HHS Regions Region 2 2016 40 1307 10 3 0.995 0.765 0.230 2016-10-02 - ## 3 HHS Regions Region 3 2016 40 941 1 4 0.531 0.106 0.425 2016-10-02 - ## 4 HHS Regions Region 4 2016 40 2960 46 63 3.68 1.55 2.13 2016-10-02 - ## 5 HHS Regions Region 5 2016 40 2386 8 5 0.545 0.335 0.210 2016-10-02 - ## 6 HHS Regions Region 6 2016 40 1914 22 13 1.83 1.15 0.679 2016-10-02 - ## 7 HHS Regions Region 7 2016 40 723 0 0 0 0 0 2016-10-02 - ## 8 HHS Regions Region 8 2016 40 913 8 0 0.876 0.876 0 2016-10-02 - ## 9 HHS Regions Region 9 2016 40 992 6 1 0.706 0.605 0.101 2016-10-02 - ## 10 HHS Regions Region 10 2016 40 590 14 0 2.37 2.37 0 2016-10-02 - ## # … with 510 more rows +who_nrevss("hhs", years=2016) +## $public_health_labs +## # A tibble: 520 x 13 +## region_type region year week total_specimens a_2009_h1n1 a_h3 a_subtyping_not… b bvic byam h3n2v wk_date +## +## 1 HHS Regions Region… 2016 40 31 0 6 0 0 0 0 0 2016-10-02 +## 2 HHS Regions Region… 2016 40 31 0 6 0 0 2 0 0 2016-10-02 +## 3 HHS Regions Region… 2016 40 112 2 2 0 0 0 0 0 2016-10-02 +## 4 HHS Regions Region… 2016 40 112 1 11 0 1 2 0 0 2016-10-02 +## 5 HHS Regions Region… 2016 40 204 0 7 0 0 0 1 0 2016-10-02 +## 6 HHS Regions Region… 2016 40 39 1 1 0 0 0 0 0 2016-10-02 +## 7 HHS Regions Region… 2016 40 24 0 2 0 0 1 0 0 2016-10-02 +## 8 HHS Regions Region… 2016 40 46 2 8 0 0 0 0 0 2016-10-02 +## 9 HHS Regions Region… 2016 40 186 3 27 0 0 0 3 0 2016-10-02 +## 10 HHS Regions Region… 2016 40 113 0 17 0 0 0 0 0 2016-10-02 +## # … with 510 more rows +## +## $clinical_labs +## # A tibble: 520 x 11 +## region_type region year week total_specimens total_a total_b percent_positive percent_a percent_b wk_date +## +## 1 HHS Regions Region 1 2016 40 654 5 1 0.917 0.765 0.153 2016-10-02 +## 2 HHS Regions Region 2 2016 40 1307 10 3 0.995 0.765 0.230 2016-10-02 +## 3 HHS Regions Region 3 2016 40 941 1 4 0.531 0.106 0.425 2016-10-02 +## 4 HHS Regions Region 4 2016 40 2960 46 63 3.68 1.55 2.13 2016-10-02 +## 5 HHS Regions Region 5 2016 40 2386 8 5 0.545 0.335 0.210 2016-10-02 +## 6 HHS Regions Region 6 2016 40 1914 22 13 1.83 1.15 0.679 2016-10-02 +## 7 HHS Regions Region 7 2016 40 723 0 0 0 0 0 2016-10-02 +## 8 HHS Regions Region 8 2016 40 913 8 0 0.876 0.876 0 2016-10-02 +## 9 HHS Regions Region 9 2016 40 992 6 1 0.706 0.605 0.101 2016-10-02 +## 10 HHS Regions Region 10 2016 40 590 14 0 2.37 2.37 0 2016-10-02 +## # … with 510 more rows -``` r who_nrevss("census", years=2016) -``` +## $public_health_labs +## # A tibble: 468 x 13 +## region_type region year week total_specimens a_2009_h1n1 a_h3 a_subtyping_not… b bvic byam h3n2v wk_date +## +## 1 Census Regi… New E… 2016 40 31 0 6 0 0 0 0 0 2016-10-02 +## 2 Census Regi… Mid-A… 2016 40 50 0 8 0 0 2 0 0 2016-10-02 +## 3 Census Regi… East … 2016 40 139 0 4 0 0 0 1 0 2016-10-02 +## 4 Census Regi… West … 2016 40 103 0 6 0 0 1 0 0 2016-10-02 +## 5 Census Regi… South… 2016 40 181 3 11 0 1 2 0 0 2016-10-02 +## 6 Census Regi… East … 2016 40 24 0 0 0 0 0 0 0 2016-10-02 +## 7 Census Regi… West … 2016 40 27 0 1 0 0 0 0 0 2016-10-02 +## 8 Census Regi… Mount… 2016 40 54 3 10 0 0 0 1 0 2016-10-02 +## 9 Census Regi… Pacif… 2016 40 289 3 41 0 0 0 2 0 2016-10-02 +## 10 Census Regi… New E… 2016 41 14 0 2 0 0 0 0 0 2016-10-09 +## # … with 458 more rows +## +## $clinical_labs +## # A tibble: 468 x 11 +## region_type region year week total_specimens total_a total_b percent_positive percent_a percent_b wk_date +## +## 1 Census Regio… New England 2016 40 654 5 1 0.917 0.765 0.153 2016-10-02 +## 2 Census Regio… Mid-Atlant… 2016 40 1579 10 4 0.887 0.633 0.253 2016-10-02 +## 3 Census Regio… East North… 2016 40 2176 6 5 0.506 0.276 0.230 2016-10-02 +## 4 Census Regio… West North… 2016 40 1104 3 0 0.272 0.272 0 2016-10-02 +## 5 Census Regio… South Atla… 2016 40 2785 43 62 3.77 1.54 2.23 2016-10-02 +## 6 Census Regio… East South… 2016 40 844 4 4 0.948 0.474 0.474 2016-10-02 +## 7 Census Regio… West South… 2016 40 1738 21 13 1.96 1.21 0.748 2016-10-02 +## 8 Census Regio… Mountain 2016 40 1067 8 0 0.750 0.750 0 2016-10-02 +## 9 Census Regio… Pacific 2016 40 1433 20 1 1.47 1.40 0.0698 2016-10-02 +## 10 Census Regio… New England 2016 41 810 5 1 0.741 0.617 0.123 2016-10-09 +## # … with 458 more rows - ## $public_health_labs - ## # A tibble: 468 x 13 - ## region_type region year week total_specimens a_2009_h1n1 a_h3 a_subtyping_not… b bvic byam h3n2v wk_date - ## - ## 1 Census Regi… New E… 2016 40 31 0 6 0 0 0 0 0 2016-10-02 - ## 2 Census Regi… Mid-A… 2016 40 50 0 8 0 0 2 0 0 2016-10-02 - ## 3 Census Regi… East … 2016 40 139 0 4 0 0 0 1 0 2016-10-02 - ## 4 Census Regi… West … 2016 40 103 0 6 0 0 1 0 0 2016-10-02 - ## 5 Census Regi… South… 2016 40 181 3 11 0 1 2 0 0 2016-10-02 - ## 6 Census Regi… East … 2016 40 24 0 0 0 0 0 0 0 2016-10-02 - ## 7 Census Regi… West … 2016 40 27 0 1 0 0 0 0 0 2016-10-02 - ## 8 Census Regi… Mount… 2016 40 54 3 10 0 0 0 1 0 2016-10-02 - ## 9 Census Regi… Pacif… 2016 40 289 3 41 0 0 0 2 0 2016-10-02 - ## 10 Census Regi… New E… 2016 41 14 0 2 0 0 0 0 0 2016-10-09 - ## # … with 458 more rows - ## - ## $clinical_labs - ## # A tibble: 468 x 11 - ## region_type region year week total_specimens total_a total_b percent_positive percent_a percent_b wk_date - ## - ## 1 Census Regio… New England 2016 40 654 5 1 0.917 0.765 0.153 2016-10-02 - ## 2 Census Regio… Mid-Atlant… 2016 40 1579 10 4 0.887 0.633 0.253 2016-10-02 - ## 3 Census Regio… East North… 2016 40 2176 6 5 0.506 0.276 0.230 2016-10-02 - ## 4 Census Regio… West North… 2016 40 1104 3 0 0.272 0.272 0 2016-10-02 - ## 5 Census Regio… South Atla… 2016 40 2785 43 62 3.77 1.54 2.23 2016-10-02 - ## 6 Census Regio… East South… 2016 40 844 4 4 0.948 0.474 0.474 2016-10-02 - ## 7 Census Regio… West South… 2016 40 1738 21 13 1.96 1.21 0.748 2016-10-02 - ## 8 Census Regio… Mountain 2016 40 1067 8 0 0.750 0.750 0 2016-10-02 - ## 9 Census Regio… Pacific 2016 40 1433 20 1 1.47 1.40 0.0698 2016-10-02 - ## 10 Census Regio… New England 2016 41 810 5 1 0.741 0.617 0.123 2016-10-09 - ## # … with 458 more rows - -``` r who_nrevss("state", years=2016) +## $public_health_labs +## # A tibble: 54 x 12 +## region_type region season_descript… total_specimens a_2009_h1n1 a_h3 a_subtyping_not… b bvic byam h3n2v +## +## 1 States Alaba… Season 2016-17 570 3 227 1 2 15 14 0 +## 2 States Alaska Season 2016-17 5222 14 905 3 252 2 11 0 +## 3 States Arizo… Season 2016-17 2975 63 1630 0 5 227 578 0 +## 4 States Arkan… Season 2016-17 121 0 51 0 0 4 0 0 +## 5 States Calif… Season 2016-17 14074 184 4696 120 116 28 152 0 +## 6 States Color… Season 2016-17 714 3 267 2 4 31 219 0 +## 7 States Conne… Season 2016-17 1348 19 968 0 0 62 263 0 +## 8 States Delaw… Season 2016-17 3090 5 659 4 11 27 127 1 +## 9 States Distr… Season 2016-17 73 1 34 0 3 0 4 0 +## 10 States Flori… Season 2016-17 +## # … with 44 more rows, and 1 more variable: wk_date +## +## $clinical_labs +## # A tibble: 2,808 x 11 +## region_type region year week total_specimens total_a total_b percent_positive percent_a percent_b wk_date +## +## 1 States Alabama 2016 40 406 4 1 1.23 0.99 0.25 2016-10-02 +## 2 States Alaska 2016 40 2016-10-02 +## 3 States Arizona 2016 40 133 0 0 0 0 0 2016-10-02 +## 4 States Arkansas 2016 40 47 0 0 0 0 0 2016-10-02 +## 5 States California 2016 40 668 2 0 0.3 0.3 0 2016-10-02 +## 6 States Colorado 2016 40 260 0 0 0 0 0 2016-10-02 +## 7 States Connecticut 2016 40 199 3 0 1.51 1.51 0 2016-10-02 +## 8 States Delaware 2016 40 40 0 0 0 0 0 2016-10-02 +## 9 States District of … 2016 40 2016-10-02 +## 10 States Florida 2016 40 2016-10-02 +## # … with 2,798 more rows ``` - ## $public_health_labs - ## # A tibble: 54 x 12 - ## region_type region season_descript… total_specimens a_2009_h1n1 a_h3 a_subtyping_not… b bvic byam h3n2v - ## - ## 1 States Alaba… Season 2016-17 570 3 227 1 2 15 14 0 - ## 2 States Alaska Season 2016-17 5222 14 905 3 252 2 11 0 - ## 3 States Arizo… Season 2016-17 2975 63 1630 0 5 227 578 0 - ## 4 States Arkan… Season 2016-17 121 0 51 0 0 4 0 0 - ## 5 States Calif… Season 2016-17 14074 184 4696 120 116 28 152 0 - ## 6 States Color… Season 2016-17 714 3 267 2 4 31 219 0 - ## 7 States Conne… Season 2016-17 1348 19 968 0 0 62 263 0 - ## 8 States Delaw… Season 2016-17 3090 5 659 4 11 27 127 1 - ## 9 States Distr… Season 2016-17 73 1 34 0 3 0 4 0 - ## 10 States Flori… Season 2016-17 - ## # … with 44 more rows, and 1 more variable: wk_date - ## - ## $clinical_labs - ## # A tibble: 2,808 x 11 - ## region_type region year week total_specimens total_a total_b percent_positive percent_a percent_b wk_date - ## - ## 1 States Alabama 2016 40 406 4 1 1.23 0.99 0.25 2016-10-02 - ## 2 States Alaska 2016 40 2016-10-02 - ## 3 States Arizona 2016 40 133 0 0 0 0 0 2016-10-02 - ## 4 States Arkansas 2016 40 47 0 0 0 0 0 2016-10-02 - ## 5 States California 2016 40 668 2 0 0.3 0.3 0 2016-10-02 - ## 6 States Colorado 2016 40 260 0 0 0 0 0 2016-10-02 - ## 7 States Connecticut 2016 40 199 3 0 1.51 1.51 0 2016-10-02 - ## 8 States Delaware 2016 40 40 0 0 0 0 0 2016-10-02 - ## 9 States District of … 2016 40 2016-10-02 - ## 10 States Florida 2016 40 2016-10-02 - ## # … with 2,798 more rows - ## cdcfluview Metrics | Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | | :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: | -| R | 21 | 0.91 | 837 | 0.88 | 302 | 0.79 | 521 | 0.85 | -| Rmd | 1 | 0.04 | 83 | 0.09 | 67 | 0.18 | 88 | 0.14 | +| R | 21 | 0.91 | 847 | 0.88 | 303 | 0.79 | 512 | 0.85 | +| Rmd | 1 | 0.04 | 80 | 0.08 | 68 | 0.18 | 86 | 0.14 | | make | 1 | 0.04 | 32 | 0.03 | 11 | 0.03 | 1 | 0.00 | ## 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. +Please note that this project is released with a Contributor Code of +Conduct. By participating in this project you agree to abide by its +terms. diff --git a/cran-comments.md b/cran-comments.md index 75dd40d..cdf5279 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,30 +1,10 @@ ## Test environments - -* local OS X install, R 3.5.2 -* local Ubuntu 16.04 R 3.5.2 -* ubuntu 16.04 (on travis-ci), R current/devel +* local OS X install, R 3.6.3 +* ubuntu 14.04 (on travis-ci), R 3.6.3 * win-builder (devel and release) ## R CMD check results 0 errors | 0 warnings | 1 note -* This is a maintenance update. - -## Reverse dependencies - -None - ---- - -The CDC removed 2 old API endpoints so those functions have been removed. - -There was a bug in the computation of "start week" that resulted in -the "ISO" day being used vs the MMWR/"epi" day being used. This -has also been fixed. - -Only some examples run on CRAN due to their time consuming nature and the need -to make external network API calls. Monthly tests are performed on Travis-CI - and the package itself has 88% -code coverage during tests . -All package functions are also evaluated on each new generation of the README. \ No newline at end of file +This an update to fix tibble CRAN check warnings. diff --git a/man/cdc_basemap.Rd b/man/cdc_basemap.Rd index 75c62ea..003d9e2 100644 --- a/man/cdc_basemap.Rd +++ b/man/cdc_basemap.Rd @@ -4,8 +4,9 @@ \alias{cdc_basemap} \title{Retrieve CDC U.S. Basemaps} \usage{ -cdc_basemap(basemap = c("national", "hhs", "census", "states", "spread", - "surv")) +cdc_basemap( + basemap = c("national", "hhs", "census", "states", "spread", "surv") +) } \arguments{ \item{basemap}{select the CDC basemap. One of: diff --git a/man/cdcfluview.Rd b/man/cdcfluview.Rd index a5aa25e..3944ec8 100644 --- a/man/cdcfluview.Rd +++ b/man/cdcfluview.Rd @@ -3,7 +3,6 @@ \docType{package} \name{cdcfluview} \alias{cdcfluview} -\alias{cdcfluview-package} \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 diff --git a/man/census_regions.Rd b/man/census_regions.Rd index b6cdbaa..ac0f00e 100644 --- a/man/census_regions.Rd +++ b/man/census_regions.Rd @@ -4,7 +4,9 @@ \name{census_regions} \alias{census_regions} \title{Census Region Table} -\format{A data frame with 51 rows and 2 variables} +\format{ +A data frame with 51 rows and 2 variables +} \usage{ data(census_regions) } diff --git a/man/figures/README-cdc-basemaps-1.png b/man/figures/README-cdc-basemaps-1.png new file mode 100644 index 0000000..2c6e311 Binary files /dev/null and b/man/figures/README-cdc-basemaps-1.png differ diff --git a/man/figures/README-cdc-basemaps-2.png b/man/figures/README-cdc-basemaps-2.png new file mode 100644 index 0000000..f45bd93 Binary files /dev/null and b/man/figures/README-cdc-basemaps-2.png differ diff --git a/man/figures/README-cdc-basemaps-3.png b/man/figures/README-cdc-basemaps-3.png new file mode 100644 index 0000000..eec7a02 Binary files /dev/null and b/man/figures/README-cdc-basemaps-3.png differ diff --git a/man/figures/README-cdc-basemaps-4.png b/man/figures/README-cdc-basemaps-4.png new file mode 100644 index 0000000..11c6929 Binary files /dev/null and b/man/figures/README-cdc-basemaps-4.png differ diff --git a/man/figures/README-cdc-basemaps-5.png b/man/figures/README-cdc-basemaps-5.png new file mode 100644 index 0000000..164cbb3 Binary files /dev/null and b/man/figures/README-cdc-basemaps-5.png differ diff --git a/man/figures/README-cdc-basemaps-6.png b/man/figures/README-cdc-basemaps-6.png new file mode 100644 index 0000000..a1dcbc7 Binary files /dev/null and b/man/figures/README-cdc-basemaps-6.png differ diff --git a/man/figures/README-ili-df-1.png b/man/figures/README-ili-df-1.png new file mode 100644 index 0000000..143a373 Binary files /dev/null and b/man/figures/README-ili-df-1.png differ diff --git a/man/figures/README-ili-df-2.png b/man/figures/README-ili-df-2.png new file mode 100644 index 0000000..f6c0a62 Binary files /dev/null and b/man/figures/README-ili-df-2.png differ diff --git a/man/figures/README-ili-df-3.png b/man/figures/README-ili-df-3.png new file mode 100644 index 0000000..1567d92 Binary files /dev/null and b/man/figures/README-ili-df-3.png differ diff --git a/man/figures/README-ili-df-4.png b/man/figures/README-ili-df-4.png new file mode 100644 index 0000000..41012b3 Binary files /dev/null and b/man/figures/README-ili-df-4.png differ diff --git a/man/figures/README-ili-weekly-activity-1.png b/man/figures/README-ili-weekly-activity-1.png new file mode 100644 index 0000000..4514496 Binary files /dev/null and b/man/figures/README-ili-weekly-activity-1.png differ diff --git a/man/figures/README-nat-pi-mortality-1.png b/man/figures/README-nat-pi-mortality-1.png new file mode 100644 index 0000000..d338679 Binary files /dev/null and b/man/figures/README-nat-pi-mortality-1.png differ diff --git a/man/figures/README-surveillance-areas-1.png b/man/figures/README-surveillance-areas-1.png new file mode 100644 index 0000000..b0e5bdc Binary files /dev/null and b/man/figures/README-surveillance-areas-1.png differ diff --git a/man/figures/README-who-vrevss-1.png b/man/figures/README-who-vrevss-1.png new file mode 100644 index 0000000..e35e431 Binary files /dev/null and b/man/figures/README-who-vrevss-1.png differ diff --git a/man/get_flu_data.Rd b/man/get_flu_data.Rd index fc0904e..1a60c20 100644 --- a/man/get_flu_data.Rd +++ b/man/get_flu_data.Rd @@ -4,9 +4,12 @@ \alias{get_flu_data} \title{Retrieves state, regional or national influenza statistics from the CDC (deprecated)} \usage{ -get_flu_data(region = "hhs", sub_region = 1:10, - data_source = "ilinet", years = as.numeric(format(Sys.Date(), - "\%Y"))) +get_flu_data( + region = "hhs", + sub_region = 1:10, + data_source = "ilinet", + years = as.numeric(format(Sys.Date(), "\%Y")) +) } \arguments{ \item{region}{one of "\code{hhs}", "\code{census}", "\code{national}", diff --git a/man/get_hosp_data.Rd b/man/get_hosp_data.Rd index b4c4e08..86d3e0f 100644 --- a/man/get_hosp_data.Rd +++ b/man/get_hosp_data.Rd @@ -4,8 +4,11 @@ \alias{get_hosp_data} \title{Retrieves influenza hospitalization statistics from the CDC (deprecated)} \usage{ -get_hosp_data(area = "flusurvnet", age_group = "overall", - years = as.numeric(format(Sys.Date(), "\%Y")) - 1) +get_hosp_data( + area = "flusurvnet", + age_group = "overall", + years = as.numeric(format(Sys.Date(), "\%Y")) - 1 +) } \arguments{ \item{area}{one of "\code{flusurvnet}", "\code{eip}", "\code{ihsp}", or two diff --git a/man/hhs_regions.Rd b/man/hhs_regions.Rd index 2857a62..5f58fcc 100644 --- a/man/hhs_regions.Rd +++ b/man/hhs_regions.Rd @@ -4,7 +4,9 @@ \name{hhs_regions} \alias{hhs_regions} \title{HHS Region Table} -\format{A data frame with 59 rows and 4 variables} +\format{ +A data frame with 59 rows and 4 variables +} \usage{ data(hhs_regions) } diff --git a/man/hospitalizations.Rd b/man/hospitalizations.Rd index d624122..721080d 100644 --- a/man/hospitalizations.Rd +++ b/man/hospitalizations.Rd @@ -4,8 +4,11 @@ \alias{hospitalizations} \title{Laboratory-Confirmed Influenza Hospitalizations} \usage{ -hospitalizations(surveillance_area = c("flusurv", "eip", "ihsp"), - region = "all", years = NULL) +hospitalizations( + surveillance_area = c("flusurv", "eip", "ihsp"), + region = "all", + years = NULL +) } \arguments{ \item{surveillance_area}{one of "\code{flusurv}", "\code{eip}", or "\code{ihsp}"} diff --git a/man/mmwrid_map.Rd b/man/mmwrid_map.Rd index 4b844a5..69d266f 100644 --- a/man/mmwrid_map.Rd +++ b/man/mmwrid_map.Rd @@ -4,7 +4,9 @@ \name{mmwrid_map} \alias{mmwrid_map} \title{MMWR ID to Calendar Mappings} -\format{A data frame with 4,592 rows and 4 columns} +\format{ +A data frame with 4,592 rows and 4 columns +} \description{ The CDC uses a unique "Morbidity and Mortality Weekly Report" identifier for each week that starts at 1 (Ref: < https://www.cdc.gov/mmwr/preview/mmwrhtml/su6004a9.htm>). diff --git a/man/pi_mortality.Rd b/man/pi_mortality.Rd index 51ddbc9..00fed59 100644 --- a/man/pi_mortality.Rd +++ b/man/pi_mortality.Rd @@ -4,8 +4,7 @@ \alias{pi_mortality} \title{Pneumonia and Influenza Mortality Surveillance} \usage{ -pi_mortality(coverage_area = c("national", "state", "region"), - years = NULL) +pi_mortality(coverage_area = c("national", "state", "region"), years = NULL) } \arguments{ \item{coverage_area}{coverage area for data (national, state or region)} @@ -29,7 +28,7 @@ NCHS Mortality Surveillance System data are presented by the week the death occu at the national, state, and HHS Region levels. Data on the percentage of deaths due to P&I on a national level are released two weeks after the week of death to allow for collection of enough data to produce a stable percentage. States and HHS regions -with less than 20% of the expected total deaths (average number of total deaths +with less than 20\% of the expected total deaths (average number of total deaths reported by week during 2008-2012) will be marked as insufficient data. Collection of complete data is not expected at the time of initial report, and a reliable percentage of deaths due to P&I is not anticipated at the U.S. Department of Health diff --git a/man/who_nrevss.Rd b/man/who_nrevss.Rd index 7405aae..a021ecd 100644 --- a/man/who_nrevss.Rd +++ b/man/who_nrevss.Rd @@ -4,8 +4,7 @@ \alias{who_nrevss} \title{Retrieve WHO/NREVSS Surveillance Data} \usage{ -who_nrevss(region = c("national", "hhs", "census", "state"), - years = NULL) +who_nrevss(region = c("national", "hhs", "census", "state"), years = NULL) } \arguments{ \item{region}{one of "\code{national}", "\code{hhs}", "\code{census}", or "\code{state}"}