05 Nov 2017
What drives disparities in health outcomes? Research supports the notion that socioeconomic status (SES) has a significant impact on health outcomes.
The best (experimental/observational) studies on the effects of social structural differences and positions of individuals within these structures oh health are
from animal studies. Overall, these studies say social hierarchy is bad for health (especially for those ranking lower but sometimes for those who rank higher
when the stability of their status is uncertain). See work by Jay Kaplan
and Robert Sapolsky among others. Such experimental studies, of course, cannot be carried out on humans.
Longitudinal data, however, are beginning to be used to make some inference about the whys and hows of the effects of social hierarchy on human health.
...Read more
05 Oct 2017
In the previous two posts, there were several plots and I indicated that I used R to scrape html tables
from the Bureau of Labor Statistics website.
This post provides a quick tutorial on how I obtained and plotted the data using R (& various packages).
I will first setup the R environment and load some of the packages that will be used.
The good thing in using R Markdown is creating code in chunks for clarity and ease of debugging.
Table 2 & Table 3
of the Economic News Release contain
the relevant general labor force data including employment/unemployment rates for various groups.
Note that Monthly data change in those tables. At the time of this writing, the tables had data for Aug 2016 - Aug 2017 period.
I extracted and plotted unemployment rate data by race/ethnicity and by gender.
Code chunks in R Markdown begin & end with ```
{r setup, include=FALSE}
knitr::opts_chunk$set(echo=TRUE, invisible=TRUE, warning=FALSE)
#load libraries
pkg<-c("XML", "RCurl", "rlist", "curl", "stringr", "gapminder",
"ggplot2", "xml2", "dplyr", "zoo", "readxl")
lapply(pkg, require, character.only = TRUE)
...Read more
04 Oct 2017
In this post, I quickly wanted to look at some plots comparing unemployment rates by race/ethnicity and gender.
I will start by comparing unemployment rates for men. The data for the Asian group were not broken down by gender,
so this group is dropped from the plots in this post.
- Unemployment rates by Race/Ethnicity for men

...Read more
03 Oct 2017
I was curious to see seasonal unemployment rates by race/ethnicity and gender over time.
Another reason for the next couple posts is to show how to scrape html data from the web (specifically Bureau of Labor Statistics (BLS) website),
prepare and plot the data by important grouping variables. The time series plot data were obtained
from here – I selected the seasonally adjusted and
saved in my local drive. All data wrangling and plotting was done in R.
In the second post, I will look at unemployment rates by race/ethnicity and gender over six time points (Aug 2016 - Aug 2017)
as provided in the BLS website here and here
for Hispanic/Latino at the time of writing this post. In the third post, I will provide a quick look at R codes that created all these plots.
Here is a plot of unemployment rates by race/ethnicity over time (for the last one year at 6 time points).

- What would 10 year monthly unemployment rates by Race/Ethnicity look like? … see plot at the end of the post!
...Read more