Browse Source

Merge branch 'master' of bigd:hrbrmstr/cdcfluview

tags/v0.9.0
boB Rudis 5 years ago
parent
commit
da78db0f2b
No known key found for this signature in database GPG Key ID: 1D7529BE14E2BBA9
  1. 16
      DESCRIPTION
  2. 2
      LICENSE
  3. 7
      R/mmwr-map.r

16
DESCRIPTION

@ -1,24 +1,26 @@
Package: cdcfluview Package: cdcfluview
Type: Package Type: Package
Encoding: UTF-8 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.8.0 Version: 0.8.0
Date: 2018-09-16 Date: 2018-11-23
Authors@R: c( Authors@R: c(
person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5670-2640")), 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")), comment = c(ORCID = "0000-0002-6298-0185")),
person("JJ", "Chen", email = "jiajia.chern@gmail.com", role = "ctb", person("JJ", "Chen", email = "jiajia.chern@gmail.com", role = "ctb",
comment = c(ORCID = "0000-0001-8482-8398")) comment = c(ORCID = "0000-0001-8482-8398")),
person("Sebastian", "Meyer", email = "seb.meyer@fau.de", role = "ctb",
comment = c(ORCID = "0000-0002-1791-9449"))
) )
Maintainer: 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 and Prevention (CDC) maintain
<http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html> for a portal <http://gis.cdc.gov/grasp/fluview/fluportaldashboard.html> for
accessing state, regional and national influenza statistics as well as accessing state, regional and national influenza statistics as well as
Mortality Surveillance Data. The web interface makes it difficult and mortality surveillance data. The web interface makes it difficult and
time-consuming to select and retrieve influenza data. Tools are provided time-consuming to select and retrieve influenza data. Tools are provided
to access the data provided by the portal's underlying 'API'. to access the data provided by the portal's underlying API.
URL: https://github.com/hrbrmstr/cdcfluview URL: https://github.com/hrbrmstr/cdcfluview
BugReports: https://github.com/hrbrmstr/cdcfluview/issues BugReports: https://github.com/hrbrmstr/cdcfluview/issues
License: MIT + file LICENSE License: MIT + file LICENSE

2
LICENSE

@ -1,2 +1,2 @@
YEAR: 2015 YEAR: 2015-2018
COPYRIGHT HOLDER: Bob Rudis COPYRIGHT HOLDER: Bob Rudis

7
R/mmwr-map.r

@ -5,9 +5,10 @@
# @author Jarad Niemi \email{niemi@@iastate.edu} # @author Jarad Niemi \email{niemi@@iastate.edu}
.start_date = function(year) { .start_date = function(year) {
# Finds start state for this calendar year # Finds start state for this calendar year
jan1 = as.Date(paste(year, '-01-01', sep='')) # Fix by @bastistician
wday = as.numeric(MMWRweekday(jan1)) jan1 <- as.Date(paste0(year, '-01-01'))
jan1 - (wday-1) + 7*(wday>4) wday <- as.numeric(strftime(jan1, "%w")) # Sunday is 0
jan1 - wday + 7*(wday>3)
} }
# I discovered why 1962!: https://www.cdc.gov/mmwr/preview/mmwrhtml/su6004a9.htm # I discovered why 1962!: https://www.cdc.gov/mmwr/preview/mmwrhtml/su6004a9.htm

Loading…
Cancel
Save