View source: R/state.health.url.R
state.health.url | R Documentation |
Robert Woods Johnson Foundation provides health indicator data by state. This function provides a basic interface to those webpages.
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
)
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:
|
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:
|
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. |
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
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
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>
#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
scope/national/ind/31/dist/29/char/119/time/13/viz/map/fstate/2/locs/2,52/cmp/brkdwn')
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>
#
shell.exec(state.health.url('CA'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.