analyze the area resource file (arf) with r

October 1, 2012

(This article was first published on asdfree by anthony damico, and kindly contributed to R-bloggers)

the arf is fun to say out loud.  it’s also a single county-level data table with about 6,000 variables, produced by the united states health services and resources administration (hrsa).  the file contains health information and statistics for over 3,000 us counties.

like many government agencies, hrsa provides only a sas importation script and an ascii file.  this new github repository contains two scripts:


  • download the zipped area resource file directly onto your local computer
  • load the entire table into a temporary sql database
  • save the condensed file as an R data file (.rda), comma-separated value file (.csv), and/or stata-readable file (.dta).

analysis examples.R

  • limit the arf to the variables necessary for your analysis
  • sum up a few county-level statistics
  • merge the arf onto other data sets, using both fips and ssa county codes
  • create a sweet county-level map
click here to view these two scripts
for more detail about the area resource file (arf), visit:


the arf may not be a survey data set itself, but it’s particularly useful to merge onto other survey data.

confidential to sas, spss, stata, and sudaan users: time to put down the abacus.  time to transition to r.  😀

To leave a comment for the author, please follow the link and comment on their blog: asdfree by anthony damico. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)