urls.chsi: URLs for Community Health Status Indicators for US Counties...

View source: R/urls.chsi.R

urls.chsiR Documentation

URLs for Community Health Status Indicators for US Counties from CDC

Description

Returns URLs with public health information about US Counties, and can also launch a browser to open a single webpage if just 1 specified. Information is from http://wwwn.cdc.gov/CommunityHealth

Usage

urls.chsi(
  fips = "http://www.cdc.gov/CommunityHealth",
  type = "health",
  launch = TRUE
)

Arguments

fips

Single fips or a vector. Optional (defaults to homepage) character FIPS code of County (5 characters), or "Name of County, State" format. (e.g., "Montgomery County, MD"). Attempts to replace any missing leading zero. Ability to enter County name as fips is not yet working.

type

Optional (default is health) vector (same length as fips) specifying type of indicator or report to show for URL(s). Can be any of the following: health, demog, pm, highways, poverty. Others may be added later.

launch

Optional (default is TRUE but only if just one fips is specified) logical, specifying whether to launch browser to display website. Ignored if >1 fips provided.

Details

*** WARNING: Not yet tested for all counties, so multi-word and and nonstandard names are unlikely to work yet.

Value

Returns character URL(s).

See Also

urls.countyhealthrankings, get.county.info from ejanalysis package, and get_county_demographics from choroplethr package.

Examples

  urls.chsi('01005')
  urls.chsi('01005', 'demog')
  urls.chsi('06037', 'pm')
  urls.chsi(c('31165', 31165, 1001, 0))

ejanalysis/countyhealthrankings documentation built on March 25, 2022, 9:15 a.m.