NMMAPSdata R Package

Publications  |  Software   |  Data  |   Rweb  |  iHAPSS    


NMMAPSdata R Package

Current version: 0.4-2

The NMMAPSdata R package contains daily mortality, air pollution, and weather data originally assembled as part of the National Mortality, Morbidity, and Air Pollution Study (NMMAPS).

There is a technical report available which contains a brief overview of the package and contains examples of multi-city time series analysis of air pollution and mortality. There are three code files referenced in the report:

  • simple.R: Fit basic NMMAPS time series regression models for air pollution and mortality.
  • seasonal.R Fit time series models with seasonally varying pollution effects.
  • tdlm.R: Fit time series models incorporating a temperature distributed lag model.
There is an announcements mailing list for receiving updates about the NMMAPSdata package. Users of NMMAPSdata are encouraged to subscribe to the mailing list to receive information about new releases and bug fixes. The mailing list is low volume and is for announcements only.

Database summary information

  • Time frame: January 1, 1987 -- December 31, 2000
  • Causes of death: Total non-accidental, CVD, respiratory, pneumonia, COPD, accidental
    • Age categories: < 65, 65--74, >= 75
  • Pollutants: PM10, PM2.5, CO, O3, SO2, NO2
  • Weather: Temperature, dewpoint temperature, relative humidity
  • Number of Cities: 108

More detailed information about the database can be found on the IHAPSS website at http://www.ihapss.jhsph.edu/.

Package requirements

  • R version 2.0.0 or higher.
  • bzip2 compression capability. Most people will not have to worry about this since R comes with bzip2 compression capability by default. However, on some Unix-like systems it is possible that the version of R was compiled without it. NMMAPSdata will give an error when the package is loaded if bzip2 capability is not present.
  • Approximately 380MB of disk space to store the package.

Package files

For Unix, Linux, and Mac OS X users, there is a source package available. SHA1 digests are available for verifying that the downloaded files have not been corrupted.

In R type

install.packages("NMMAPSdata", contriburl = "http://www.ihapss.jhsph.edu/data/NMMAPS/R/", type = "source")

Alternatively, you can run the following steps:

  • Download the file: NMMAPSdata_0.4-2.tar.gz
  • After downloading the tar.gz file, at the command line (in a terminal window), issue the command
    R CMD INSTALL NMMAPSdata_0.4-2.tar.gz
    If you get an error when doing this, you probably don't have permission to write to the system directory where packages are installed (check with your system administrator). If this is true, then you need to install in another directory using the '-l' switch for R CMD INSTALL.

For Windows users, there is a compiled binary version available.

In R type

install.packages("NMMAPSdata", contriburl = "http://www.ihapss.jhsph.edu/data/NMMAPS/R/windows")

Alternatively, you can run the following steps:

  • Download the file: NMMAPSdata_0.4-2.zip
  • After downloading the zip file, startup R and from the "Packages" menu, select "Install package(s) from local zip files..." Find the zip file that you just downloaded, select it, and click "OK". R will unpack and install the package automatically.

A convenient PDF manual is available which contains all of the help files: NMMAPSdata-manual.pdf

All of the above software is licensed under the GNU General Public License. A copy of this license should have been included with your installation of R.


View the NEWS file for a description of recent changes to the package.


Peng RD, Dominici F, Louis TA (2004). "Model choice in multi-city time series studies of air pollution and mortality," Johns Hopkins University Department of Biostatistics Working Papers, Working Paper 55. [link]

Welty LJ, Zeger SL (2004). "Flexible Distributed Lag Models: Are the Acute Effects of PM10 on Mortality the Result of Inadequate Control for Weather and Season?" American Journal of Epidemiology, to appear. [link]

Peng RD, Dominici F, Pastor-Barriuso R, Zeger SL, Samet JM (2004). "Seasonal analyses of air pollution and mortality in 100 U.S. cities," American Journal of Epidemiology, 161 (6), 585--594. [link]

Daniels MJ, Dominici F, Zeger SL, Samet JM (2004). The National Morbidity, Mortality, and Air Pollution Study, Part III: Concentration-Response Curves and Thresholds for the 20 Largest US Cities. Health Effects Institute, Cambridge MA. [PDF]

Dominici F, McDermott A, Daniels M, Zeger SL, Samet JM (2003). "Mortality among residents of 90 cities," in Revised Analyses of Time-Series Studies of Air Pollution and Health. Research Report 94, Health Effects Institute, Cambridge MA, pp. 9-24. [PDF]

Samet JM, Dominici F, Zeger SL, Schwartz J, Dockery DW (2000). The National Morbidity, Mortality, and Air Pollution Study, Part I: Methods and Methodologic Issues. Research Report 94, Health Effects Institute, Cambridge MA. [PDF]

Samet JM, Zeger SL, Dominici F, Curriero F, Coursac I, Dockery DM, Schwartz J, Zanobetti A (2000). The National Morbidity, Mortality, and Air Pollution Study, Part II: Morbidity and Mortality from Air Pollution in the United States. Research Report 94, Health Effects Institute, Cambridge MA. [PDF]

Please send comments to Roger D. Peng (rpeng at jhsph.edu)