state.health.url: Get URL(s) with State health indicator data from RWJF - **...

View source: R/state.health.url.R

state.health.urlR Documentation

Get URL(s) with State health indicator data from RWJF - ** url scheme obsolete now so needs to be redone

Description

Robert Woods Johnson Foundation provides health indicator data by state. This function provides a basic interface to those webpages.

Usage

state.health.url(
  ST = NA,
  scope = "state",
  ind = 66,
  dist = 23,
  char = 87,
  time = 3,
  viz = "bar",
  fstate = NA,
  locs = NA,
  cmp = "stcmp",
  open.browser = FALSE
)

Arguments

ST

State abbreviation, FIPS code, or name as character vector

scope

Character, default is "state" view in results, but can be "national" view as well

ind

Health Indicator code number. Number, default is 66. Possible values:

  • 6=Cancer Incidence: Incidence of breast, cervical, lung and colorectal cancer per 100,000 population; age adjusted

  • 7=Cancer Incidence by Race: Incidence of breast, cervical, lung and colorectal cancer per 100,000 population; age adjusted

  • 10=Chronic Disease Prevalence: asthma/CVD/diabetes,

  • 15=Limited Activity: Average number of days in the previous 30 days when a person indicates their activities are limited due to mental or physical health difficulties,

  • 22=Tobacco taxes: State cigarette excise tax rate ($)

  • 25=Income Inequality (Gini Coefficient)

  • 31=life expectancy= Life expectancy at birth: number of years that a newborn is expected to live if current mortality rates continue to apply

  • 44=Public health funding: Per capita state public health funding

  • 45=Poor/Fair Health: Self-reported health status: percent of adults reporting fair or poor health

  • 65=Premature death: Premature deaths: Average number of years of potential life lost prior to age 75 per 100,000 population

  • 66=Premature Death by Race/Ethnicity: Premature deaths: Average number of years of potential life lost prior to age 75 per 100,000 population

dist

default is 23. unclear what this controls. 23 or 29 or 0 or 19 possible. dist/char were 0/0 for US totals not by race, and were 19/58 for same by race.

char

default is 87. unclear what this controls. 91=?, 119=?, 121=? 58? others possible.

time

Code for which years are covered by the data. default is 3, which means 2009-2010. Possible values:

  • 3=2009-2010

  • 22=2010-2011

  • 23=2011-2012

  • 5=2000

  • 10=2005

  • 11=2006

  • 12=2007

  • 13=2008

  • 1=2009

  • 14=2010

  • 4=2011

  • 24=2012

  • OTHERS?

viz

Type of visualization of data. Default is "bar" and can be line or bar or table.

fstate

State number. default is NA

locs

Locations to compare. default is NA

cmp

Comparisons to view. Default is "stcmp" to see 2+ states compared (or state vs US). Can also see breakdown for one state if set to "brkdwn"

open.browser

Logical, default is FALSE. Should URL be opened by launching browser.

Details

NEWER URL SCHEME NOW...

<http://www.rwjf.org/en/how-we-work/rel/research-features/rwjf-datahub/national.html#q/ scope/national/ind/10/dist/0/char/0/time/3/viz/map/cmp/brkdwn>

see also related percent insured data here: e.g., http://datacenter.shadac.org/profile/70#2/alabama/percent,moe,count/a/hide

DEFAULT IF NO PARAMETERS USED:

state.health.url()
url created:
http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub/national.html#q/ scope/state/ind/66/dist/23/char/87/time/3/viz/bar/fstate/33/locs/33,52,9/cmp/stcmp
url that it resolves to on website:
http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub/national.html#q/ scope/state/ind/66/dist/23/char/87/time/3/viz/bar/fstate/33/locs/33,52,9/cmp/stcmp

Value

URL(s) character vector, default: http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub/national.html#q/scope/state/ind/66/dist/23/char/87/time/3/viz/bar/fstate/33/locs/33,52,9/cmp/stcmpind/66/dist/23/char/87/time/3/viz/bar/fstate/33/locs/33,52,9/cmp/stcmp

<http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub/national.html#q/

scope/state/ind/66/dist/23/char/87/time/14/viz/bar/fstate/21/locs/21/cmp/stcmp>

scope/state/ind/66/dist/23/char/87/time/3/viz/bar/fstate/21/locs/21,52/cmp/stcmp>

URL scheme for linking to Resources for health data by state or by county:

#State-level data from SHADAC: http://www.shadac.org/
#State-level data from RWJF: http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub.html
***** see entire US clickable map of states

shell.exec('http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub/national.html#q/

scope/national/ind/31/dist/29/char/119/time/13/viz/map/fstate/2/locs/2,52/cmp/brkdwn')

Use this URL format to figure out API or state-specific set of links to nice state reports.

Public health, premature deaths, MD vs US, 2009-2010 <http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub/national.html#q/ scope/state/ind/66/dist/23/char/91/time/3/viz/bar/fstate/21/locs/21,52/cmp/stcmp> Public health, life expectancy, MD (state number 21) vs US <http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub/national.html#q/ scope/state/ind/31/dist/29/char/119/time/14/viz/line/fstate/21/locs/21,52/cmp/brkdwn> <http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub/national.html#q/ scope/state/ind/31/dist/29/char/119/time/14/viz/bar/fstate/21/locs/21,52/cmp/stcmp>
Cancer by race in arizona (defaults to 2008-2009): <http://www.rwjf.org/en/research-publications/research-features/rwjf-datahub/national.html#q/ scope/state/ind/7/dist/22/char/85/time/18/viz/bar/fstate/3/locs/3,52/cmp/stcmp>

Examples

#
 shell.exec(state.health.url('CA'))


ejanalysis/ejanalysis documentation built on April 2, 2024, 10:12 a.m.